fix(config): point the phpcs registration at BSUPhpLint - #15
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The BSU phpcs standard was renamed again, from
@bsu/bsu-phplintto@bsu/BSUPhpLint, so the directory this package registers by relative path changed with it.The earlier name could not work. PHPCS builds the key for every per-sniff setting from the sniff's file PATH, but reports at runtime under the autoload NAMESPACE. A hyphen is illegal in a PHP namespace, so
bsu-phplintforced an explicitnamespaceattribute — and that made the two names disagree, which silently disabledexclude-pattern,severity,propertiesandmessagethroughout the ruleset.BSUPhpLintis a legal namespace on its own, so no attribute is needed and both halves agree again.bin/register-bsu-phplint.phpbecomesbin/register-BSUPhpLint.php, with$bsu_pathnow'../../../../BSUPhpLint'.composer.jsoninvokes it by filename from bothpost-install-cmdandpost-update-cmd, so both were updated.vendor/squizlabs/php_codesniffer/CodeSniffer.confwas regenerated by runningcomposer install, not hand-edited. The dealerdirect plugin rewrites that file on every install and registers only composer-installed standards, so a hand edit would survive until the nextcomposer updateand then silently revert.Typed as a
fixrather than afeat, so this stays a patch. It corrects a same-day defect rather than adding anything.Verification
--config-showis not a valid check: PHPCS drops an unresolvableinstalled_pathsentry silently and still prints it. Verified by running the chain instead:composer install— exit 0, hook reportedRegistered BSUPhpLint in phpcs installed_paths.phpcs -i— listsBSUPhpLintBSUPhpLint.Functions.GetTemplateDirectory.GetTemplateDirectorytests/and 0 inside it, which is the behaviour the previous name had silently broken.Consumer note
The
BSUPhpLintpin and this package's pin must move in the same commit. Taking one without the other leaves a danglinginstalled_pathsentry — dropped without warning, surfacing later as a confusing "coding standard is not installed".