Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,44 @@ php:
- 7.4

env:
- SYMFONY_VERSION=3.4.*
- SYMFONY_VERSION=4.3.*
- SYMFONY_VERSION=4.4.*
- SYMFONY_VERSION=5.0.*

jobs:
fast_finish: true
allow_failures:
-
env: SYMFONY_VERSION=5.0.*

cache:
directories:
- ~/.composer/cache/files

before_install:
- phpenv config-rm xdebug.ini || true
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

install:
- |
composer require \
symfony/config:$SYMFONY_VERSION \
symfony/expression-language:$SYMFONY_VERSION \
symfony/form:$SYMFONY_VERSION \
symfony/framework-bundle:$SYMFONY_VERSION \
symfony/security-csrf:$SYMFONY_VERSION \
symfony/twig-bundle:$SYMFONY_VERSION \
symfony/validator:$SYMFONY_VERSION \
symfony/yaml:$SYMFONY_VERSION \
--no-update --no-scripts --prefer-dist
- composer require symfony/dependency-injection:$SYMFONY_VERSION --dev --no-update --no-scripts --prefer-dist
- composer update --prefer-dist

- |
(cd src/Component && composer require \
symfony/event-dispatcher:$SYMFONY_VERSION \
symfony/property-access:$SYMFONY_VERSION \
--no-update --no-scripts --prefer-dist \
)
- (cd src/Component && composer update --prefer-dist)

before_script:
Expand Down
24 changes: 11 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@
"jms/serializer-bundle": "^3.5",
"stof/doctrine-extensions-bundle": "^1.2",
"sylius/registry": "^1.2",
"sylius/resource": "^1.2",
"symfony/config": "^3.4|^4.3",
"symfony/expression-language": "^3.4|^4.3",
"symfony/form": "^3.4|^4.3",
"symfony/framework-bundle": "^3.4|^4.3",
"symfony/security-csrf": "^3.4|^4.3",
"symfony/twig-bundle": "^3.4|^4.3",
"symfony/validator": "^3.4|^4.3",
"symfony/yaml": "^3.4|^4.3",
"symfony/config": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/form": "^4.4|^5.0",
"symfony/framework-bundle": "^4.4|^5.0",
"symfony/security-csrf": "^4.4|^5.0",
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/validator": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0",
"white-october/pagerfanta-bundle": "^1.0",
"willdurand/hateoas-bundle": "^2.0",
"winzou/state-machine-bundle": "^0.3"
"winzou/state-machine-bundle": "^0.3|^0.4"
},
"require-dev": {
"behat/transliterator": "dev-master",
Expand All @@ -56,9 +55,8 @@
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "^3.0",
"sylius/grid-bundle": "^1.2",
"sylius/locale": "^1.2",
"symfony/dependency-injection": "^3.4|^4.3",
"twig/twig": "^2.0|^3.0",
"symfony/dependency-injection": "^4.4|^5.0",
"twig/twig": "^2.12|^3.0",
"vimeo/psalm": "3.8.1"
},
"suggest": {
Expand Down
1 change: 1 addition & 0 deletions easy-coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ services:

parameters:
exclude_files:
- 'src/Bundle/test/app/cache/*'
- 'src/Bundle/test/var/*'
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@

namespace Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler;

use SM\Callback\CallbackFactoryInterface;
use SM\Callback\CascadeTransitionCallback;
use SM\Factory\FactoryInterface;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;

/**
* Marks WinzouStateMachineBundle's services as public for compatibility with both Symfony 3.4 and 4.0+.
* Aliases FQCN-based services for backwards compatibility of Winzou/StateMachineBundle 0.4 with 0.3
*
* @see https://github.com/winzou/StateMachineBundle/pull/44
* @see https://github.com/winzou/StateMachineBundle/commit/f515c9302783ef2575570d33b20aefa1eb265afb
*/
final class WinzouStateMachinePass implements CompilerPassInterface
{
Expand All @@ -29,6 +34,10 @@ final class WinzouStateMachinePass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container): void
{
$container->setAlias('sm.factory', FactoryInterface::class);
$container->setAlias('sm.callback_factory', CallbackFactoryInterface::class);
$container->setAlias('sm.callback.cascade_transition', CascadeTransitionCallback::class);

foreach (['sm.factory', 'sm.callback_factory', 'sm.callback.cascade_transition'] as $id) {
try {
$container->findDefinition($id)->setPublic(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
use Sylius\Component\Grid\Definition\Action;
use Sylius\Component\Grid\Renderer\BulkActionGridRendererInterface;
use Symfony\Component\HttpFoundation\Request;
use Twig\Environment;

final class TwigBulkActionGridRendererSpec extends ObjectBehavior
{
function let(\Twig_Environment $twig, OptionsParserInterface $optionsParser): void
function let(Environment $twig, OptionsParserInterface $optionsParser): void
{
$this->beConstructedWith(
$twig,
Expand All @@ -38,7 +39,7 @@ function it_is_a_bulk_action_grid_renderer(): void
}

function it_uses_twig_to_render_the_bulk_action(
\Twig_Environment $twig,
Environment $twig,
OptionsParserInterface $optionsParser,
ResourceGridView $gridView,
Action $bulkAction,
Expand Down
5 changes: 3 additions & 2 deletions src/Bundle/spec/Grid/Renderer/TwigGridRendererSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
use Sylius\Component\Grid\Definition\Action;
use Sylius\Component\Grid\Renderer\GridRendererInterface;
use Symfony\Component\HttpFoundation\Request;
use Twig\Environment;

final class TwigGridRendererSpec extends ObjectBehavior
{
function let(
GridRendererInterface $gridRenderer,
\Twig_Environment $twig,
Environment $twig,
OptionsParserInterface $optionsParser
): void {
$actionTemplates = [
Expand All @@ -47,7 +48,7 @@ function it_is_a_grid_renderer(): void
}

function it_uses_twig_to_render_the_action(
\Twig_Environment $twig,
Environment $twig,
OptionsParserInterface $optionsParser,
ResourceGridView $gridView,
Action $action,
Expand Down
10 changes: 3 additions & 7 deletions src/Component/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@

"doctrine/common": "^2.6",
"gedmo/doctrine-extensions": "^2.4",
"symfony/event-dispatcher": "^3.4|^4.1.1",
"symfony/property-access": "^3.4|^4.1.1",
"symfony/event-dispatcher": "^4.4|^5.0",
"symfony/property-access": "^4.4|^5.0",
"winzou/state-machine": "^0.3",
"pagerfanta/pagerfanta": "^1.0|^2.0"
},
"require-dev": {
"behat/transliterator": "dev-master",
"phpspec/phpspec": "^6.1",
"sylius/locale": "^1.0"
},
"suggest": {
"sylius/locale": "^1.0"
"phpspec/phpspec": "^6.1"
},
"autoload": {
"psr-4": { "Sylius\\Component\\Resource\\": "" }
Expand Down