-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Description
Doctrine Annotations have served us well, but PHP attributes are the future.
Our strategy for Symfony 6 was to support Doctrine Annotations and PHP attributes as two ways of annotating pieces of configuration to code. In Symfony 7, attributes will be the only supported way. However, we still use the word "annotation" in the codebase in an abstract sense (PHP attributes are a form of annotation). This might be confusing, so we might consider using the work "attribute" everywhere consistently.
I've opened this issue to collect all occurrences of the term and to discuss the possible impact on downstream projects.
- The
serializerintegration of FrameworkBundle exposes a configuration optionenable_annotations. Rename toenable_attributes. - The
validationintegration of FrameworkBundle exposes a configuration optionenable_annotations. Rename toenable_attributes. - The Routing and Serializer components organize their attribute classes in a namespace called
Annotation. Rename that namespace toAttribute. - When loading routes from attributes, the loader type is
annotationalthoughattributeis already an alias for that. Makeattributethe only possible type. - Serializer uses a class named
AnnotationLoaderto load metadata from attributes. Rename toAttributeLoader. - Validation uses a class named
AnnotationLoaderto load metadata from attributes. Rename toAttributeLoader. - Routing contains classes
AnnotationClassLoaderandAnnotationDirectoryLoaderfor loading routes from attributes. Rename toAttributeClassLoaderandAttributeDirectoryLoader.
If you find more TODOs, please drop a comment.
dmaicher, maxbeckers, Valmonzo, chalasr, ker0x and 5 more
Metadata
Metadata
Assignees
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)