|
@@ -1,10 +1,9 @@
|
|
|
<?php
|
|
|
namespace App\Service;
|
|
|
|
|
|
-use AppBundle\Entity\User;
|
|
|
+use App\Entity\User;
|
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
|
-use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
|
|
-use Symfony\Component\HttpKernel\HttpKernel;
|
|
|
+use Symfony\Component\HttpKernel\Event\ControllerEvent;
|
|
|
use Symfony\Component\Security\Core\Security;
|
|
|
|
|
|
class ActivityListener
|
|
@@ -18,11 +17,11 @@ class ActivityListener
|
|
|
$this->security = $security;
|
|
|
}
|
|
|
|
|
|
- public function onCoreController(FilterControllerEvent $event)
|
|
|
+ public function onKernelController(ControllerEvent $event)
|
|
|
{
|
|
|
// Check that the current request is a "MASTER_REQUEST"
|
|
|
// Ignore any sub-request
|
|
|
- if ($event->getRequestType() !== HttpKernel::MASTER_REQUEST) {
|
|
|
+ if (!$event->isMasterRequest()) {
|
|
|
return;
|
|
|
}
|
|
|
|