Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Nov 24, 2025

Summary by CodeRabbit

  • Chores
    • Updated code quality inspection tools to the latest version for improved standards compliance.
    • Simplified linting workflow configuration by removing cache operations.
    • Consolidated naming convention validation rules to streamline code standard enforcement.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

📝 Walkthrough

Walkthrough

This PR updates the DrevOps PHPCS standard dependency from ^0.5.0 to ^0.6, consolidates two specific naming convention rules into a single broader rule in phpcs.xml, and removes the --clear-cache flag from rector commands in composer.json scripts.

Changes

Cohort / File(s) Summary
Dependency Update
composer.json
Updated drevops/phpcs-standard version constraint in require-dev from ^0.5.0 to ^0.6.
Script Configuration
composer.json
Removed --clear-cache flag from lint script (changed from rector --clear-cache --dry-run to rector --dry-run) and from lint-fix script (changed from rector --clear-cache to rector).
Naming Rules Consolidation
phpcs.xml
Replaced two specific DrevOps naming convention rules (DrevOps.NamingConventions.LocalVariableSnakeCase and DrevOps.NamingConventions.ParameterSnakeCase) with a single broader rule reference (<rule ref="DrevOps"/>).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the newer drevops/phpcs-standard v0.6 maintains compatibility with existing code standards
  • Confirm that the consolidated <rule ref="DrevOps"/> encompasses the functionality of the two removed specific naming convention rules, and check if there are any behavioral differences in the ruleset

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: updating the DrevOps PHPCS standard version and associated lint script commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/update-drevops-phpcs

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c48314 and 10e4cf3.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • composer.json (2 hunks)
  • phpcs.xml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: drevops/git-artifact PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-11T10:08:22.942Z
Learning: Applies to {src,tests}/**/*.php : Use Rector to modernize code to PHP 8.2+
📚 Learning: 2025-09-11T10:08:22.942Z
Learnt from: CR
Repo: drevops/git-artifact PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-11T10:08:22.942Z
Learning: Applies to {src,tests}/**/*.php : Ensure code passes PHPStan at level 9

Applied to files:

  • composer.json
📚 Learning: 2025-09-11T10:08:22.942Z
Learnt from: CR
Repo: drevops/git-artifact PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-11T10:08:22.942Z
Learning: Applies to {src,tests}/**/*.php : Apply Drupal coding standards (PHPCS) to all project PHP code

Applied to files:

  • composer.json
  • phpcs.xml
📚 Learning: 2025-09-11T10:08:22.942Z
Learnt from: CR
Repo: drevops/git-artifact PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-11T10:08:22.942Z
Learning: Applies to {src,tests}/**/*.php : Use Rector to modernize code to PHP 8.2+

Applied to files:

  • composer.json
🔇 Additional comments (3)
composer.json (2)

66-66: The original review comment is incorrect.

Rector 2.2.8 still supports the --clear-cache flag; it has not been removed or deprecated and is documented and commonly used. The removal of this flag from the composer.json commands (lines 66 and 69) was not necessary and removes a valid caching optimization tool that remains available in the current version.

Likely an incorrect or invalid review comment.


30-30: phpcs-standard 0.6 dependency upgrade is verified as compatible.

Version 0.6.0 introduced rule name changes (LocalVariableSnakeCase → LocalVariableNaming, ParameterSnakeCase → ParameterNaming), but existing configurations using the DrevOps ruleset auto-upgrade. Your phpcs.xml uses <rule ref="DrevOps"/>, which means no manual updates are needed. No deprecated rule names or inline suppressions found in the codebase. The upgrade is safe and backward-compatible for this configuration.

phpcs.xml (1)

10-10: Manual verification required: Confirm the unified DrevOps rule provides equivalent naming convention checks.

I was unable to verify this change definitively:

  1. PHPCS execution failed due to a pre-existing Drupal sniff environmental issue in the sandbox (not caused by this change)
  2. No public documentation available for drevops/phpcs-standard 0.6.0 specifying what the unified DrevOps rule includes
  3. Cannot verify locally that the consolidated rule covers both local variable and parameter naming conventions with the same strictness

Required action: In your local environment, run phpcs src tests after this change to confirm all code passes and that naming convention checks for both local variables and parameters are still enforced by the unified DrevOps rule.


Comment @coderabbitai help to get the list of available commands and usage tips.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/update-drevops-phpcs branch from 71dd766 to 10e4cf3 Compare November 24, 2025 21:38
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.93%. Comparing base (1c48314) to head (10e4cf3).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #220   +/-   ##
=======================================
  Coverage   96.93%   96.93%           
=======================================
  Files           6        6           
  Lines         424      424           
=======================================
  Hits          411      411           
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AlexSkrypnyk AlexSkrypnyk merged commit 3aa878d into main Nov 24, 2025
9 of 10 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/update-drevops-phpcs branch November 24, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants