Skip to content

Remove annotations support - #31

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 the doctrine/annotations dependency
  • Since this will be released as a BC break, the code has been rigorously cleaned up.

janlam7 and others added 5 commits September 14, 2026 08:53
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>
@janlam7 janlam7 self-assigned this Sep 14, 2026
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>
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>
@janlam7
janlam7 merged commit 70dfaa5 into hostnet:master Sep 15, 2026
2 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