Task: Remove deprecations
This commit is contained in:
@@ -27,14 +27,6 @@ services:
|
||||
- name: liip_imagine.cache.resolver
|
||||
resolver: format_extension
|
||||
|
||||
App\EventListener\BlamableEntitySubscriber:
|
||||
tags:
|
||||
- { name: 'doctrine.event_subscriber', connection: 'default' }
|
||||
|
||||
App\EventListener\TimestampableEntitySubscriber:
|
||||
tags:
|
||||
- { name: 'doctrine.event_subscriber', connection: 'default' }
|
||||
|
||||
App\EventListener\LogoutListener:
|
||||
tags:
|
||||
- name: kernel.event_listener
|
||||
@@ -97,11 +89,6 @@ services:
|
||||
event: oneup_uploader.validation
|
||||
method: onValidate
|
||||
|
||||
App\EventListener\DeleteUploadListener:
|
||||
tags:
|
||||
- name: doctrine.event_listener
|
||||
event: preRemove
|
||||
|
||||
app.upload_namer:
|
||||
class: App\Service\Upload\UploadNamer
|
||||
public: true
|
||||
|
||||
+4
-10
@@ -3,14 +3,16 @@
|
||||
namespace App\EventListener;
|
||||
|
||||
use App\Entity\BlameableEntityInterface;
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
|
||||
use Doctrine\ORM\Event\PrePersistEventArgs;
|
||||
use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
use Doctrine\ORM\Events;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
class BlamableEntitySubscriber implements EventSubscriber
|
||||
#[AsDoctrineListener(event: Events::prePersist)]
|
||||
#[AsDoctrineListener(event: Events::preUpdate)]
|
||||
class BlamableEntityListener
|
||||
{
|
||||
/**
|
||||
* Properties that are ignored when determining
|
||||
@@ -26,14 +28,6 @@ class BlamableEntitySubscriber implements EventSubscriber
|
||||
public function __construct(private readonly Security $security)
|
||||
{}
|
||||
|
||||
public function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
Events::prePersist,
|
||||
Events::preUpdate,
|
||||
];
|
||||
}
|
||||
|
||||
public function prePersist(PrePersistEventArgs $args): void
|
||||
{
|
||||
$entity = $args->getObject();
|
||||
@@ -4,9 +4,12 @@ namespace App\EventListener;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Service\Upload\UploadHandler;
|
||||
use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
|
||||
use Doctrine\ORM\Event\PreRemoveEventArgs;
|
||||
use Doctrine\ORM\Events;
|
||||
use Liip\ImagineBundle\Imagine\Cache\CacheManager;
|
||||
|
||||
#[AsDoctrineListener(event: Events::preRemove)]
|
||||
class DeleteUploadListener
|
||||
{
|
||||
public function __construct(
|
||||
|
||||
+4
-10
@@ -3,21 +3,15 @@
|
||||
namespace App\EventListener;
|
||||
|
||||
use App\Entity\TimestampableEntityInterface;
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
|
||||
use Doctrine\ORM\Event\PrePersistEventArgs;
|
||||
use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
use Doctrine\ORM\Events;
|
||||
|
||||
class TimestampableEntitySubscriber implements EventSubscriber
|
||||
#[AsDoctrineListener(event: Events::prePersist)]
|
||||
#[AsDoctrineListener(event: Events::preUpdate)]
|
||||
class TimestampableEntityListener
|
||||
{
|
||||
public function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
Events::prePersist,
|
||||
Events::preUpdate,
|
||||
];
|
||||
}
|
||||
|
||||
public function prePersist(PrePersistEventArgs $args): void
|
||||
{
|
||||
$entity = $args->getObject();
|
||||
Reference in New Issue
Block a user