mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed deprecated use of FlashBag Service
This commit is contained in:
parent
c317bc020a
commit
d0cb7ab486
1 changed files with 5 additions and 2 deletions
|
@ -26,6 +26,8 @@ use App\Services\UserSystem\PermissionSchemaUpdater;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
|
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||||
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
@ -41,12 +43,13 @@ class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface
|
||||||
private FlashBagInterface $flashBag;
|
private FlashBagInterface $flashBag;
|
||||||
private EventCommentHelper $eventCommentHelper;
|
private EventCommentHelper $eventCommentHelper;
|
||||||
|
|
||||||
public function __construct(Security $security, PermissionSchemaUpdater $permissionSchemaUpdater, EntityManagerInterface $entityManager, FlashBagInterface $flashBag, EventCommentHelper $eventCommentHelper)
|
public function __construct(Security $security, PermissionSchemaUpdater $permissionSchemaUpdater, EntityManagerInterface $entityManager, SessionInterface $session, EventCommentHelper $eventCommentHelper)
|
||||||
{
|
{
|
||||||
|
/** @var Session $session */
|
||||||
$this->security = $security;
|
$this->security = $security;
|
||||||
$this->permissionSchemaUpdater = $permissionSchemaUpdater;
|
$this->permissionSchemaUpdater = $permissionSchemaUpdater;
|
||||||
$this->entityManager = $entityManager;
|
$this->entityManager = $entityManager;
|
||||||
$this->flashBag = $flashBag;
|
$this->flashBag = $session->getFlashBag();
|
||||||
$this->eventCommentHelper = $eventCommentHelper;
|
$this->eventCommentHelper = $eventCommentHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue