Skip to content

Commit

Permalink
Support Twig 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Apr 29, 2022
1 parent 760f934 commit 5a4c8d9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"symfony/validator": "^5.4",
"symfony/yaml": "^5.4",
"twig/intl-extra": "^2.12",
"twig/twig": "^2.12",
"twig/twig": "^2.12 || ^3.3",
"webmozart/assert": "^1.9",
"willdurand/hateoas": "^3.0",
"willdurand/hateoas-bundle": "^2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

use PhpSpec\ObjectBehavior;
use Sylius\Component\Addressing\Model\CountryInterface;
use Twig\Extension\ExtensionInterface;

final class CountryNameExtensionSpec extends ObjectBehavior
{
function it_is_a_twig_extension(): void
{
$this->shouldHaveType(\Twig_Extension::class);
$this->shouldImplement(ExtensionInterface::class);
}

function it_translates_country_iso_code_into_name(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
namespace spec\Sylius\Bundle\UiBundle\Twig;

use PhpSpec\ObjectBehavior;
use Twig\Extension\ExtensionInterface;

final class PercentageExtensionSpec extends ObjectBehavior
{
function it_is_twig_extension(): void
{
$this->shouldHaveType(\Twig_Extension::class);
$this->shouldImplement(ExtensionInterface::class);
}

function it_returns_float_number_as_percentage(): void
Expand Down
3 changes: 2 additions & 1 deletion src/Sylius/Bundle/UiBundle/spec/Twig/SortByExtensionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
use PhpSpec\ObjectBehavior;
use Sylius\Bundle\UiBundle\spec\Fixtures\SampleInterface;
use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException;
use Twig\Extension\ExtensionInterface;

final class SortByExtensionSpec extends ObjectBehavior
{
function it_extends_twig_extensions(): void
{
$this->shouldHaveType(\Twig_Extension::class);
$this->shouldImplement(ExtensionInterface::class);
}

function it_sorts_in_ascending_order_by_default(
Expand Down

0 comments on commit 5a4c8d9

Please sign in to comment.