Remove annotations support - #31
Merged
Merged
Conversation
janlam7
commented
Sep 14, 2026
Contributor
- Removes the doctrine/annotations dependency
- Since this will be released as a BC break, the code has been rigorously cleaned up.
Remove the deprecated docblock-annotation Mutation marker and its resolver/listener support in favor of the PHP attribute added in hostnet#30. Bump hostnet/entity-tracker-component to ^3.0.0 and update the functional test fixtures and setup to use Doctrine's AttributeDriver instead of AnnotationDriver. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Add #[\Override] on interface/parent-overriding methods. - Type-hint MutationAwareInterface and MutationResolverInterface (the former's TODO to do so "on next BC break" is now resolved). - Use constructor property promotion for entity/embeddable fixtures, including promoting Doctrine mapping attributes onto the params. - Replace switch/case strategy dispatch in MutationListener with match. - Use spaceship operator + arrow functions for the mutation usort() comparators, and static return types for fluent setters. - Remove PHPDoc that only restated a typed signature, and drop the dead references to the deleted docblock-only Mutation annotation class and a never-existing MockEntity left in the test mocks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tests Replace the deprecated Doctrine\ORM\Tools\Setup and EntityManager::create() with ORMSetup::createAttributeMetadataConfiguration() and DriverManager::getConnection() + the EntityManager constructor. Also enable lazy ghost objects and a DBAL schema manager factory, and opt into AttributeDriver's reportFieldsWhereDeclared mode, since all of these are otherwise deprecated defaults heading into Doctrine 3.0. Replace EmbeddableTest's flush($client) calls with flush(), since flushing a specific entity is deprecated too. Verified zero Doctrine deprecation triggers remain (via Deprecation::enableWithTriggerError()) and the full suite still passes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both were pinned to old major versions (v2 and v4). actions/checkout@v2 in particular predates GitHub's Node 20 runtime, which Actions runners stop supporting entirely on 2026-09-23. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the docblock @mutation annotation examples with the #[Mutation] attribute, drop the removed prePersist listener registration and the class option (no longer supported by the attribute), rename EntityAnnotationMetadataProvider to EntityMetadataProvider, and bump the stated PHP requirement to 8.3. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
phonixor
approved these changes
Sep 14, 2026
setLazyGhostObjectEnabled(true) requires a Symfony trait removed in var-exporter 8.0, which a fresh PHP 8.4 CI install resolves, crashing the functional tests. It only silenced a harmless ORM 3.0 deprecation notice, so drop it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.