Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[6.x] Normalize cache file paths #29890
Note: I believe this is an issue in need of fixing with and without the new bootstrap file but has become apparent due to the new file.
You have set a relative path for the cache files using its environment variable, i.e.
Assume we have the environment variable set:
From their docs:
Custom working directory
Unfortunately it seems that this is not always the case and people are hitting errors as it is not using the project root as the "base path". I believe PHPStorm is now looking for the config cache file relative to where you run the test, so if you are in the
There is a manual fix where in PHPStorm's settings you can specify a "Custom working directory" when running tests, but I'm sure everyone would prefer it "just work".
When running tests on the command line from a sub directory.
If you are in a project's root directory and you
it will look for the cache directory in
I believe these are both the same issue just being hit with different tools, i.e. PHPStorm vs PHPUnit.
Essentially this PR just enforces a consistent path when specifying a relative path and has the added bonus of fixing the bug I introduced to Laravel