Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Drop support for Symfony < 4.3
Browse files Browse the repository at this point in the history
There is another LTS we support (4.4)
  • Loading branch information
wbloszyk committed Jun 2, 2020
1 parent efa559c commit c223578
Show file tree
Hide file tree
Showing 28 changed files with 62 additions and 100 deletions.
46 changes: 23 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/BasketBundle/Controller/BasketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/BasketBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/AddBasketElementEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/BasketTransformEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/BeforeCalculatePriceEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/InvoiceTransformEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/OrderTransformEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Event/PaymentEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
3 changes: 2 additions & 1 deletion src/CustomerBundle/Controller/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,7 +30,7 @@
/**
* @author Hugo Briand <briand@ekino.com>
*/
class CustomerController extends Controller
class CustomerController extends AbstractController
{
/**
* Lists customer's addresses.
Expand Down
4 changes: 2 additions & 2 deletions src/CustomerBundle/Controller/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
7 changes: 1 addition & 6 deletions src/CustomerBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/CustomerBundle/Menu/ProfileMenuEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <briand@ekino.com>
Expand Down
7 changes: 1 addition & 6 deletions src/DeliveryBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/InvoiceBundle/Controller/InvoiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/InvoiceBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/OrderBundle/Controller/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/OrderBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/PaymentBundle/Controller/DebugPaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -27,7 +27,7 @@
/**
* @author Sylvain Deloux <sylvain.deloux@ekino.com>
*/
class DebugPaymentController extends Controller
class DebugPaymentController extends AbstractController
{
/**
* User choice action.
Expand Down
4 changes: 2 additions & 2 deletions src/PaymentBundle/Controller/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/PaymentBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 1 addition & 6 deletions src/PriceBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/ProductBundle/Controller/BaseProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/ProductBundle/Controller/CatalogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/ProductBundle/Controller/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/ProductBundle/Controller/CollectionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c223578

Please sign in to comment.