-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[meta] Annotations 2.0 (ng) #232
Comments
This was a hotly contested issue in the last attempt to create 2.0, so I'll just link previous discussion: #75 (comment).
If with "dropped in favour of" you mean "implemented generically for any doctrine/cache instance", then I can somewhat live with the change. We should also consider shipping readers that use a PSR-16 or PSR-6 cache given to them. |
this should read as |
@stof Thanks, updated. |
Why write your own docblock parser if the new phpdocumentor docblock parser is able to cover your back? Would be happy to assist with changes if needed |
@jaapio doctrine annotation are not the same than phpdoc. The phpdocumentor parser cannot replace the Doctrine annotation parser. |
With the new design of the package we left room for annotations. Don't know if it would make any sense for you guys. |
What is a current state of this milestones? |
@piotrooo I've cleaned up master (2.0-dev) where namespace has already been changed and most of the deprecated stuff has been dropped too. Now working on introducing new stuff to prepare for the parser replacement. |
@Majkl578 have you any tasks to do? I can help with that release. |
After recent events I no longer intend to work on this. Sorry everyone. |
As v2 isn't here yet, and looking at doctrine#232 it is unclear if will, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined. Fixes doctrine#270
As v2 isn't here yet, and looking at doctrine#232 it is unclear if will, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined. Fixes doctrine#270
As v2 isn't here yet, and looking at doctrine#232 it is unclear if will, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined. Fixes doctrine#270
* Trigger the standard autoloader as the last resort As v2 isn't here yet, and looking at #232 it is unclear if will, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined. Fixes #270 * Do not use standard autoloader with registerFile() * Add tests for fallback autoloading * Update deprecation messages * Update AnnotationRegistry.php Co-authored-by: Andreas Braun <git@alcaeus.org>
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\Annotations
toDoctrine\Annotations
. [Open 2.0 - PHP 7.2, change namespace #193]Dropped features
Some features will be dropped:
SimpleAnnotationReader
- support for so-called unqualified references withoutuse
s 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@Annotation
and__get()
/__set()
safety is ouf of scope of this library [Drop baseAnnotation
ancestor #246]CachedReader
- caching is to be done by consumers when needed [DropCachedReader
#249]DocLexer
,DocParser
anddoctrine/lexer
dependency - 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
@var
to 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)::class
will not produce leading\
(::class
notations with FQCN notation and leading\
causes\
to be part of the produced string value #141)use
in traits ([AnnotationReader] Traits Composed from Traits #81)Any feedback is welcomed, either here or (preferably) on Doctrine Slack in
#annotations-ng-dev
channel.The text was updated successfully, but these errors were encountered: