File tree 4 files changed +18
-30
lines changed
Bundle/FrameworkBundle/Resources/config
Component/HttpKernel/EventListener
4 files changed +18
-30
lines changed Original file line number Diff line number Diff line change 53
53
54
54
<service id =" session_listener" class =" Symfony\Component\HttpKernel\EventListener\SessionListener" >
55
55
<tag name =" kernel.event_subscriber" />
56
- <tag name =" container.service_subscriber" id =" session" />
57
- <argument type =" service" id =" container" />
56
+ <argument type =" service" >
57
+ <service class =" Symfony\Component\DependencyInjection\ServiceLocator" >
58
+ <tag name =" container.service_locator" />
59
+ <argument type =" collection" >
60
+ <argument key =" session" type =" service" id =" session" on-invalid =" ignore" />
61
+ </argument >
62
+ </service >
63
+ </argument >
58
64
</service >
59
65
60
66
<service id =" session.save_listener" class =" Symfony\Component\HttpKernel\EventListener\SaveSessionListener" >
Original file line number Diff line number Diff line change 22
22
23
23
<service id =" test.session.listener" class =" Symfony\Component\HttpKernel\EventListener\TestSessionListener" >
24
24
<tag name =" kernel.event_subscriber" />
25
- <tag name =" container.service_subscriber" id =" session" />
26
- <argument type =" service" id =" container" />
25
+ <argument type =" service" >
26
+ <service class =" Symfony\Component\DependencyInjection\ServiceLocator" >
27
+ <tag name =" container.service_locator" />
28
+ <argument type =" collection" >
29
+ <argument key =" session" type =" service" id =" session" on-invalid =" ignore" />
30
+ </argument >
31
+ </service >
32
+ </argument >
27
33
</service >
28
34
</services >
29
35
</container >
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \HttpKernel \EventListener ;
13
13
14
14
use Psr \Container \ContainerInterface ;
15
- use Symfony \Component \DependencyInjection \ServiceSubscriberInterface ;
16
- use Symfony \Component \HttpFoundation \Session \SessionInterface ;
17
15
18
16
/**
19
17
* Sets the session in the request.
22
20
*
23
21
* @final since version 3.3
24
22
*/
25
- class SessionListener extends AbstractSessionListener implements ServiceSubscriberInterface
23
+ class SessionListener extends AbstractSessionListener
26
24
{
27
25
private $ container ;
28
26
@@ -39,14 +37,4 @@ protected function getSession()
39
37
40
38
return $ this ->container ->get ('session ' );
41
39
}
42
-
43
- /**
44
- * {@inheritdoc}
45
- */
46
- public static function getSubscribedServices ()
47
- {
48
- return array (
49
- 'session ' => '? ' .SessionInterface::class,
50
- );
51
- }
52
40
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \HttpKernel \EventListener ;
13
13
14
14
use Psr \Container \ContainerInterface ;
15
- use Symfony \Component \DependencyInjection \ServiceSubscriberInterface ;
16
- use Symfony \Component \HttpFoundation \Session \SessionInterface ;
17
15
18
16
/**
19
17
* Sets the session in the request.
22
20
*
23
21
* @final since version 3.3
24
22
*/
25
- class TestSessionListener extends AbstractTestSessionListener implements ServiceSubscriberInterface
23
+ class TestSessionListener extends AbstractTestSessionListener
26
24
{
27
25
private $ container ;
28
26
@@ -39,14 +37,4 @@ protected function getSession()
39
37
40
38
return $ this ->container ->get ('session ' );
41
39
}
42
-
43
- /**
44
- * {@inheritdoc}
45
- */
46
- public static function getSubscribedServices ()
47
- {
48
- return array (
49
- 'session ' => '? ' .SessionInterface::class,
50
- );
51
- }
52
40
}
You can’t perform that action at this time.
0 commit comments