Prezent / doctrine-translatable

Translatable behaviour extension for Doctrine2
MIT License
26 stars 17 forks source link

Fix usage with doctrine/orm 2.12.0 #41

Closed RobinDvorak closed 2 years ago

RobinDvorak commented 2 years ago

doctrine/orm 2.12.0 introduced BC break:

AttributeDriver and AnnotationDriver no longer extends parent class from doctrine/persistence
Both these classes used to extend an abstract AnnotationDriver class defined in doctrine/persistence, and no longer do.

See: https://github.com/doctrine/orm/blob/2.12.x/UPGRADE.md#bc-break-attributedriver-and-annotationdriver-no-longer-extends-parent-class-from-doctrinepersistence

I had to add doctrine/annotations to composer.json to make tests pass. Maybe doctrine/bundle should be required too, if DoctrineAdapter class is using Doctrine\Bundle\DoctrineBundle\Mapping\MappingDriver?

image

I am not sure if this is intentional or error caused by new versions of doctrine. Seeing this package for the first time on new project. Let me know if you think this should be fixed too.

RobinDvorak commented 2 years ago

doctrine/orm fixes this issue in v2.12.1. See https://github.com/doctrine/orm/pull/9671

But this fix will be removed in doctrine/orm v3.0 (mentioned here: https://github.com/doctrine/orm/pull/9671/files#diff-237a7d24fcc9a6e9ce16e9e17e844ee6960898377cc91af675598cf68ed929f6R14), so this PR is still valid in my opinion.

sandermarechal commented 2 years ago

Merged. Apologies that it took some time. I've tagged 3.2.0 with these changes.