We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hi!
this is a bug report/question.
In doctrine persistence LifecycleEventArgs class as parentclass and doctrine orm LifecycleEventArgs as child class
the method getEntity is deprecated and will be removed in parentclass: https://github.com/doctrine/persistence/blob/2.5.x/src/Persistence/Event/LifecycleEventArgs.php#L39
getEntity
but overwritten and not deprecated and will be kept in child class: https://github.com/doctrine/orm/blob/2.12.x/lib/Doctrine/ORM/Event/LifecycleEventArgs.php#L23
When I use phpstan with deprecation rules on my class
<?php declare(strict_types=1); namespace App\EventSubscriber; use Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface; use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Events; class MySubscriber implements EventSubscriberInterface { public function getSubscribedEvents(): array { return [Events::postPersist]; } public function postPersist(LifecycleEventArgs $args): void { $entity = $args->getEntity(); // ... } }
I got the error message:
Call to deprecated method getEntity() of class Doctrine\ORM\Event\LifecycleEventArgs.
Looks like the detprecated state is inherited. Is it a bug, or is it expected?
The text was updated successfully, but these errors were encountered:
This is expected behaviour. See: #48, phpstan/phpstan-src#792, #50
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Hi!
this is a bug report/question.
In doctrine persistence LifecycleEventArgs class as parentclass and doctrine orm LifecycleEventArgs as child class
the method
getEntity
is deprecated and will be removed in parentclass:https://github.com/doctrine/persistence/blob/2.5.x/src/Persistence/Event/LifecycleEventArgs.php#L39
but overwritten and not deprecated and will be kept in child class:
https://github.com/doctrine/orm/blob/2.12.x/lib/Doctrine/ORM/Event/LifecycleEventArgs.php#L23
When I use phpstan with deprecation rules on my class
I got the error message:
Looks like the detprecated state is inherited. Is it a bug, or is it expected?
The text was updated successfully, but these errors were encountered: