-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Automatically create directory for cache file in configuration #3834
Comments
@asispts This is not a bug, but a design choice at the time and may be open for discussion to change that design choice. However, please keep in mind that while your example is relatively simple when one presumes the intended path is relative to the directory containing the ruleset and PHPCS is run from that directory, things suddenly get a lot more complex when you factor in absolute path, path traversal and the fact that PHPCS does ruleset discovery from the current directory upwards. P.S.: PHPUnit is a completely different project and what they do has no bearing on this project. |
First of all, I don't think this is a bug either. Unfortunately, the issue template only provides two options: bug report or security vulnerability. That's why I added I am aware that both Let me explain my use case. I prefer to keep my root project as clean as possible, so I store all temp, cache, and build files (including code coverage) in a build directory. In my workflow, Considering the complexity you mentioned earlier, I'm uncertain if implementing this feature is worthwhile. Additionally, issues #2802 and #1992 should be taken into consideration as well. |
@asispts What's stopping you from creating the directory in your repository, and dropping a |
The directory is not part of the project. It's just a temp directory, similar to |
I don't look after any Symfony projects, but yes, that would be my most likely approach. You can see it in projects like Laravel (the In my opinion it's better to be explicit about something, rather than relying on a tool to have the desired side effect that will get you to your end goal. |
Then you can think of |
PHPCS:
3.7.2
Description
Currently, when attempting to use a directory to store a cache file by adding the following line to the configuration file:
an error is thrown:
Expected behavior
The expected behavior is that the directory should be created. It's worth noting that
phpunit
also creates the directory before storing the cache file.The text was updated successfully, but these errors were encountered: