Fixed some deprecations

This commit is contained in:
Jan Böhmer 2023-06-11 17:38:08 +02:00
parent df8f54f5a4
commit 219b57a362
35 changed files with 42 additions and 54 deletions

View file

@ -21,6 +21,7 @@
namespace App\Doctrine;
use App\Exceptions\InvalidRegexException;
use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
use Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface;
use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events;
@ -31,7 +32,8 @@ use Doctrine\DBAL\Platforms\SqlitePlatform;
* As a PHP callback is called for every entry to compare it is most likely much slower than using regex on MySQL.
* But as regex is not often used, this should be fine for most use cases, also it is almost impossible to implement a better solution.
*/
class SQLiteRegexExtension implements EventSubscriberInterface
#[AsDoctrineListener(Events::postConnect)]
class SQLiteRegexExtension
{
public function postConnect(ConnectionEventArgs $eventArgs): void
{
@ -53,11 +55,4 @@ class SQLiteRegexExtension implements EventSubscriberInterface
}
}
}
public function getSubscribedEvents(): array
{
return[
Events::postConnect
];
}
}