Cleanup: Drop unused dev dependency and migrate PHPUnit annotations to attributes (Case 212955) - #28
Merged
Merged
Conversation
doctrine/common was listed as a dev dependency but nothing in the codebase depends on it directly. The Doctrine\Common\Collections\* symbols (used in Recipient and PendingOptIn) are provided by doctrine/collections, which is already in require. The Doctrine\Common\EventManager symbol (used in AppClassTemplatesTest) is provided by doctrine/event-manager, a transitive dependency of doctrine/orm. Confirmed with composer-require-checker: no unknown symbols after removal.
PHPUnit 11 deprecates @test and related doc-annotations; PHPUnit 12 removes them. Convert all 24 test files from /** @test */ docblocks to #[Test] attributes. Four methods also used @doesNotPerformAssertions, which PHPUnit 11 silently ignores in docblock form (causing those tests to be reported as risky); those were converted to #[DoesNotPerformAssertions] as well. Also update the phpunit.xml.dist schema URL from 11.0 to 11.5 via --migrate-configuration, which also renames <coverage> to <source>. This clears the last remaining PHPUnit deprecation warning.
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.
doctrine/commonfromrequire-dev— theCollectionsclasses are provided bydoctrine/collections(already inrequire) andDoctrine\Common\EventManagerbydoctrine/event-manager(transitive viadoctrine/orm). Confirmed clean withcomposer-require-checker.@testand@doesNotPerformAssertionsdoc-annotations to#[Test]and#[DoesNotPerformAssertions]PHP 8 attributes across 24 test files. These annotations are deprecated in PHPUnit 11 and removed in PHPUnit 12.phpunit.xml.distschema URL from11.0to11.5and rename<coverage>to<source>, clearing the last PHPUnit deprecation warning.