diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cca98e24..b3123cd3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,24 +17,35 @@ jobs: tests: runs-on: ubuntu-latest name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ORM ${{ matrix.orm }}" - env: - APP_ENV: ${{ matrix.app_env }} strategy: fail-fast: false matrix: orm: ['2.*', '3.*'] - php: ["8.1", "8.2", "8.3"] + php: ["8.2", "8.3"] composer-flags: ['--no-scripts --prefer-stable --prefer-dist'] - symfony: ["^6.4", "^7.1"] - app_env: ["test"] - exclude: - - php: "8.1" - symfony: "^7.1" + minimum_stability: [""] + symfony: ["^6.4", "^7.2"] + include: + - php: 8.3 + symfony: "7.4.*" + minimum_stability: "beta" + - php: 8.4 + symfony: "8.0.*" + minimum_stability: "beta" steps: - uses: actions/checkout@v4 + - + name: Change minimum-stability + if: matrix.minimum_stability != '' + run: | + composer config minimum-stability ${{ matrix.minimum_stability }} + composer config prefer-stable true + (cd src/Component && composer config minimum-stability ${{ matrix.minimum_stability }}) + (cd src/Component && composer config prefer-stable true) + - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -74,23 +85,12 @@ jobs: run: | (cd tests/Application && bin/console doctrine:schema:create) - - - name: Run Psalm - run: vendor/bin/psalm --php-version=${{ matrix.php }} - - name: Run analysis run: | composer analyse (cd src/Component && composer validate --strict) - - - name: Run Phpspec tests - run: | - vendor/bin/phpspec run --ansi --no-interaction - (cd src/Component && vendor/bin/phpspec run --no-interaction) - (cd src/Component && vendor/bin/phpspec run --no-interaction --config legacy/phpspec.yml.dist) - - name: Run PHPUnit tests run: vendor/bin/phpunit --colors=always @@ -99,16 +99,6 @@ jobs: name: Run lint container run: (cd tests/Application && bin/console lint:container) - - - name: Run state machine Phpspec tests with winzou/state-machine package - if: ${{ true != contains( matrix.php, '8.2' ) }} - run: | - sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml - (cd tests/Application && bin/console cache:clear) - vendor/bin/phpspec run --ansi --no-interaction - sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml - - - name: Run state machine PHPUnit tests with winzou/state-machine package run: | @@ -117,15 +107,6 @@ jobs: vendor/bin/phpunit --colors=always sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml - - - name: Run state machine Phpspec tests with symfony/workflow package - if: ${{ true != contains( matrix.php, '8.2' ) }} - run: | - sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml - (cd tests/Application && bin/console cache:clear) - vendor/bin/phpspec run --ansi --no-interaction - sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml - - name: Run state machine PHPUnit tests with symfony/workflow package run: | @@ -136,7 +117,6 @@ jobs: - name: Run lint container without friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle packages - if: matrix.app_env == 'test' run: | composer remove --dev friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle --no-scripts (cd tests/Application && bin/console cache:clear --env=test_without_fosrest) @@ -145,7 +125,6 @@ jobs: - name: Run lint container without winzou/state-machine-bundle package - if: matrix.app_env == 'test' run: | composer remove --dev winzou/state-machine-bundle --no-scripts (cd tests/Application && bin/console cache:clear --env=test_without_state_machine) @@ -154,8 +133,8 @@ jobs: - name: Run lint container without sylius/grid-bundle package - if: matrix.app_env == 'test' run: | + find tests/Application/src -type f -name '*Grid.php' -delete composer remove sylius/grid-bundle --no-scripts --dev (cd tests/Application && bin/console cache:clear --env=test_without_twig) (cd tests/Application && bin/console lint:container --env=test_without_twig) diff --git a/.gitignore b/.gitignore index 5b3dcc6bb..4168ad5ab 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ /symfony.lock /.phpunit.result.cache + +tests/Application/config/reference.php diff --git a/composer.json b/composer.json index edca7f333..73b0e2b69 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "behat/transliterator": "^1.2", "babdev/pagerfanta-bundle": "^4.4", "doctrine/annotations": "^2.0", @@ -35,20 +35,20 @@ "doctrine/persistence": "^3.3", "gedmo/doctrine-extensions": "^3.17.1", "sylius/registry": "^1.2", - "symfony/config": "^6.4 || ^7.1", + "symfony/config": "^6.4 || ^7.2 || ^8.0", "symfony/deprecation-contracts": "^3.5", - "symfony/expression-language": "^6.4 || ^7.1", - "symfony/form": "^6.4 || ^7.1", - "symfony/framework-bundle": "^6.4 || ^7.1", - "symfony/http-foundation": "^6.4 || ^7.1", - "symfony/intl": "^6.4 || ^7.1", - "symfony/security-core": "^6.4 || ^7.1", - "symfony/security-csrf": "^6.4 || ^7.1", - "symfony/routing": "^6.4 || ^7.1", - "symfony/translation": "^6.4 || ^7.1", - "symfony/twig-bundle": "^6.4 || ^7.1", - "symfony/validator": "^6.4 || ^7.1", - "symfony/yaml": "^6.4 || ^7.1", + "symfony/expression-language": "^6.4 || ^7.2 || ^8.0", + "symfony/form": "^6.4 || ^7.2 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.2 || ^8.0", + "symfony/http-foundation": "^6.4 || ^7.2 || ^8.0", + "symfony/intl": "^6.4 || ^7.2 || ^8.0", + "symfony/security-core": "^6.4 || ^7.2 || ^8.0", + "symfony/security-csrf": "^6.4 || ^7.2 || ^8.0", + "symfony/routing": "^6.4 || ^7.2 || ^8.0", + "symfony/translation": "^6.4 || ^7.2 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.2 || ^8.0", + "symfony/validator": "^6.4 || ^7.2 || ^8.0", + "symfony/yaml": "^6.4 || ^7.2 || ^8.0", "webmozart/assert": "^1.11", "willdurand/negotiation": "^3.1" }, @@ -63,8 +63,6 @@ "lchrusciel/api-test-case": "^5.0", "matthiasnoback/symfony-dependency-injection-test": "^6.1.0", "pagerfanta/pagerfanta": "^4.4", - "pamil/phpspec-skip-example-extension": "^4.2", - "phpspec/phpspec": "^7.5", "phpspec/prophecy-phpunit": "^2.2", "phpstan/phpstan": "^1.12", "phpstan/phpstan-phpunit": "^1.4", @@ -73,19 +71,18 @@ "rector/rector": "^0.18.2", "sylius-labs/coding-standard": "^4.4", "sylius/grid-bundle": "^1.13", - "symfony/console": "^6.4 || ^7.1", - "symfony/css-selector": "^6.4 || ^7.1", - "symfony/dependency-injection": "^6.4 || ^7.1", - "symfony/dotenv": "^6.4 || ^7.1", - "symfony/http-kernel": "^6.4 || ^7.1", - "symfony/messenger": "^6.4 || ^7.1", - "symfony/security-bundle": "^6.4 || ^7.1", - "symfony/serializer": "^6.4 || ^7.1", - "symfony/stopwatch": "^6.4 || ^7.1", - "symfony/uid": "^6.4 || ^7.1", - "symfony/workflow": "^6.4 || ^7.1", + "symfony/console": "^6.4 || ^7.2 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.2 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.2 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.2 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.2 || ^8.0", + "symfony/messenger": "^6.4 || ^7.2 || ^8.0", + "symfony/security-bundle": "^6.4 || ^7.2 || ^8.0", + "symfony/serializer": "^6.4 || ^7.2 || ^8.0", + "symfony/stopwatch": "^6.4 || ^7.2 || ^8.0", + "symfony/uid": "^6.4 || ^7.2 || ^8.0", + "symfony/workflow": "^6.4 || ^7.2 || ^8.0", "twig/twig": "^3.14", - "vimeo/psalm": "^5.26", "willdurand/hateoas-bundle": "^2.5", "winzou/state-machine-bundle": "^0.6.2", "zenstruck/foundry": "^2.3 <2.7" @@ -113,7 +110,7 @@ }, "extra": { "symfony": { - "require": "^7.1" + "require": "^7.2" } }, "autoload": { @@ -144,7 +141,6 @@ "vendor/bin/ecs check --fix" ], "test": [ - "vendor/bin/phpspec run --ansi --no-interaction", "vendor/bin/phpunit --colors=always" ] } diff --git a/ecs.php b/ecs.php index 0ddb279b8..65a7c4e5c 100644 --- a/ecs.php +++ b/ecs.php @@ -14,6 +14,10 @@ __DIR__ . '/tests', ]); + $ecsConfig->skip([ + __DIR__ . '/tests/Application/config/reference.php', + ]); + $ecsConfig->import('vendor/sylius-labs/coding-standard/ecs.php'); $ecsConfig->ruleWithConfiguration(HeaderCommentFixer::class, [ diff --git a/src/Component/composer.json b/src/Component/composer.json index 3b72c3b4a..7b71aa328 100644 --- a/src/Component/composer.json +++ b/src/Component/composer.json @@ -27,23 +27,23 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "doctrine/collections": "^1.8 || ^2.0", "doctrine/inflector": "^1.4 || ^2.0", "gedmo/doctrine-extensions": "^2.4.12 || ^3.0", "pagerfanta/core": "^3.7 || ^4.0", - "symfony/event-dispatcher": "^6.4 || ^7.1", - "symfony/form": "^6.4 || ^7.1", - "symfony/framework-bundle": "^6.4 || ^7.1", - "symfony/http-foundation": "^6.4 || ^7.1", - "symfony/http-kernel": "^6.4 || ^7.1", - "symfony/property-access": "^6.4 || ^7.1", - "symfony/routing": "^6.4 || ^7.1", - "symfony/security-core": "^6.4 || ^7.1", - "symfony/security-csrf": "^6.4 || ^7.1", - "symfony/string": "^6.4 || ^7.1", - "symfony/translation": "^6.4 || ^7.1", - "symfony/validator": "^6.4 || ^7.1", + "symfony/event-dispatcher": "^6.4 || ^7.2 || ^8.0", + "symfony/form": "^6.4 || ^7.2 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.2 || ^8.0", + "symfony/http-foundation": "^6.4 || ^7.2 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.2 || ^8.0", + "symfony/property-access": "^6.4 || ^7.2 || ^8.0", + "symfony/routing": "^6.4 || ^7.2 || ^8.0", + "symfony/security-core": "^6.4 || ^7.2 || ^8.0", + "symfony/security-csrf": "^6.4 || ^7.2 || ^8.0", + "symfony/string": "^6.4 || ^7.2 || ^8.0", + "symfony/translation": "^6.4 || ^7.2 || ^8.0", + "symfony/validator": "^6.4 || ^7.2 || ^8.0", "willdurand/negotiation": "^3.1", "winzou/state-machine": "^0.4" }, @@ -51,13 +51,12 @@ "behat/transliterator": "^1.3", "doctrine/orm": "^2.18 || ^3.3", "matthiasnoback/symfony-dependency-injection-test": "^4.2.1 || ^5.1", - "phpspec/phpspec": "^7.3", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", "sylius/grid": "^1.13", "sylius/grid-bundle": "^1.13", - "symfony/serializer": "^6.4 || ^7.1", - "symfony/workflow": "^6.4 || ^7.1", + "symfony/serializer": "^6.4 || ^7.2 || ^8.0", + "symfony/workflow": "^6.4 || ^7.2 || ^8.0", "twig/twig": "^3.0" }, "conflict": {