Skip to content

Commit

Permalink
Merge pull request #82 from lruozzi9/master
Browse files Browse the repository at this point in the history
Add compatibility with Symfony 5
  • Loading branch information
stefandoorn authored May 11, 2021
2 parents 25988c4 + 7b63f53 commit 059e730
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ final class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();

$rootNode = $treeBuilder->root('gtm');
$treeBuilder = new TreeBuilder('gtm');
$rootNode = $treeBuilder->getRootNode();

$rootNode
->children()
Expand Down
6 changes: 3 additions & 3 deletions src/EventListener/AddRouteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace GtmPlugin\EventListener;

use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Xynnn\GoogleTagManagerBundle\Service\GoogleTagManagerInterface;

/**
Expand Down Expand Up @@ -34,9 +34,9 @@ public function __construct(GoogleTagManagerInterface $googleTagManager, Request
}

/**
* @param GetResponseEvent $event
* @param RequestEvent $event
*/
public function onKernelRequest(GetResponseEvent $event): void
public function onKernelRequest(RequestEvent $event): void
{
$request = $this->request->getCurrentRequest();

Expand Down
6 changes: 3 additions & 3 deletions src/EventListener/ContextListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Sylius\Component\Channel\Context\ChannelNotFoundException;
use Sylius\Component\Currency\Context\CurrencyContextInterface;
use Sylius\Component\Locale\Context\LocaleContextInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Xynnn\GoogleTagManagerBundle\Service\GoogleTagManagerInterface;

/**
Expand Down Expand Up @@ -55,9 +55,9 @@ public function __construct(
}

/**
* @param GetResponseEvent $event
* @param RequestEvent $event
*/
public function onKernelRequest(GetResponseEvent $event): void
public function onKernelRequest(RequestEvent $event): void
{
try {
$channel = $this->channelContext->getChannel();
Expand Down
6 changes: 3 additions & 3 deletions src/EventListener/EnvironmentListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GtmPlugin\EventListener;

use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Xynnn\GoogleTagManagerBundle\Service\GoogleTagManagerInterface;

/**
Expand Down Expand Up @@ -33,9 +33,9 @@ public function __construct(GoogleTagManagerInterface $googleTagManager, string
}

/**
* @param GetResponseEvent $event
* @param RequestEvent $event
*/
public function onKernelRequest(GetResponseEvent $event): void
public function onKernelRequest(RequestEvent $event): void
{
$this->googleTagManager->setData('env', $this->environment);
}
Expand Down

0 comments on commit 059e730

Please sign in to comment.