Skip to content

Commit

Permalink
update code to work with Symfony 5
Browse files Browse the repository at this point in the history
  • Loading branch information
MasaakiYoshida committed Jul 19, 2022
1 parent fad9a8d commit 2b38191
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$treeBuilder->root('phpmentors_session_configuration');
$treeBuilder = new TreeBuilder('phpmentors_session_configuration');
$treeBuilder->getRootNode();

return $treeBuilder;
}
Expand Down
6 changes: 3 additions & 3 deletions src/EventListener/SessionConfigurationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\Routing\RouterInterface;

class SessionConfigurationListener
Expand All @@ -41,9 +41,9 @@ public function __construct(RouterInterface $router, SessionStorageInterface $se
}

/**
* @param GetResponseEvent $event
* @param RequestEvent $event
*/
public function onKernelRequest(GetResponseEvent $event)
public function onKernelRequest(RequestEvent $event)
{
if ($this->sessionStorage === null) {
return;
Expand Down

0 comments on commit 2b38191

Please sign in to comment.