Skip to content

Commit 2b38191

Browse files
update code to work with Symfony 5
1 parent fad9a8d commit 2b38191

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Configuration implements ConfigurationInterface
2222
*/
2323
public function getConfigTreeBuilder()
2424
{
25-
$treeBuilder = new TreeBuilder();
26-
$treeBuilder->root('phpmentors_session_configuration');
25+
$treeBuilder = new TreeBuilder('phpmentors_session_configuration');
26+
$treeBuilder->getRootNode();
2727

2828
return $treeBuilder;
2929
}

src/EventListener/SessionConfigurationListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1616
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
1717
use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
18-
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
18+
use Symfony\Component\HttpKernel\Event\RequestEvent;
1919
use Symfony\Component\Routing\RouterInterface;
2020

2121
class SessionConfigurationListener
@@ -41,9 +41,9 @@ public function __construct(RouterInterface $router, SessionStorageInterface $se
4141
}
4242

4343
/**
44-
* @param GetResponseEvent $event
44+
* @param RequestEvent $event
4545
*/
46-
public function onKernelRequest(GetResponseEvent $event)
46+
public function onKernelRequest(RequestEvent $event)
4747
{
4848
if ($this->sessionStorage === null) {
4949
return;

0 commit comments

Comments
 (0)