Skip to content

Refactor/analysis merge annotation#2031

Merged
DerManoMann merged 2 commits into
zircote:masterfrom
DerManoMann:refactor/analysis-merge-annotation
Jun 29, 2026
Merged

Refactor/analysis merge annotation#2031
DerManoMann merged 2 commits into
zircote:masterfrom
DerManoMann:refactor/analysis-merge-annotation

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Summary

  • Add Analysis::mergeAnnotations() combining tree placement (merge()) with registry registration (addAnnotation())
  • Migrate 6 processors: MergeIntoOpenApi, MergeIntoComponents, AugmentSchemas, AugmentParameters, AugmentTags, BuildPaths
  • Guarantees all annotations in the tree are discoverable via getAnnotationsOfType()
  • Standardize nested context values to null (was $this/false)
  • Add ADR-002 documenting registries and tree architecture

Test plan

  • All 1037 existing tests pass
  • phpstan clean

DerManoMann and others added 2 commits June 29, 2026 20:20
…eness

Processors that create annotations via merge() previously needed to
separately call addAnnotation() to register them. This was error-prone
and left the registries incomplete. mergeAnnotations() combines both
operations, closing the gap between the annotation tree and the flat
registry index.

Migrated processors: MergeIntoOpenApi, MergeIntoComponents,
AugmentSchemas, AugmentParameters, AugmentTags, BuildPaths.

Also fixes incorrect 'nested' context value in AugmentParameters
($this -> null).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…actory

The 'nested' context flag uses null to mean "no parent" and an
AbstractAnnotation instance to mean "has parent". The value false
was inconsistent with this convention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DerManoMann DerManoMann force-pushed the refactor/analysis-merge-annotation branch from c045ece to 471cd91 Compare June 29, 2026 08:23
@DerManoMann DerManoMann merged commit 500560f into zircote:master Jun 29, 2026
17 checks passed
@DerManoMann DerManoMann deleted the refactor/analysis-merge-annotation branch June 29, 2026 08:34
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.

1 participant