Support of PHP 8 attributes in Doctrine ORM
See original GitHub issueJust yesterday Doctrine 2.9 has been released: https://www.doctrine-project.org/2021/05/24/orm2.9.html
The major new feature is support of PHP 8 attributes for ORM data mapping in addition to already existing PHPDoc annotations.
But the plugin hasn’t full support of PHP 8 attributes in Doctrine now.
Example 1. Value specified in mappedBy
parameter of OneToMany
association mapping is recognized as entity field and available for “Go to” if the mapping is writted in PHPDoc. But the value is not recognized as field if the mapping is written in attributes.
Example 2. Custom repository type is not inferred from EntityManager::getRepository()
if entity is mapped in attributes.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Doctrine ORM 2.9 with Attributes, Typed Properties, more
We have released a new minor version 2.9 of Doctrine ORM, the first version with support for using PHP 8 Attributes as a...
Read more >How can i use php8 attributes instead of annotations in ...
As @Seb33300 says, yes, it's now possible in Doctrine ORM 2.9. But for Symfony you need to do a little bit more than...
Read more >Doctrine annotations VS PHP8 attributes - GraphQLite
PHP 8 attributes do not support nested attributes (unlike Doctrine annotations). This means there is no equivalent to the annotations attribute ...
Read more >Support of PHP 8 attributes · Issue #2363 - GitHub
This is an issue to keep track the work needed to fully support PHP 8 attributes. In 3.2.0 we added support to use...
Read more >Working with attributes | PHP 8 Programming Tips, Tricks and ...
In order to address hidden dangers, in PHP 8 a new Attribute class is provided. Instead of using DocBlocks with annotations, developers can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
first general attribute metadata support added via: https://github.com/Haehnchen/idea-php-symfony2-plugin/pull/1701