KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
912 stars 286 forks source link

LifecycleEventArgs::getEntity() is deprecated #733

Open alveri opened 1 year ago

alveri commented 1 year ago

deprecation.INFO: User Deprecated: Method Doctrine\ORM\Event\LifecycleEventArgs::getEntity() is deprecated and will be removed in Doctrine ORM 3.0. Use getObject() instead. (LifecycleEventArgs.php:49 called by TranslatableEventSubscriber.php:164, https://github.com/doctrine/orm/issues/9875, package doctrine/orm) {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method Doctrine\ORM\Event\LifecycleEventArgs::getEntity() is deprecated and will be removed in Doctrine ORM 3.0. Use getObject() instead. (LifecycleEventArgs.php:49 called by TranslatableEventSubscriber.php:164, https://github.com/doctrine/orm/issues/9875, package doctrine/orm) at ../vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php:195)

marcin-janowski-teb commented 9 months ago

There is more deprecation for php 8.1, 8.2 and ex 6.3 / 6.4 symfony release. I'm linking to the post and it's nice to know whether there will be a new release / upgrade or whether other libraries / own solution should be included. Regards

tacman commented 7 months ago

I've added a PR for this, but it's complicated by whether or not the bundle will continue to support versions that are not longer supported by Symfony (e.g. 6.0 and 6.1).

I've been reviewing the issues and PRs, it seems like this is a great point to create a version 3 branch that only supports 6.4 and ^7.

In addition to Symfony 7 coming in a few days, Doctrine DBAL 4 is at Release Candidate 1, which of course we'll want to support.