mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Fixed some deprecations
This commit is contained in:
parent
df8f54f5a4
commit
219b57a362
35 changed files with 42 additions and 54 deletions
|
@ -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
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue