Skip to content

Commit d8ea88c

Browse files
committed
[FrameworkBundle] Replace container by service locator in SessionListener
1 parent 0976c86 commit d8ea88c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\EventListener;
1313

14+
use Psr\Container\ContainerInterface;
1415
use Symfony\Component\HttpKernel\EventListener\SessionListener as BaseSessionListener;
15-
use Symfony\Component\DependencyInjection\ContainerInterface;
1616

1717
/**
1818
* Sets the session in the request.

src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949

5050
<service id="session_listener" class="Symfony\Bundle\FrameworkBundle\EventListener\SessionListener">
5151
<tag name="kernel.event_subscriber" />
52-
<argument type="service" id="service_container" />
52+
<argument type="service-locator">
53+
<argument key="session" type="service" id="session" on-invalid="null" />
54+
</argument>
5355
</service>
5456

5557
<service id="session.save_listener" class="Symfony\Component\HttpKernel\EventListener\SaveSessionListener">

0 commit comments

Comments
 (0)