chore(deps): update cdn77/coding-standard to v7 - #62
Conversation
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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-standardto^7.5and raisephpcs.xml.distphp_versionto80300. - Apply newly enabled sniffs: trailing commas in multiline lists,
T|nullunion 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.
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.
There was a problem hiding this comment.
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;
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:
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.