From 7749d50707b13e32500a45f9f16dfbdc4191f506 Mon Sep 17 00:00:00 2001 From: "Alex P. Truchon" Date: Wed, 29 Mar 2023 13:54:19 -0400 Subject: [PATCH 1/3] Give a parameter to the Treebuilder instance for the root node name. Old way is deprecated --- DependencyInjection/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 504dfa1..ee3750c 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('google_analytics_api'); + $treeBuilder = new TreeBuilder('google_analytics_api'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() From 039805533757ad136f79b4fc72cfd2fcd1696b37 Mon Sep 17 00:00:00 2001 From: "Alex P. Truchon" Date: Wed, 29 Mar 2023 14:11:56 -0400 Subject: [PATCH 2/3] Change the route and template components from Sensio for the Symfony ones as the Sensio ones are deprecated --- Controller/DebugController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/DebugController.php b/Controller/DebugController.php index 85f5a94..1c2eaa2 100644 --- a/Controller/DebugController.php +++ b/Controller/DebugController.php @@ -6,9 +6,9 @@ use Google_Service_AnalyticsReporting_GetReportsRequest; use Google_Service_AnalyticsReporting_Metric; use Google_Service_AnalyticsReporting_ReportRequest; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; +use Symfony\Component\Routing\Annotation\Template; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; +use Symfony\Component\Routing\Annotation\Route; /** * Class DebugController From b86bd846e49ed1cfbd159bac1b71d350afc8138f Mon Sep 17 00:00:00 2001 From: "Alex P. Truchon" Date: Wed, 29 Mar 2023 14:16:05 -0400 Subject: [PATCH 3/3] Change the Symfony Controller for the Symfony AbstractController since the Controller is deprecated --- Controller/DebugController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/DebugController.php b/Controller/DebugController.php index 1c2eaa2..210d747 100644 --- a/Controller/DebugController.php +++ b/Controller/DebugController.php @@ -7,14 +7,14 @@ use Google_Service_AnalyticsReporting_Metric; use Google_Service_AnalyticsReporting_ReportRequest; use Symfony\Component\Routing\Annotation\Template; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; /** * Class DebugController * @package MediaFigaro\GoogleAnalyticsApi\Controller */ -class DebugController extends Controller +class DebugController extends AbstractController { /** * @Route("{viewId}")