Skip to content

Commit

Permalink
[SF7] Remove hateoas on Symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed May 29, 2024
1 parent 3baa1b8 commit 5609c1f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Twig ${{ matrix.twig }}, Persistence: ${{ matrix.persistence }}, Collections: ${{ matrix.collections }}"
env:
APP_ENV: ${{ matrix.app_env }}
strategy:
fail-fast: false
matrix:
Expand All @@ -24,13 +26,16 @@ jobs:
persistence: ["^2.0", "^3.0"]
collections: ["^1.8", "^2.0"]
experimental: [false]
app_env: ["test"]
include:
- php: "8.1"
pagerfanta: "^3.7"
symfony: "^5.4"
app_env: "test"
experimental: false
- php: 8.3
symfony: "^7.0"
app_env: "test_without_fosrest"
experimental: true
exclude:
- php: "8.1"
Expand Down Expand Up @@ -92,6 +97,11 @@ jobs:
name: Upgrade winzou-state-machine to dev branch
run: composer require "winzou/state-machine-bundle" "dev-master" --no-update --no-scripts

-
name: Remove hateoas on Symfony 7
if: matrix.symfony == '^7.0'
run: composer remove --dev willdurand/hateoas-bundle --no-update --no-scripts

-
name: Install dependencies
run: |
Expand Down Expand Up @@ -134,7 +144,7 @@ jobs:
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 --env=test)
(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
Expand All @@ -143,7 +153,7 @@ jobs:
name: Run state machine PHPUnit tests with winzou/state-machine package
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 --env=test)
(cd tests/Application && bin/console cache:clear)
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
Expand All @@ -152,15 +162,15 @@ jobs:
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 --env=test)
(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: |
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 --env=test)
(cd tests/Application && bin/console cache:clear)
vendor/bin/phpunit --colors=always
sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml
Expand All @@ -170,7 +180,7 @@ jobs:
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)
(cd tests/Application && bin/console lint:container --env=test_without_fosrest)
composer require friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle --no-scripts
composer require --dev friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle --no-scripts
-
name: Run lint container without winzou/state-machine-bundle package
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"conflict": {
"friendsofsymfony/rest-bundle": "<3.0",
"jms/serializer-bundle": "<3.5",
"willdurand/hateoas-bundle": "<2.0"
"willdurand/hateoas-bundle": "<2.0 || ^2.6"
},
"suggest": {
"doctrine/orm": "^2.5",
Expand Down

0 comments on commit 5609c1f

Please sign in to comment.