doctrine-extensions / DoctrineExtensions

Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable
MIT License
4.01k stars 1.26k forks source link

Update TimestampableEntity.php for compat with ORM v3 #2757

Closed andreybolonin closed 4 months ago

andreybolonin commented 4 months ago

https://github.com/doctrine-extensions/DoctrineExtensions/issues/2708#issuecomment-1931650181

mbabker commented 4 months ago

This is an incorrect fix as it removes annotation support entirely. The presence of annotations when installed alongside ORM 3.0 in and of itself isn't an issue, unless, your application is still using annotations for something outside the ORM and this package's mapping and those annotations are being read by that process. In that case, you should add a call to Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredNamespace('Doctrine\ORM\Mapping') so the annotation reader service in your application ignores the ORM's mapping classes.

As well, this package does not yet support ORM 3.0. You should downgrade your application to ORM 2.18 and continue using that until all dependencies are compatible with the new major release.

mishac commented 4 months ago

In that case shouldn't the composer.json indicate the conflict with ORM > 2?

mbabker commented 4 months ago

In that case shouldn't the composer.json indicate the conflict with ORM > 2?

Probably should've been done sooner, but #2759

franmomu commented 4 months ago

Closing as this is not right as explained in https://github.com/doctrine-extensions/DoctrineExtensions/pull/2757#issuecomment-1934260512