Combining PHP 8 attributes with old style annotations #8925
Unanswered
jelovac
asked this question in
Support Questions
Replies: 1 comment 1 reply
-
They will be ignored. It might be possible to define two mappings, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can we combine attributes and old style annotations when working with entities which belong to the same namespace? I am involved in refactoring and migrating some legacy codebase to Symfony 5 and would like to gradually replace the old style annotations in entities with PHP 8 attributes.
According to some discussion on StackOverflow in order to enable PHP 8 Attributes support in Symfony 5 we had to change the mapping type from "annotation" to "attribute" like in the example below:
So according to the above example will old style annotations be ignored or parsed as well?
Beta Was this translation helpful? Give feedback.
All reactions