Repository navigation
Remove annotation support - #23
Merged
Merged
Conversation
janlam7
commented
Sep 14, 2026
Contributor
- Removes annotation support
- Since this will be released as a BC break, the code has been rigorously cleaned up.
The docs were still describing the doctrine/annotations-based @revision annotation and EntityAnnotationMetadataProvider wiring, which no longer exist now that the component only supports the #[Revision] attribute. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… gone Add return type hints to RevisionableInterface, RevisionInterface and RevisionFactoryInterface (fulfilling the @todo left for this exact BC break), and simplify the code that relied on their previously loose typing. Also removes RevisionListener::preFlush(), deprecated since 1.1 and explicitly slated for removal once doctrine/annotations support was dropped. Along the way: fix a broken sprintf() call that meant the entity class was never actually logged, use $entity::class instead of get_class(), and tighten type hints on private/internal methods and tests. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
withConsecutive() is deprecated since phpunit/phpunit 9.6 and removed entirely in 10.x. Replaced with willReturnCallback() collecting the call arguments into an array, asserted afterwards. This also fixes the persist() expectation, which previously only verified the first two of the three actual calls (withConsecutive's parameter sets didn't cover the third). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
v2 runs on the Node16 runtime GitHub is deprecating, same class of issue already fixed for actions/cache in a prior commit and just applied to entity-tracker-component's own workflow too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mirrors the same change just made to entity-blamable-component's BlamableInterface setters, part of the same coordinated modernization pass. Update the README's entity example and UPGRADE-2.0.md accordingly, and exclude phpcs.xml.dist from git-archive exports (also mirrored from entity-blamable-component). The existing RevisionListenerTest mock for setRevision() needed its willReturnCallback() swapped for with($this->callback(...)): a void-returning callback used as the stub now fails the mock's static return type, whereas leaving the return value unconfigured lets PHPUnit's auto-generated mock satisfy it by returning $this. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mirrors entity-mutation-component's own modernization pass: - #[\Override] on RevisionResolver's interface-implementing methods, replacing a now-redundant @see docblock. - actions/checkout v4 -> v7 and actions/cache v4 -> v6; GitHub is dropping the Node 20 Actions runtime on 2026-09-23, and both were still pinned to old majors. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
phonixor
approved these changes
Sep 15, 2026
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.