Skip to content

Remove annotation support - #23

Merged
janlam7 merged 7 commits into
hostnet:masterfrom
janlam7:bye-annotations
Sep 15, 2026
Merged

janlam7 merged 7 commits into
hostnet:masterfrom
janlam7:bye-annotations

Conversation

@janlam7

@janlam7 janlam7 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor
  • Removes annotation support
  • Since this will be released as a BC break, the code has been rigorously cleaned up.

janlam7 and others added 7 commits September 14, 2026 10:14
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>
@janlam7 janlam7 self-assigned this Sep 14, 2026
@janlam7
janlam7 merged commit 828204c into hostnet:master Sep 15, 2026
2 of 4 checks passed
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.

2 participants