DoctrineBehaviors
DoctrineBehaviors copied to clipboard
Symfony deprecations
Hi,
In SF 6.3 they are deprecations about listener to go to SF 7.0 :
Since symfony/doctrine-bridge 6.3: Registering "Knp\DoctrineBehaviors\EventSubscriber\TimestampableEventSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.
This is all concerned classes :
Knp\DoctrineBehaviors\EventSubscriber\BlameableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\LoggableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\SluggableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\SoftDeletableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\TimestampableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\TranslatableEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\TreeEventSubscriber
Knp\DoctrineBehaviors\EventSubscriber\UuidableEventSubscriber
I see an other deprecation :
Since symfony/security-bundle 6.2: The "Symfony\Component\Security\Core\Security" service alias is deprecated, use "Symfony\Bundle\SecurityBundle\Security" instead. It is being referenced by the "Knp\DoctrineBehaviors\Provider\UserProvider" service.
Bu I think It's related to this PR => https://github.com/KnpLabs/DoctrineBehaviors/pull/727
@Ciloe The different deprecation you mention are not linked.
Concerning the first one, we should use the AsDoctrineListener
attribute in replacement of implementing the EventSubscriberInterface. I'm going to open a PR but the AsDoctrineListener
attribute have been introduced as part of https://github.com/doctrine/DoctrineBundle 2.8.x so I will have to change the constraint to "doctrine/doctrine-bundle": "^2.6"
to "doctrine/doctrine-bundle": "^2.8"
.
@raziel057 thanks for opening an update pull