-
Notifications
You must be signed in to change notification settings - Fork 154
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
PHPStorm unable to run phpcs inspection #390
Comments
Hi @Vinai. Thank you for your report. Add a comment to assign the issue:
|
I'm facing the same issue. My PHPStorm version is: 2022.1 |
For somehow $installedPath |
it's not permanent fixing, but you may apply this patch @tuyennn @Vinai https://gist.github.com/fiko/bdec71978b458cc527df03d26a695b6c |
I'm facing the same issue. Any news on this? |
Any update on this? PHPCS is an important part of our workflow. |
To include Magento Coding Standard as part of PHPStorm inspections, follow the steps:
PR adding these instructions to the documentation: AdobeDocs/commerce-php#48 |
I'm seeing this issue when running on CLI too |
Did anyone find a proper fix for this? For us, it is only happening in our pipepline, but not locally. https://gist.github.com/fiko/bdec71978b458cc527df03d26a695b6c is rather hacky. |
@sprankhub I fixed this locally by un-setting the 'installed_paths' option within PHPStorm, and relying instead on the installer plug-in. Are you perhaps running your pipeline as root? If so, you'll need to (either switch to a non-root user or) tell Composer that you really want to run plug-ins with https://getcomposer.org/doc/03-cli.md#composer-allow-superuser |
@fredden thanks, buddy! Using |
I ran into this issue on 2.4.6-p3 and had to modify the composer script bit
I don't know at what point the paths changed from |
Preconditions
Steps to reproduce
Expected result
Actual result
In the PHStorm event log the message is shown
Additional Information
Running phpcs on the command line works
The same PHPStorm configuration works on Magento 2.4.3 with PHP 7.4.
If I remove the reference to that sniff from the
Magento2/ruleset.xml
, phpcs fails with a stacktrace where any other Magento2 rule extending from aPHPCompatibility
rule class can't find the parent class.Maybe this points to an autoload error?
However, I quick test by adding
"PHPCompatibility\\:": "vendor/phpcompatibility/php-compatibility/PHPCompatibility/"
to the root composer.json and dumping the composer autoloader did not change anything.The text was updated successfully, but these errors were encountered: