You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a meta issue to track Annotations 2.0 milestones/features and aims. It's also a follow-up of #75 which collected some dust over time.
Backward Compatibility
One of the main goals of the 2.0 version is on minimizing breakages of existing annotations and syntax compatibility with Annotations 1.x. Therefore, when talking about custom annotations and docblocks, most of the user-land stuff should work without any significant effort or none at all. However most of the internal stuff is expected to be changed.
Doctrine\Common\Annotations\Annotation - behavior of this class is redundant with @Annotation and __get()/__set() safety is ouf of scope of this library [Drop base Annotation ancestor #246]
Scope - holds information about subject (origin), active imports, ignored annotations and nesting level
Reference resolver - resolves unqualified annotation references based on given scope and strategy
Property type parser - parses @var to constraint value types
Assembling
Annotation assembler - builds actual annotation objects based on AST and metadata
Acceptor - determines whether visited annotation AST node should produce an annotation or be skipped (used to build internal/public or skip ignored annotations)
Annotations 2.0 (ng)
This is a meta issue to track Annotations 2.0 milestones/features and aims. It's also a follow-up of #75 which collected some dust over time.
Backward Compatibility
One of the main goals of the 2.0 version is on minimizing breakages of existing annotations and syntax compatibility with Annotations 1.x. Therefore, when talking about custom annotations and docblocks, most of the user-land stuff should work without any significant effort or none at all. However most of the internal stuff is expected to be changed.
Namespace change
Doctrine\Common\AnnotationstoDoctrine\Annotations. [Open 2.0 - PHP 7.2, change namespace #193]Dropped features
Some features will be dropped:
SimpleAnnotationReader- support for so-called unqualified references withoutuses are dropped [Drop SimpleAnnotationReader #199]AnnotationRegistry- no more annoying autoloader stuff, annotations are now autoloaded implicitly [Eliminate AnnotationRegistry, rely on autoloading only #205]FileCacheReader- dropped in favor of CachedReader (based on doctrine/cache) [Drop deprecated FileCacheReader #202]Doctrine\Common\Annotations\Annotation- behavior of this class is redundant with@Annotationand__get()/__set()safety is ouf of scope of this library [Drop baseAnnotationancestor #246]CachedReader- caching is to be done by consumers when needed [DropCachedReader#249]DocLexer,DocParseranddoctrine/lexerdependency - these will be replaced by new AST-based parserNew parser
Initial work is split into three different stages and will come as a new code without refactoring existing stuff:
@Annotation@varto constraint value types@var)Other problems to likely be resolved (but not guaranteed)
Generally issues marked with 2.0 milestone. Notably:
@var(DCOM-253: Support use statements for annotations property type #86)@var(Assumption about value type causes parsing error #185 + DocParser does not interpret/validate multiple type docblocks correctly on annotation properties. #129)::classwill not produce leading\(::classnotations with FQCN notation and leading\causes\to be part of the produced string value #141)usein traits ([AnnotationReader] Traits Composed from Traits #81)Any feedback is welcomed, either here or (preferably) on Doctrine Slack in
#annotations-ng-devchannel.