Repository navigation
Conversation
drupal/coder 9.x requires PHP_CodeSniffer 4, but the latest stable PHPCompatibility (9.3.5) only accepts PHP_CodeSniffer 2 or 3. Composer therefore failed before phpcs ran. PHPCompatibility 10.0.0-alpha2 is the first release that accepts PHP_CodeSniffer 4.
The Drupal coding standard flags line 3 of README.md at 83 characters. The warning made phpcs exit non-zero, which stopped the drupal-lint script before the DrupalPractice check ran.
DrupalPractice reports $display_id as an unused variable at line 76 of rl_sorting.install. The loop only needs the display value by reference.
The value was 11 plus TARGET_DRUPAL_CORE_VERSION (11), giving 1111.
jjroelofs
commented
Nov 4, 2026
jjroelofs
left a comment
Contributor
Author
There was a problem hiding this comment.
Review: works (CI green), but I would change the approach.
- Prefer the stable toolchain over
php-compatibility:10.0.0-alpha2. The description lists the stable route (drupal/coder8.3 with PHPCompatibility 9.3.5) as "not tested here". It is now tested:toast_image_editor#9 andlocal_tts#4 both get green CI with the same line:drupal/coder:^8.3,phpcompatibility/php-compatibility:^9.3andsquizlabs/php_codesniffer:^3. Pinning an alpha means the lint job can break on the next alpha. Using the same line in all repos also settles the "maintainer needs to choose" blocker. - The description is incomplete. "What changed" lists only the PHPCompatibility pin. The diff also reflows the README, drops the unused
$display_idinrl_sorting_install(), and changesdrupal_core_version. Add those. drupal_core_version 11is correct (the old form gave1111). Since this script's default is already 11,$TARGET_DRUPAL_CORE_VERSIONwould work and matchanalyzeand its siblings.- Commit message: agreed that a squash merge is the right fix for
rl_sorting_update, given no force push. set -estays here, so the first failing standard still ends the run (see the note onanalyze#39).
Install drupal/coder ^8.3, PHPCompatibility ^9.3 and PHP_CodeSniffer ^3.13 in one composer solve, replacing the 10.0.0-alpha2 pin. Pass TARGET_DRUPAL_CORE_VERSION to drupal_core_version instead of the literal 11. Drop set -e and end the composer installs with || exit 1.
Contributor
Author
|
Follow-up on the review:
Pushed back on: only the All checks pass on the new head. |
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.
What was broken
The
drupal-lintjob failed before phpcs ran.scripts/prepare-drupal-lint.shinstalls the lint tools with twocomposer global requirecalls:drupal/coder9.0.1 (latest) requires PHP_CodeSniffer 4.phpcompatibility/php-compatibility9.3.5 (latest stable) only accepts PHP_CodeSniffer 2 or 3.The second call cannot resolve against the first, so Composer exits with code 2 and the Drupal, DrupalPractice and PHPCompatibility checks never run.
What changed
scripts/prepare-drupal-lint.sh: the lint tools are installed in onecomposer global requireon the stable line:drupal/coder:^8.3,phpcompatibility/php-compatibility:^9.3andsquizlabs/php_codesniffer:^3.13. This replaces the10.0.0-alpha2PHPCompatibility pin. Coder 8.3 is used because coder 9 needs PHP_CodeSniffer 4, which PHPCompatibility 9.3 does not accept.scripts/prepare-drupal-lint.sh:drupal_core_versionis set from$TARGET_DRUPAL_CORE_VERSIONinstead of the literal11. The script's default of 11 is unchanged.scripts/prepare-drupal-lint.sh:set -eis removed, and bothcomposer global requirelines end with|| exit 1, so a failed install still stops the run.README.md: the intro blockquote is re-wrapped. Only the line breaks changed.rl_sorting.install: the unused$display_idkey is dropped from theforeachinrl_sorting_install().phpcs configuration and check levels are unchanged.
Checks addressed
drupal-lintDecisions for review
set -eis removed.scripts/run-drupal-lint.shsources the prepare script and records each standard's exit code itself, soset -eended the run at the first failing standard.dxpr/rl1.x anddxpr/analyze_posthog1.x still keep it.phpcs.xmlstill setsdrupal_core_versionto the literal11. XML cannot read the variable, so it is not changed here.a608d69is titled "Drop unused display key in rl_sorting_update loop", but its change is inrl_sorting_install(). Fixing the title needs a force push, which is not allowed here. A squash merge would clean it up.