From e21b684c84084dee353c3795e21b5786db91fd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20B=C5=82oszyk?= Date: Fri, 29 May 2020 15:16:21 +0200 Subject: [PATCH] Drop support for Symfony < 4.3 There is another LTS we support (4.4) --- composer.json | 46 +++++++++---------- .../Controller/BasketController.php | 3 +- .../DependencyInjection/Configuration.php | 7 +-- src/Component/Event/AddBasketElementEvent.php | 2 +- src/Component/Event/BasketTransformEvent.php | 2 +- .../Event/BeforeCalculatePriceEvent.php | 2 +- src/Component/Event/InvoiceTransformEvent.php | 2 +- src/Component/Event/OrderTransformEvent.php | 2 +- src/Component/Event/PaymentEvent.php | 2 +- .../Controller/CustomerController.php | 3 +- .../Controller/DashboardController.php | 4 +- .../DependencyInjection/Configuration.php | 7 +-- src/CustomerBundle/Menu/ProfileMenuEvent.php | 2 +- .../DependencyInjection/Configuration.php | 7 +-- .../Controller/InvoiceController.php | 4 +- .../DependencyInjection/Configuration.php | 7 +-- .../Controller/OrderController.php | 4 +- .../DependencyInjection/Configuration.php | 7 +-- .../Controller/DebugPaymentController.php | 4 +- .../Controller/PaymentController.php | 4 +- .../DependencyInjection/Configuration.php | 7 +-- .../DependencyInjection/Configuration.php | 7 +-- .../Controller/BaseProductController.php | 4 +- .../Controller/CatalogController.php | 4 +- .../Controller/CategoryController.php | 4 +- .../Controller/CollectionController.php | 4 +- .../Controller/ProductController.php | 4 +- .../DependencyInjection/Configuration.php | 7 +-- 28 files changed, 62 insertions(+), 100 deletions(-) diff --git a/composer.json b/composer.json index b4d461c8d..1b1343b87 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ } ], "require": { - "php": "^7.1", - "cocur/slugify": "^2.5 || ^3.0", + "php": "^7.2", + "cocur/slugify": "^3.0 || ^4.0", "doctrine/doctrine-bundle": "^1.0", "knplabs/knp-menu-bundle": "^2.1", "knplabs/knp-paginator-bundle": "^2.6", @@ -35,27 +35,27 @@ "sonata-project/notification-bundle": "^3.3", "sonata-project/seo-bundle": "^2.4", "sonata-project/user-bundle": "^4.0", - "symfony/config": "^3.4 || ^4.0", - "symfony/console": "^3.4 || ^4.0", - "symfony/dependency-injection": "^3.4.26 || ^4.1.12", - "symfony/doctrine-bridge": "^3.4 || ^4.0", - "symfony/event-dispatcher": "^3.4 || ^4.0", - "symfony/filesystem": "^3.4 || ^4.0", - "symfony/form": "^3.4 || ^4.0", - "symfony/framework-bundle": "^3.4.26 || ^4.1.12", - "symfony/http-foundation": "^3.4.35 || ^4.2.12", - "symfony/http-kernel": "^3.4 || ^4.0", - "symfony/intl": "^3.4 || ^4.0", - "symfony/options-resolver": "^3.4 || ^4.0", - "symfony/process": "^3.4 || ^4.0", - "symfony/property-access": "^3.4 || ^4.0", - "symfony/routing": "^3.4 || ^4.0", - "symfony/security-core": "^3.4 || ^4.0", - "symfony/security-http": "^3.4 || ^4.0", - "symfony/templating": "^3.4 || ^4.0", - "symfony/translation": "^3.4 || ^4.0", - "symfony/twig-bridge": "^3.4 || ^4.0", - "symfony/validator": "^3.4 || ^4.0" + "symfony/config": "^4.3", + "symfony/console": "^4.3", + "symfony/dependency-injection": "^4.3", + "symfony/doctrine-bridge": "^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/filesystem": "^4.3", + "symfony/form": "^4.3", + "symfony/framework-bundle": "^4.3", + "symfony/http-foundation": "^4.3", + "symfony/http-kernel": " ^4.3", + "symfony/intl": "^4.3", + "symfony/options-resolver": "^4.3", + "symfony/process": "^4.3", + "symfony/property-access": "^4.3", + "symfony/routing": "^4.3", + "symfony/security-core": "^4.3", + "symfony/security-http": "^4.3", + "symfony/templating": "^4.3", + "symfony/translation": "^4.3", + "symfony/twig-bridge": "^4.3", + "symfony/validator": "^4.3" }, "conflict": { "friendsofsymfony/rest-bundle": "<2.2 || >=3.0", diff --git a/src/BasketBundle/Controller/BasketController.php b/src/BasketBundle/Controller/BasketController.php index b446bd44d..3c6c22f18 100644 --- a/src/BasketBundle/Controller/BasketController.php +++ b/src/BasketBundle/Controller/BasketController.php @@ -20,6 +20,7 @@ use Sonata\Component\Basket\BasketFactoryInterface; use Sonata\Component\Customer\AddressInterface; use Sonata\Component\Delivery\UndeliverableCountryException; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; @@ -34,7 +35,7 @@ /** * This controller manages the Basket operation and most of the order process. */ -class BasketController extends Controller +class BasketController extends AbstractController { /** * @var BasketFactoryInterface diff --git a/src/BasketBundle/DependencyInjection/Configuration.php b/src/BasketBundle/DependencyInjection/Configuration.php index c67e833fd..81f049ca4 100644 --- a/src/BasketBundle/DependencyInjection/Configuration.php +++ b/src/BasketBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_basket'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_basket'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $node ->children() diff --git a/src/Component/Event/AddBasketElementEvent.php b/src/Component/Event/AddBasketElementEvent.php index 71d248456..aa5f17986 100644 --- a/src/Component/Event/AddBasketElementEvent.php +++ b/src/Component/Event/AddBasketElementEvent.php @@ -17,7 +17,7 @@ use Sonata\Component\Basket\BasketInterface; use Sonata\Component\Product\ProductInterface; use Sonata\Component\Product\ProductProviderInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/Component/Event/BasketTransformEvent.php b/src/Component/Event/BasketTransformEvent.php index 66f56e1dd..3c014051f 100644 --- a/src/Component/Event/BasketTransformEvent.php +++ b/src/Component/Event/BasketTransformEvent.php @@ -14,7 +14,7 @@ namespace Sonata\Component\Event; use Sonata\Component\Basket\BasketInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/Component/Event/BeforeCalculatePriceEvent.php b/src/Component/Event/BeforeCalculatePriceEvent.php index 5bf0e8c10..b13b833dd 100644 --- a/src/Component/Event/BeforeCalculatePriceEvent.php +++ b/src/Component/Event/BeforeCalculatePriceEvent.php @@ -15,7 +15,7 @@ use Sonata\Component\Currency\CurrencyInterface; use Sonata\Component\Product\ProductInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/Component/Event/InvoiceTransformEvent.php b/src/Component/Event/InvoiceTransformEvent.php index 9b9bb9b85..70633c3ce 100644 --- a/src/Component/Event/InvoiceTransformEvent.php +++ b/src/Component/Event/InvoiceTransformEvent.php @@ -14,7 +14,7 @@ namespace Sonata\Component\Event; use Sonata\Component\Invoice\InvoiceInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/Component/Event/OrderTransformEvent.php b/src/Component/Event/OrderTransformEvent.php index dc859a95a..32467cb0b 100644 --- a/src/Component/Event/OrderTransformEvent.php +++ b/src/Component/Event/OrderTransformEvent.php @@ -14,7 +14,7 @@ namespace Sonata\Component\Event; use Sonata\Component\Order\OrderInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/Component/Event/PaymentEvent.php b/src/Component/Event/PaymentEvent.php index a58267f62..f7919a1a8 100644 --- a/src/Component/Event/PaymentEvent.php +++ b/src/Component/Event/PaymentEvent.php @@ -15,8 +15,8 @@ use Sonata\Component\Order\OrderInterface; use Sonata\Component\Payment\TransactionInterface; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\HttpFoundation\Response; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/CustomerBundle/Controller/CustomerController.php b/src/CustomerBundle/Controller/CustomerController.php index f042a4c77..9b8b25dbb 100644 --- a/src/CustomerBundle/Controller/CustomerController.php +++ b/src/CustomerBundle/Controller/CustomerController.php @@ -19,6 +19,7 @@ use Sonata\Component\Customer\CustomerManagerInterface; use Sonata\CustomerBundle\Entity\BaseAddress; use Sonata\CustomerBundle\Form\Type\AddressType; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -29,7 +30,7 @@ /** * @author Hugo Briand */ -class CustomerController extends Controller +class CustomerController extends AbstractController { /** * Lists customer's addresses. diff --git a/src/CustomerBundle/Controller/DashboardController.php b/src/CustomerBundle/Controller/DashboardController.php index 5e979fc52..c7998e259 100644 --- a/src/CustomerBundle/Controller/DashboardController.php +++ b/src/CustomerBundle/Controller/DashboardController.php @@ -13,10 +13,10 @@ namespace Sonata\CustomerBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; -final class DashboardController extends Controller +final class DashboardController extends AbstractController { public function dashboardAction(): Response { diff --git a/src/CustomerBundle/DependencyInjection/Configuration.php b/src/CustomerBundle/DependencyInjection/Configuration.php index 03243ab98..858600e70 100644 --- a/src/CustomerBundle/DependencyInjection/Configuration.php +++ b/src/CustomerBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_customer'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_customer'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $this->addModelSection($node); $this->addProfileSection($node); diff --git a/src/CustomerBundle/Menu/ProfileMenuEvent.php b/src/CustomerBundle/Menu/ProfileMenuEvent.php index c5e2055e1..8f3c8abb1 100644 --- a/src/CustomerBundle/Menu/ProfileMenuEvent.php +++ b/src/CustomerBundle/Menu/ProfileMenuEvent.php @@ -14,7 +14,7 @@ namespace Sonata\CustomerBundle\Menu; use Knp\Menu\ItemInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * @author Hugo Briand diff --git a/src/DeliveryBundle/DependencyInjection/Configuration.php b/src/DeliveryBundle/DependencyInjection/Configuration.php index 8cc2614c8..f64b53d43 100644 --- a/src/DeliveryBundle/DependencyInjection/Configuration.php +++ b/src/DeliveryBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_delivery'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_delivery'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $node ->children() diff --git a/src/InvoiceBundle/Controller/InvoiceController.php b/src/InvoiceBundle/Controller/InvoiceController.php index a0e4d9b17..efb0948ec 100644 --- a/src/InvoiceBundle/Controller/InvoiceController.php +++ b/src/InvoiceBundle/Controller/InvoiceController.php @@ -17,11 +17,11 @@ use Sonata\Component\Invoice\InvoiceManagerInterface; use Sonata\Component\Order\OrderManagerInterface; use Sonata\Component\Transformer\InvoiceTransformer; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -class InvoiceController extends Controller +class InvoiceController extends AbstractController { /** * @throws \RuntimeException diff --git a/src/InvoiceBundle/DependencyInjection/Configuration.php b/src/InvoiceBundle/DependencyInjection/Configuration.php index 1adc8e160..df0b4ddd1 100644 --- a/src/InvoiceBundle/DependencyInjection/Configuration.php +++ b/src/InvoiceBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_invoice'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_invoice'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $this->addModelSection($node); diff --git a/src/OrderBundle/Controller/OrderController.php b/src/OrderBundle/Controller/OrderController.php index 2a70cf0e0..eb04e2497 100644 --- a/src/OrderBundle/Controller/OrderController.php +++ b/src/OrderBundle/Controller/OrderController.php @@ -17,11 +17,11 @@ use Sonata\Component\Order\OrderElementInterface; use Sonata\Component\Order\OrderInterface; use Sonata\Component\Order\OrderManagerInterface; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -class OrderController extends Controller +class OrderController extends AbstractController { /** * @throws AccessDeniedException diff --git a/src/OrderBundle/DependencyInjection/Configuration.php b/src/OrderBundle/DependencyInjection/Configuration.php index 761acf385..989d0f323 100644 --- a/src/OrderBundle/DependencyInjection/Configuration.php +++ b/src/OrderBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_order'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_order'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $this->addModelSection($node); diff --git a/src/PaymentBundle/Controller/DebugPaymentController.php b/src/PaymentBundle/Controller/DebugPaymentController.php index 471854ad7..b3d065cd4 100644 --- a/src/PaymentBundle/Controller/DebugPaymentController.php +++ b/src/PaymentBundle/Controller/DebugPaymentController.php @@ -17,7 +17,7 @@ use Sonata\Component\Payment\Debug\DebugPayment; use Sonata\Component\Payment\InvalidTransactionException; use Sonata\OrderBundle\Entity\OrderManager; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -27,7 +27,7 @@ /** * @author Sylvain Deloux */ -class DebugPaymentController extends Controller +class DebugPaymentController extends AbstractController { /** * User choice action. diff --git a/src/PaymentBundle/Controller/PaymentController.php b/src/PaymentBundle/Controller/PaymentController.php index fa4e6b67a..f1291be40 100644 --- a/src/PaymentBundle/Controller/PaymentController.php +++ b/src/PaymentBundle/Controller/PaymentController.php @@ -18,13 +18,13 @@ use Sonata\Component\Basket\BasketFactoryInterface; use Sonata\Component\Payment\InvalidTransactionException; use Sonata\Component\Payment\PaymentHandlerInterface; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -class PaymentController extends Controller +class PaymentController extends AbstractController { /** * @var BasketFactoryInterface diff --git a/src/PaymentBundle/DependencyInjection/Configuration.php b/src/PaymentBundle/DependencyInjection/Configuration.php index 5a4a4458c..eebc66328 100644 --- a/src/PaymentBundle/DependencyInjection/Configuration.php +++ b/src/PaymentBundle/DependencyInjection/Configuration.php @@ -27,12 +27,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_payment'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_payment'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $node ->children() diff --git a/src/PriceBundle/DependencyInjection/Configuration.php b/src/PriceBundle/DependencyInjection/Configuration.php index e0271e9e7..53275d797 100644 --- a/src/PriceBundle/DependencyInjection/Configuration.php +++ b/src/PriceBundle/DependencyInjection/Configuration.php @@ -28,12 +28,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_price'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_price'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $this->addPriceSection($node); $this->addPrecisionSection($node); diff --git a/src/ProductBundle/Controller/BaseProductController.php b/src/ProductBundle/Controller/BaseProductController.php index 73708cff4..dab5fd461 100644 --- a/src/ProductBundle/Controller/BaseProductController.php +++ b/src/ProductBundle/Controller/BaseProductController.php @@ -17,7 +17,7 @@ use Sonata\Component\Basket\BasketInterface; use Sonata\Component\Product\Pool; use Sonata\Component\Product\ProductInterface; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\FormView; use Symfony\Component\HttpFoundation\JsonResponse; @@ -26,7 +26,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -abstract class BaseProductController extends Controller +abstract class BaseProductController extends AbstractController { /** * @param $product diff --git a/src/ProductBundle/Controller/CatalogController.php b/src/ProductBundle/Controller/CatalogController.php index be0540ed5..bbd6d35ac 100644 --- a/src/ProductBundle/Controller/CatalogController.php +++ b/src/ProductBundle/Controller/CatalogController.php @@ -19,12 +19,12 @@ use Sonata\Component\Product\Pool; use Sonata\Component\Product\ProductProviderInterface; use Sonata\ProductBundle\Entity\ProductSetManager; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class CatalogController extends Controller +class CatalogController extends AbstractController { /** * Index action for catalog. diff --git a/src/ProductBundle/Controller/CategoryController.php b/src/ProductBundle/Controller/CategoryController.php index 8efdf90bd..d827690c4 100644 --- a/src/ProductBundle/Controller/CategoryController.php +++ b/src/ProductBundle/Controller/CategoryController.php @@ -13,10 +13,10 @@ namespace Sonata\ProductBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; -class CategoryController extends Controller +class CategoryController extends AbstractController { /** * @param null $category diff --git a/src/ProductBundle/Controller/CollectionController.php b/src/ProductBundle/Controller/CollectionController.php index d97045108..75b0032f3 100644 --- a/src/ProductBundle/Controller/CollectionController.php +++ b/src/ProductBundle/Controller/CollectionController.php @@ -17,12 +17,12 @@ use Sonata\Component\Currency\CurrencyDetectorInterface; use Sonata\ProductBundle\Entity\ProductSetManager; use Sonata\SeoBundle\Seo\SeoPage; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -class CollectionController extends Controller +class CollectionController extends AbstractController { /** * @var SeoPage diff --git a/src/ProductBundle/Controller/ProductController.php b/src/ProductBundle/Controller/ProductController.php index 51e4c5e2d..306c6f4bd 100644 --- a/src/ProductBundle/Controller/ProductController.php +++ b/src/ProductBundle/Controller/ProductController.php @@ -16,7 +16,7 @@ use Sonata\Component\Basket\BasketElementInterface; use Sonata\Component\Basket\BasketInterface; use Sonata\Component\Form\Type\VariationChoiceType; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormView; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\PropertyAccess\PropertyAccess; -class ProductController extends Controller +class ProductController extends AbstractController { /** * @param $productId diff --git a/src/ProductBundle/DependencyInjection/Configuration.php b/src/ProductBundle/DependencyInjection/Configuration.php index c7705f6dd..c666a7370 100644 --- a/src/ProductBundle/DependencyInjection/Configuration.php +++ b/src/ProductBundle/DependencyInjection/Configuration.php @@ -22,12 +22,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('sonata_product'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $node = $treeBuilder->root('sonata_product'); - } else { - $node = $treeBuilder->getRootNode(); - } + $node = $treeBuilder->getRootNode(); $this->addProductSection($node); $this->addModelSection($node);