-
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
3.x: Autoloader failing to load arbitrary files when installed_paths
only set via a custom ruleset
#1591
Comments
…talled_paths only set via a custom ruleset
The easiest thing to do here was to go through the installed standards and register the autoloader search paths again. This ends up re-registering some paths (no actual harm there, just extra time) so the code could be changed to do this just for the new paths after they are explod'ed and realpath'ed, but this method will at least work the same way in all cases. The 0.13.0 release now works fine for me, as do the latest master and develop branches. |
Awesome! Thank you. |
When `installed_paths` is set via a custom, the PHPCS native autoloader cannot find non-sniff files provided by an external standard, including the PHPCSUtils files. As PHPCS 3.0.2 is rarely used anymore anyway, let's just not support it. Ref: squizlabs/PHP_CodeSniffer#1591
When `installed_paths` is set via a custom, the PHPCS native autoloader cannot find non-sniff files provided by an external standard, including the PHPCSUtils files. As PHPCS 3.0.2 is rarely used anymore anyway, let's just not support it. Ref: squizlabs/PHP_CodeSniffer#1591
Downstream issue: WordPress/WordPress-Coding-Standards#1087
When no
installed_paths
has been set using--config-set
and a custom ruleset is used which:installed_paths
config for an external standard andarbitrary helper files for the external standard are not autoloaded properly and phpcs exits with a fatal error:
This can be tested and reproduced with the following steps:
0.13.0
of the WordPress Coding Standardsinstalled_paths
to the dir in which WPCS is installed on your system:phpcs --config-delete installed_paths
Loosely related to #1564, #1453
I'll look into - temporarily - patching this downstream in both WPCS as well as PHPCompatibility using the code I previously posted in #1564 (comment), so when testing it is imperative to use the WPCS
0.13.0
tagged release.The text was updated successfully, but these errors were encountered: