Prezent / doctrine-translatable

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

fix serialization of TranslatableMetadata and TranslationMetadata #42

Closed RobinDvorak closed 2 years ago

RobinDvorak commented 2 years ago

Using parent::serialize and parent::unserialize in class extended from MergeableClassMetadata is deprecated and will be removed in future versions. See: https://github.com/schmittjoh/metadata/blob/2.6.1/src/SerializationHelper.php trait, which is used in MergeableClassMetadata class.

Edit: I also created a Github Actions workflow to run tests on PHP 7.4, 8.0 and 8.1, you can see the results here: https://github.com/RobinDvorak/doctrine-translatable/actions/runs/2747314378

RobinDvorak commented 2 years ago

Added native types to getSubscribedEvents() to TranslatableListener and package should be deprecation free on Symfony 5.4

Method "Doctrine\Common\EventSubscriber::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Prezent\Doctrine\Translatable\EventListener\TranslatableListener" now to avoid errors or add an explicit @return annotation to suppress this message.
sandermarechal commented 2 years ago

Looks great! Thank you!

sandermarechal commented 2 years ago

Tagged 3.3.0 with this