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

Doesn't work if PHPCS isn't in ./vendor/bin #2

Open
jdamner opened this issue Nov 3, 2023 · 0 comments
Open

Doesn't work if PHPCS isn't in ./vendor/bin #2

jdamner opened this issue Nov 3, 2023 · 0 comments

Comments

@jdamner
Copy link

jdamner commented Nov 3, 2023

Hey

If you've setup your bin-dir to be outside of vendor the script fails to find phpcs. Getting the configured the bin directory is documented here:
https://getcomposer.org/doc/articles/vendor-binaries.md

Suggested fix would be in src/PhpCodeSnifferRunner/Runner.php to replace line 20 with:

global $_composer_bin_dir;

$cliCommand = sprintf('%s/phpcs -q --report=json --basepath=%s', $_composer_bin_dir, escapeshellarg($basePath));

Thanks

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

No branches or pull requests

1 participant