Skip to content
Draft
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
61 changes: 20 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/symfony.lock

/.phpunit.result.cache

tests/Application/config/reference.php
56 changes: 26 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"behat/transliterator": "^1.2",
"babdev/pagerfanta-bundle": "^4.4",
"doctrine/annotations": "^2.0",
Expand All @@ -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"
},
Expand All @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -113,7 +110,7 @@
},
"extra": {
"symfony": {
"require": "^7.1"
"require": "^7.2"
}
},
"autoload": {
Expand Down Expand Up @@ -144,7 +141,6 @@
"vendor/bin/ecs check --fix"
],
"test": [
"vendor/bin/phpspec run --ansi --no-interaction",
"vendor/bin/phpunit --colors=always"
]
}
Expand Down
4 changes: 4 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand Down
31 changes: 15 additions & 16 deletions src/Component/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,36 @@
}
],
"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"
},
"require-dev": {
"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": {
Expand Down
Loading