-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
phpcs.phar executable being treated as a directory by itself #3742
Comments
Just to see if I understand the issue correctly: Could you try calling it like If that works, I kind of suspect a server configuration issue where |
Just as ticket description says above. Refer to the error output. Notice the attempt to access a file... so /root/bin/phpcs.phar is being treated as a directory.
This happens running either of...
And phpcs survives, meaning the command continues to run. So phpcs + phpcbf are still usable. What's required is to just ignore the error message. And... this is very ugly + best have some fix or workaround. I'm pretty handy on the command line, so pass along whatever potential fixes you'd like me to try + I'll return the results. |
I cannot reproduce this issue and don't have access to Ubuntu Jammy. I suspect this may have something to do with something in the I'm not sure what you expect PHPCS to do about this. This very much sounds like a PHP config issue. |
I've tested the following on both docker run --rm -it ubuntu:jammy # or ubuntu:focal
apt-get update
apt-get install -y lsb-release curl php-cli php-xml
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
lsb_release -a
php --version
php phpcs.phar --version
@davidfavor are you able to provide details for how to reproduce this issue using clean docker images as suggested here? |
Describe the bug
phpcs.phar being treated as a directory by phpcs.phar
Code sample
Custom ruleset
To reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Versions (please complete the following information):
Additional context
I do notice the same installation, followed off GitHub project page, works on Ubuntu Focal + fails on Ubuntu Jammy.
The error seems to indicate no OS involvement + this is the only difference between working/failing installs.
The text was updated successfully, but these errors were encountered: