Skip to content
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

Auto-detect phpcs in vendor directory #81

Merged
merged 9 commits into from
May 20, 2023

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented May 20, 2023

If the --phpcs-path option and PHPCS env variable are not set, normally phpcs-changed defaults to using 'phpcs' to run phpcs commands, relying on the user's $PATH to find the executable.

This PR modifies that behavior slightly so that if there is a vendor/bin/phpcs file in the directory from which phpcs-changed is run, that executable will be used as the default instead.

Fixes #70

  • Add new default.
  • Add tests for new default.
  • Add docs for new default.
  • Add option to disable new default.

@sirbrillig sirbrillig marked this pull request as ready for review May 20, 2023 20:19
@sirbrillig sirbrillig merged commit af03c89 into trunk May 20, 2023
@sirbrillig sirbrillig deleted the add-auto-detect-phpcs-in-vendor branch May 20, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request :: Add PHPCS executable path as a parameter
1 participant