Closed pixelplant closed 5 years ago
Seems the new path should be
~/.composer/vendor/bin/phpcs --standard=PSR2 --extensions=php --ignore=".(blade.php)" app
Thanks for raising this! I've add to change the way PHPCS is installed and I didn't think about this consequence. Let me know if you can think of a way to set it up back to the way it was.
Oh crap didn't think about this when making the change. ~@lorisleiva time you update your post? 😅~
~The fix should be as easy a adding export PATH=~/.composer/vendor/bin:$PATH
to the equivalent of ~/.bash_profile
.~
I see that line 60 already does something similar.
I've seem people doing it like this:
# First set COMPOSER_HOME environment variable, will be picked up by Composer during install
ENV COMPOSER_HOME /composer
# Then add the global binary directory to PATH
ENV PATH /composer/vendor/bin:$PATH
# And finally install composer
....
I guess this is the same as in line 60, but maybe the dir is not ./vendor/bin
. I like that the COMPOSER_HOME
way makes it super explicit.
Here I am with the very same error!
phpcs --standard=PSR2 --extensions=php --ignore=app/Console/*,app/Support/helpers.php app
/bin/bash: line 66: phpcs: command not found
So what's the best way to set it back properly?
Until this is properly fixed in the image, @pixelplant solution should work ~/.composer/vendor/bin/phpcs
. And it should continue working when the image is fixed
@fgilio Amazing, thanks for sharing this piece of code. I'll update the dockerfiles to make the composer directory explicit.
I'm going to reopen this until it works.
@AngeloAvv @pixelplant have you had a chance to test with the latest version? I don't have any project with the CI running the phpcs job
@fgilio Yes, it works now without specifying the complete path to phpcs, like before.
Awesome! Thanks for the update
Perfect. Thanks everyone for your help in this issue.
I'm still having issues after clearing all cache and rebuilding the composer package.... None of the applicaitons in vendor/bin are not accasible.
I'm using the latest image
I've added back the ./vendor/bin
path in the $PATH
variable.
Please let me know if it works once the new images have been built. 🤞
No image fixed this as well.. Thanks!
@HighCoData Is your issue fixed by the latest image?
yes it is, thanks
@lorisleiva seems like the issue is back again with the following image:
lorisleiva/laravel-docker:7.4
I saw that codesniffer is now installed using composer, but changing the line to
did not fix the issue.
Is there something I'm missing?