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 (#674)
Browse files Browse the repository at this point in the history
There is another LTS we support (4.4)
  • Loading branch information
wbloszyk authored Jun 12, 2020
1 parent 2707cf2 commit f859369
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 80 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 @@ -36,27 +36,27 @@
"sonata-project/seo-bundle": "^2.4",
"sonata-project/twig-extensions": "^0.1 || ^1.2",
"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
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{% endblock %}

{% block product_properties %}
{{ render(controller(provider.baseControllerName ~ ':renderProperties', {product: product})) }}
{{ render(controller(provider.baseControllerName ~ ':renderPropertiesAction', {product: product})) }}
{% endblock %}

<dl class="dl-horizontal" style="margin-bottom: 0;">
Expand Down Expand Up @@ -58,4 +58,4 @@
</div>
</div>
</div>
</div>
</div>
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
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
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
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
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
7 changes: 1 addition & 6 deletions src/ProductBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f859369

Please sign in to comment.