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
I use MacOS Monterey 12.3 and I want using PHP CodeSniffer on my Laravel project on version 9.5.1.
The PHPCS version is 3.6.2 (stable).
When I type this command on my MacOS console, I get no errors/warnings. vendor/bin/phpcs or /opt/homebrew/bin/phpcs
When I type this command on Docker (Laravel Sail), I get all the errors/warnings.
FYI: I installed CS from composer and homebrew.
Thanks to help me please.
Max.
The text was updated successfully, but these errors were encountered:
The fact it took 22 milliseconds to run and printed no dots to the screen when run on the host machine suggests it didn't analyse any files, hence no errors. Then when you ran it inside the docker container it worked.
In my opinion I'd always go for running CodeSniffer inside a project's Docker container because I have subtly different PHP versions and standards in each of my projects so I keep them ring-fenced by doing the static analysis inside each project's container. This practice also helps keep things neat for when you want to push the project through a CI/CD pipeline.
Also, why are you using CodeSniffer when Laravel Sail comes packaged with Pint? If I were you I'd be sticking to the Laravel way and be running the sail pint command to enforce code standards.
Suggesting this issue is a candidate to be closed.
Hi,
I use MacOS Monterey 12.3 and I want using PHP CodeSniffer on my Laravel project on version 9.5.1.
The PHPCS version is 3.6.2 (stable).
When I type this command on my MacOS console, I get no errors/warnings.
vendor/bin/phpcs
or/opt/homebrew/bin/phpcs
When I type this command on Docker (Laravel Sail), I get all the errors/warnings.
FYI: I installed CS from composer and homebrew.
Thanks to help me please.
Max.
The text was updated successfully, but these errors were encountered: