From 75d9d5ab35ff774fddf3ea67203fb7e27173115e Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 12:44:25 -0300 Subject: [PATCH 1/6] fix bug not exist method get into container --- src/Controller/ThreadController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/ThreadController.php b/src/Controller/ThreadController.php index 45bc82fbf..d8c5f6242 100644 --- a/src/Controller/ThreadController.php +++ b/src/Controller/ThreadController.php @@ -346,7 +346,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response $thread->setPermalink($permalink); // Validate the entity - $errors = $this->get('validator')->validate($thread, null, ['NewThread']); + $errors = $this->container->get('core.validator')->validate($thread, null, ['NewThread']); if (count($errors) > 0) { $view = View::create() ->setStatusCode(Response::HTTP_BAD_REQUEST) @@ -410,7 +410,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response return new Response($handler->renderTemplate($view, 'rss'), Response::HTTP_OK, $view->getHeaders()); }; - $this->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); + $this->container->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); } return $this->handleView($view); From aa04898332031e207fa3ef4d69009a95f0c15279 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 12:52:26 -0300 Subject: [PATCH 2/6] fix linters --- src/Controller/ThreadController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/ThreadController.php b/src/Controller/ThreadController.php index d8c5f6242..45bc82fbf 100644 --- a/src/Controller/ThreadController.php +++ b/src/Controller/ThreadController.php @@ -346,7 +346,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response $thread->setPermalink($permalink); // Validate the entity - $errors = $this->container->get('core.validator')->validate($thread, null, ['NewThread']); + $errors = $this->get('validator')->validate($thread, null, ['NewThread']); if (count($errors) > 0) { $view = View::create() ->setStatusCode(Response::HTTP_BAD_REQUEST) @@ -410,7 +410,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response return new Response($handler->renderTemplate($view, 'rss'), Response::HTTP_OK, $view->getHeaders()); }; - $this->container->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); + $this->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); } return $this->handleView($view); From f06ee92cf23165e026f84c5c94e746a0afb1c9d0 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 12:53:25 -0300 Subject: [PATCH 3/6] fix bug not exist method get into container --- src/Controller/ThreadController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/ThreadController.php b/src/Controller/ThreadController.php index 45bc82fbf..d8c5f6242 100644 --- a/src/Controller/ThreadController.php +++ b/src/Controller/ThreadController.php @@ -346,7 +346,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response $thread->setPermalink($permalink); // Validate the entity - $errors = $this->get('validator')->validate($thread, null, ['NewThread']); + $errors = $this->container->get('core.validator')->validate($thread, null, ['NewThread']); if (count($errors) > 0) { $view = View::create() ->setStatusCode(Response::HTTP_BAD_REQUEST) @@ -410,7 +410,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response return new Response($handler->renderTemplate($view, 'rss'), Response::HTTP_OK, $view->getHeaders()); }; - $this->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); + $this->container->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler); } return $this->handleView($view); From 1f2cf59d0d849f2367e2a7a3d35b1563636dd51c Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 14:29:10 -0300 Subject: [PATCH 4/6] update depencencies from composer --- composer.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 6116271a8..acd752905 100644 --- a/composer.json +++ b/composer.json @@ -20,19 +20,19 @@ } ], "require": { - "php": "^8.1", + "php": "^8.3", "friendsofsymfony/rest-bundle": "^3.0", "jms/serializer-bundle": "^4.0|^5.0", - "symfony/framework-bundle": "^5.4|^6.4", - "symfony/asset": "^5.4|^6.4", - "symfony/dependency-injection": "^5.4|^6.4", - "symfony/routing": "^5.4|^6.4", - "symfony/security-bundle": "^5.4|^6.4", - "symfony/yaml": "^5.4|^6.4", - "symfony/form": "^5.4|^6.4", - "symfony/validator": "^5.4|^6.4", - "symfony/twig-bundle": "^5.4|^6.4", - "symfony/twig-bridge": "^5.4|^6.4", + "symfony/framework-bundle": "^6.4", + "symfony/asset": "^6.4", + "symfony/dependency-injection": "^6.4", + "symfony/routing": "^6.4", + "symfony/security-bundle": "^6.4", + "symfony/yaml": "^6.4", + "symfony/form": "^6.4", + "symfony/validator": "^6.4", + "symfony/twig-bundle": "^6.4", + "symfony/twig-bridge": "^6.4", "twig/twig": "^3.0", "phpoption/phpoption": "^1.1", "doctrine/annotations": "^1.0", From 108b37a16007535959ab4b0faa7f066aa7b45ab6 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 14:30:23 -0300 Subject: [PATCH 5/6] set version ^8.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index acd752905..ec27b6f5c 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": "^8.3", + "php": "^8.1", "friendsofsymfony/rest-bundle": "^3.0", "jms/serializer-bundle": "^4.0|^5.0", "symfony/framework-bundle": "^6.4", From ad969bc0f59690f07e18dcfa0405962a27795869 Mon Sep 17 00:00:00 2001 From: Santiago San Martin Date: Tue, 17 Dec 2024 14:40:22 -0300 Subject: [PATCH 6/6] fix bug method not compatible getConfigTreeBuilder --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index ce7a7cc2a..d0fc0f462 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -28,7 +28,7 @@ class Configuration implements ConfigurationInterface * * @return NodeInterface */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('fos_comment');