You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What about projects in a dual OS setup, like Windows with WSL or a Vagrant environment ?
What about projects with a committed vendor directory ?
=> I'd like to suggest that they can add a script to run this plugin to their composer.json and can run that script whenever the project is checked out. After all, the plugin will update the paths based on the runtime environment, so should fix the paths in the committed CodeSniffer.Conf file to the new environment.
Can this be made easier ?
=> In Composer 2.x, Plugins can add their own commands to Composer. We could consider adding a custom command to run this plugin. This would negate the need to add the script.
Ref: https://getcomposer.org/doc/articles/plugins.md#command-provider
Should there still be an option for users to use relative paths ?
=> Along the same lines as the search-depth option, we could consider adding a force-relative-paths option.
We should probably also investigate if custom commands can take custom arguments. In that case, we could possible add support for a --force-relative-paths CLI argument if needs be.
I'd like to re-open the discussion around whether the paths registered with PHPCS should be absolute or relative paths.
Some previous issues related to this: #14, #33, #73
Current status after #28:
Problems I'm seeing
Proposal
Always use absolute paths.
Further research needed
vendordirectory ?=> I'd like to suggest that they can add a script to run this plugin to their
composer.jsonand can run that script whenever the project is checked out. After all, the plugin will update the paths based on the runtime environment, so should fix the paths in the committedCodeSniffer.Conffile to the new environment.=> In Composer 2.x, Plugins can add their own commands to Composer. We could consider adding a custom command to run this plugin. This would negate the need to add the script.
Ref: https://getcomposer.org/doc/articles/plugins.md#command-provider
=> Along the same lines as the search-depth option, we could consider adding a
force-relative-pathsoption.We should probably also investigate if custom commands can take custom arguments. In that case, we could possible add support for a
--force-relative-pathsCLI argument if needs be.