Skip to content

chore(deps): update cdn77/coding-standard to v7 - #62

Merged
trearcul merged 1 commit into
cdn77:masterfrom
trearcul:update-phpcs
Aug 25, 2026
Merged

trearcul merged 1 commit into
cdn77:masterfrom
trearcul:update-phpcs

Conversation

@trearcul

Copy link
Copy Markdown
Collaborator

Raises php_version in phpcs.xml.dist from 70400 to 80300 to match the minimum PHP version the package actually supports.

Applies the sniffs the upgrade turned on:

  • trailing commas in multi-line calls and declarations
  • nullable types written as T|null rather than ?T
  • native type hints on class constants, now that PHP 8.3 is the floor

Excludes Cdn77.NamingConventions.ValidConstantName. Its pattern rejects underscores, so satisfying it would mean renaming public constants such as Configuration::KEY_BINDING_EXCHANGE and breaking backwards compatibility for consumers of the bundle.

@trearcul
trearcul requested review from judzi and a lite review from Copilot August 24, 2026 15:23
@codecov-commenter

codecov-commenter commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.63158% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.46%. Comparing base (ed515ba) to head (1e74e83).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/Exception/ConfigurationFailed.php 0.00% 4 Missing ⚠️
src/RabbitMQ/Operation/PublishOperation.php 0.00% 4 Missing ⚠️
src/DependencyInjection/ConsumerCompilerPass.php 0.00% 2 Missing ⚠️
src/DependencyInjection/RabbitMQExtension.php 0.00% 2 Missing ⚠️
src/RabbitMQ/Operation/RejectOperation.php 0.00% 2 Missing ⚠️
src/Configuration/Dsn.php 66.66% 1 Missing ⚠️
src/Console/ConsumerCommand.php 0.00% 1 Missing ⚠️
src/RabbitMQ/Operation/AcknowledgeOperation.php 50.00% 1 Missing ⚠️
src/SetupAction.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   51.98%   52.46%   +0.47%     
==========================================
  Files          29       29              
  Lines         654      650       -4     
==========================================
+ Hits          340      341       +1     
+ Misses        314      309       -5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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

Updates the project’s PHP coding standard tooling and applies the newly enforced style/type rules across the bundle to align the codebase with PHP 8.3+.

Changes:

  • Bump cdn77/coding-standard to ^7.5 and raise phpcs.xml.dist php_version to 80300.
  • Apply newly enabled sniffs: trailing commas in multiline lists, T|null union notation, and typed class constants.
  • Adjust PHPCS exclusions for constant naming rules to avoid BC-breaking renames.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/RabbitMQBundleTest.php Adds trailing comma in multiline assertion call.
tests/RabbitMQ/Consumer/ConfigurationTest.php Adds trailing comma in multiline constructor call.
tests/ConsumerRunnerTest.php Adds trailing commas in multiline constructor/topology config.
tests/Configuration/DsnTest.php Switches nullable params to `T
src/SetupAction.php Adds trailing commas to multiline AMQP client calls.
src/RabbitMQ/Queue.php Adds trailing commas in multiline argument lists.
src/RabbitMQ/Operation/RejectOperation.php Adds trailing commas in multiline AMQP client calls.
src/RabbitMQ/Operation/PublishOperation.php Adds typed class constants + trailing commas in calls/throws.
src/RabbitMQ/Operation/AcknowledgeOperation.php Adds trailing commas in multiline AMQP client calls.
src/RabbitMQ/Message.php Adds typed class constants for header names.
src/RabbitMQ/ExchangeType.php Adds typed class constants for exchange type strings.
src/RabbitMQ/Exchange.php Adds trailing commas in multiline argument lists.
src/RabbitMQ/DeliveryMode.php Adds typed class constants for numeric delivery modes.
src/RabbitMQ/Consumer/Configuration.php Switches nullable types to `T
src/RabbitMQ/Binding.php Adds trailing comma in multiline constructor call.
src/Exception/ConfigurationFailed.php Adds trailing commas in multiline sprintf usage.
src/DependencyInjection/RabbitMQExtension.php Adds typed class constant and trailing commas in DI setup.
src/DependencyInjection/ConsumerCompilerPass.php Adds typed class constant and trailing commas in Definition.
src/DependencyInjection/Configuration.php Adds typed class constants for config keys/defaults.
src/ConsumerRunner.php Switches nullable types to `T
src/Console/SetUpCommand.php Adds typed private class constants.
src/Console/ConsumerListCommand.php Adds typed private class constants.
src/Console/ConsumerCommand.php Adds typed private class constants + trailing comma in arg definition.
src/Configuration/Topology.php Adds trailing commas in multiline Binding::fromConfiguration calls.
src/Configuration/Dsn.php Adds typed private class constants, `T
src/Configuration/Connection.php Adds typed private class constants, `T
phpcs.xml.dist Raises php_version to 80300 and adds an exclusion for a constant-name rule.
composer.json Updates cdn77/coding-standard to ^7.5.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/RabbitMQ/Operation/PublishOperation.php Outdated
Comment thread src/DependencyInjection/Configuration.php
Raises php_version in phpcs.xml.dist from 70400 to 80300 to match the
minimum PHP version the package actually supports.

Applies the sniffs the upgrade turned on:

- trailing commas in multi-line calls and declarations
- nullable types written as T|null rather than ?T
- native type hints on class constants, now that PHP 8.3 is the floor

Excludes Cdn77.NamingConventions.ValidConstantName. Its pattern rejects
underscores, so satisfying it would mean renaming public constants such
as Configuration::KEY_BINDING_EXCHANGE and breaking backwards
compatibility for consumers of the bundle.

Copilot AI 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

Copilot reviewed 28 out of 28 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/DependencyInjection/Configuration.php:38

  • Typo in constant name DEAFULT_READ_WRITE_TIMEOUT. Since its usages are outside this hunk, a safe way to fix without missing any call sites is to introduce the correctly spelled constant and keep the misspelled one as an alias.
    private const string DEFAULT_DSN = 'amqp://127.0.0.1/';
    private const int DEFAULT_HEARTBEAT = 60;
    private const int DEFAULT_TIMEOUT = 10;
    private const int DEAFULT_READ_WRITE_TIMEOUT = 3;

@trearcul
trearcul merged commit 76bbc00 into cdn77:master Aug 25, 2026
8 checks passed
@trearcul
trearcul deleted the update-phpcs branch August 25, 2026 10:40
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.

4 participants