Skip to content

Upgrade CodeSniffer v4#345

Merged
DMarinhoCodacy merged 8 commits into
masterfrom
Upgrade-CS-v4
Jul 13, 2026
Merged

Upgrade CodeSniffer v4#345
DMarinhoCodacy merged 8 commits into
masterfrom
Upgrade-CS-v4

Conversation

@DMarinhoCodacy

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

codacy-production Bot commented Jul 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -1 duplication

Metric Results
Duplication -1

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request cleans up the project's dependencies by removing several coding standards (including Magento, WordPress, Vaimo, and PHPCS Security Audit) from composer.json and updating the remaining ones to newer versions. Correspondingly, the document generator's Scala files and numerous description markdown files associated with the removed standards have been deleted. Additionally, new documentation files have been added for Drupal and PHPCompatibility, and existing Slevomat standard descriptions have been updated to reflect new settings and default values. I have no feedback to provide as there are no review comments to evaluate.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR upgrades the engine to PHP_CodeSniffer v4 and transitions to PHP 8.5, but introduces several risks. Most notably, the Dockerfile configuration is flawed: it installs a redundant PHP package and modifies a configuration file that the primary PHP binary ignores, which will lead to runtime issues.

A regression was found in the documentation generator where the 'explanation' field for patterns is hardcoded to empty, which will degrade the user experience in the UI. Furthermore, the PR removes support for WordPress, Magento, Vaimo, and PHP CS Security Audit standards. While Codacy's automated analysis marks the PR as 'Up to Standards', these manual findings regarding environment setup and documentation logic should be addressed before merging.

About this PR

  • The PR removes support for several major coding standards (WordPress, Magento, Vaimo, and PHP CS Security Audit). Such significant breaking changes should be documented with a justification to help maintainers and users understand the scope reduction.
  • No PR description was provided. Providing context for the upgrade and the removal of legacy standards is recommended.

Test suggestions

  • Missing: Verify documentation generation logic functions correctly after the removal of multiple DocsParser implementations.
  • Missing: Ensure the analysis engine correctly executes sniffs using CodeSniffer 4.0.1 within the environment.
  • Missing: Confirm that the new Drupal and PHPCompatibility patterns added in this PR are correctly parsed and assigned appropriate metadata.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Missing: Verify documentation generation logic functions correctly after the removal of multiple DocsParser implementations.
2. Missing: Ensure the analysis engine correctly executes sniffs using CodeSniffer 4.0.1 within the environment.
3. Missing: Confirm that the new Drupal and PHPCompatibility patterns added in this PR are correctly parsed and assigned appropriate metadata.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread Dockerfile
Comment thread docs/description/description.json Outdated
Comment thread docs/description/SlevomatCodingStandard_Classes_ClassLength.md
@DMarinhoCodacy DMarinhoCodacy merged commit 50db415 into master Jul 13, 2026
5 checks passed
@DMarinhoCodacy DMarinhoCodacy deleted the Upgrade-CS-v4 branch July 13, 2026 13:25
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.

2 participants