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
I tried to refactor an application to use Doctrine ORM Attributes, however this leads to an error in TsVectorSubscriber.php line 178 as no ColumnAnnotation can be found anymore (its an Attibute now).
Unfortunatly, it requires some workarounds to support attributes and annotations at the same time in the same doctrine mapping space. So it is not nice to need to keep all entities in the same mapping space with "old" annotations. I suggest to first use the Reflection APIs ::getAttributes() in TsVectorSubscriber.php line 178 and if this fails use the Doctrine/AnnotationReader only.
For concistency I suggest to also move the Annotations of this package to support Attributes too (No BC break should be needed). Here is how Doctrine supports both on the same class:
The Doctrine ORM package achieves continued compatibility with PHP <8.0 by using symfony/polyfill-php80, so I would recommend the same.
I only have too few usages, but one could potentially create a rector rule for the migration as well.
If its wanted I am willing to try and create a PR in the next days.
The text was updated successfully, but these errors were encountered:
Hey,
I tried to refactor an application to use Doctrine ORM Attributes, however this leads to an error in TsVectorSubscriber.php line 178 as no Column Annotation can be found anymore (its an Attibute now).
Unfortunatly, it requires some workarounds to support attributes and annotations at the same time in the same doctrine mapping space. So it is not nice to need to keep all entities in the same mapping space with "old" annotations. I suggest to first use the Reflection APIs
::getAttributes()
in TsVectorSubscriber.php line 178 and if this fails use theDoctrine/AnnotationReader
only.For concistency I suggest to also move the Annotations of this package to support Attributes too (No BC break should be needed). Here is how Doctrine supports both on the same class:
The Doctrine ORM package achieves continued compatibility with PHP <8.0 by using symfony/polyfill-php80, so I would recommend the same.
I only have too few usages, but one could potentially create a rector rule for the migration as well.
If its wanted I am willing to try and create a PR in the next days.
The text was updated successfully, but these errors were encountered: