Fix deprecated code

pull/3064/head
Julio 5 years ago
parent d256188076
commit 9897b7c94a
  1. 2
      config/packages/php_translation.yaml
  2. 8
      src/CoreBundle/EventListener/OnlineListener.php
  3. 5
      src/CoreBundle/EventListener/ResourceUploadListener.php

@ -3,7 +3,7 @@ translation:
edit_in_place:
enabled: true
config_name: app
activator: php_translation.edit_in_place.activator
#activator: php_translation.edit_in_place.activator
configs:
app:
dirs: ["%kernel.project_dir%/var/templates", "%kernel.project_dir%/src"]

@ -6,8 +6,8 @@ namespace Chamilo\CoreBundle\EventListener;
use Chamilo\UserBundle\Entity\User;
use DateTime;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@ -20,7 +20,7 @@ class OnlineListener
protected $context;
protected $em;
public function __construct(TokenStorageInterface $context, ObjectManager $em)
public function __construct(TokenStorageInterface $context, EntityManagerInterface $em)
{
$this->em = $em;
$this->context = $context;
@ -29,7 +29,7 @@ class OnlineListener
/**
* Update the user "lastActivity" on each request.
*/
public function onCoreController(FilterControllerEvent $event)
public function onCoreController(ControllerEvent $event)
{
/* Here we are checking that the current request is a "MASTER_REQUEST",
and ignore any subrequest in the process (for example when doing a

@ -5,7 +5,6 @@
namespace Chamilo\CoreBundle\EventListener;
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Oneup\UploaderBundle\Event\PostPersistEvent;
use Oneup\UploaderBundle\Uploader\Response\ResponseInterface;
use Symfony\Component\Routing\RouterInterface;
@ -15,10 +14,6 @@ use Symfony\Component\Routing\RouterInterface;
*/
class ResourceUploadListener
{
/**
* @var ObjectManager
*/
//private $om;
private $router;
/**

Loading…
Cancel
Save