fix(config): point the phpcs registration at bsu-phplint - #13
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 from
@bsu/BSUWordPressCSto@bsu/bsu-phplint, which changes the directory it installs into. This package registers that standard with PHP_CodeSniffer by relative path, so the path has to follow.bin/register-bsuwordpresscs.phpbecomesbin/register-bsu-phplint.php, with$bsu_pathnow'../../../../bsu-phplint'.composer.jsoninvokes that script by filename from bothpost-install-cmdandpost-update-cmd, so both were updated. Renaming the file alone would breakcomposer installfor anyone developing this repo.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 exactly until the nextcomposer updateand then silently revert. The post-install hook is what re-appends the BSU entry, and letting it do so is the only durable way to change it.No toolchain upgrade rode along.
composer.lockis present, socomposer installreported "Nothing to install, update or remove" and all 36 dependency versions are unchanged. The only other file touched isvendor/composer/installed.php, where composer records the root package's git SHA.Verification
--config-showis not a valid check here: PHPCS drops an unresolvableinstalled_pathsentry silently and still prints it, so a broken path looks healthy right up until a lint fails with a message that blames the standard rather than the path. This was verified by running the chain instead:composer install— exit 0, hook reportedRegistered bsu-phplint in phpcs installed_paths.phpcs -i— listsbsu-phplintBSU.Functions.GetTemplateDirectory.GetTemplateDirectoryConsumer note
This release is only usable by a consumer that has also moved to
@bsu/bsu-phplint. Taking this while still pinned to the old standard package produces a danglinginstalled_pathsentry — dropped without warning, surfacing later as a confusing "coding standard is not installed" error. The standard pin and this package's pin must move in the same commit.