Skip to content

Commit

Permalink
Upgrade for Sylius 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Jun 3, 2024
1 parent 434a272 commit 4854e38
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 36 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.0", "8.1", "8.2" ]
symfony: [ "^5.4", "^6.4" ]
sylius: [ "^1.12.13" ]
node: [ "14.x", "16.x", "18.x" ]
php: [ "8.1", "8.2", "8.3" ]
symfony: [ "^5.4.*", "^6.4" ]
sylius: [ "1.12.16", "1.13.1"] ]
node: [ "18.x", "20.x" ]
mysql: [ "8.0" ]
env:
APP_ENV: test
Expand All @@ -39,7 +39,7 @@ jobs:
coverage: none

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "${{ matrix.node }}"

Expand All @@ -64,12 +64,15 @@ jobs:
- name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)

- name: Validate composer.json
run: composer validate --ansi --strict

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache Yarn
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
Expand All @@ -121,9 +124,6 @@ jobs:
- name: Load fixtures in test application
run: (cd tests/Application && bin/console sylius:fixtures:load -n)

- name: Validate composer.json
run: composer validate --ansi --strict

- name: Run Coding Standard
run: vendor/bin/ecs check

Expand Down
45 changes: 26 additions & 19 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ imports:
- tests/Behat/Resources/suites.yml

default:
formatters:
pretty:
verbose: true
paths: false
snippets: false

extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
Robertfausk\Behat\PantherExtension: ~

FriendsOfBehat\MinkDebugExtension:
directory: etc/build
Expand All @@ -15,32 +22,30 @@ default:
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
base_url: "https://127.0.0.1:8080/"
default_session: symfony
javascript_session: chrome_headless
javascript_session: panther
sessions:
symfony:
symfony: ~
chrome_headless:
chromedriver:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
selenium2:
browser: chrome
capabilities:
browserName: chrome
browser: chrome
version: ""
marionette: null # https://github.com/Behat/MinkExtension/pull/311
chrome:
switches:
- "start-fullscreen"
- "start-maximized"
- "no-sandbox"
extra_capabilities:
chrome_headless_second_session:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
panther:
panther:
manager_options:
connection_timeout_in_ms: 5000
request_timeout_in_ms: 120000
chromedriver_arguments:
- --log-path=etc/build/chromedriver.log
- --verbose
capabilities:
acceptSslCerts: true
acceptInsecureCerts: true
unexpectedAlertBehaviour: accept
firefox:
selenium2:
browser: firefox
show_auto: false

FriendsOfBehat\SymfonyExtension:
Expand All @@ -53,3 +58,5 @@ default:
FriendsOfBehat\SuiteSettingsExtension:
paths:
- "features"

SyliusLabs\SuiteTagsExtension: ~
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
],
"license": "MIT",
"require": {
"php": "^8.0",
"php": "^8.1",
"doctrine/dbal": "^2.7 || ^3.0",
"doctrine/migrations": "^3.0",
"doctrine/orm": "^2.13",
"psr/log": "^2.0",
"sylius/mailer-bundle": "^1.8 || ^2.0",
"sylius/resource": "^1.9",
"sylius/resource-bundle": "^1.9",
"sylius/sylius": "^1.12.13",
"sylius/sylius": "^1.12",
"symfony/config": "^5.4 || ^6.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
Expand All @@ -34,7 +33,8 @@
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"behat/mink-selenium2-driver": "^1.6",
"dbrekelmans/bdi": "^1.1",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
Expand All @@ -51,17 +51,19 @@
"phpstan/phpstan-doctrine": "1.3.37",
"phpstan/phpstan-strict-rules": "^1.3.0",
"phpstan/phpstan-webmozart-assert": "^1.2.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.6 || ^10.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"rector/rector": "^0.15.0",
"robertfausk/behat-panther-extension": "^1.1",
"sylius-labs/coding-standard": "^4.2",
"sylius-labs/suite-tags-extension": "^0.2",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/flex": "^2.2.2",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"vimeo/psalm": "5.9.0"
"vimeo/psalm": "^5.9"
},
"conflict": {
"symfony/framework-bundle": "6.2.8"
Expand Down
33 changes: 33 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@
"ref": "d1227d002b70d1a1f941d91845fcd7ac7fbfc929"
}
},
"nyholm/psr7": {
"version": "1.8",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
},
"files": [
"config/packages/nyholm_psr7.yaml"
]
},
"payum/payum-bundle": {
"version": "2.5",
"recipe": {
Expand Down Expand Up @@ -314,6 +326,15 @@
"config/packages/monolog.yaml"
]
},
"symfony/panther": {
"version": "2.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "673836afb0eac2b0ec36c44f2ff0379e5a4b2177"
}
},
"symfony/routing": {
"version": "6.0",
"recipe": {
Expand Down Expand Up @@ -409,6 +430,18 @@
"webpack.config.js"
]
},
"symfony/workflow": {
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.3",
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
},
"files": [
"config/packages/workflow.yaml"
]
},
"willdurand/hateoas-bundle": {
"version": "2.5",
"recipe": {
Expand Down
7 changes: 6 additions & 1 deletion tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

return [
$bundles = [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Expand Down Expand Up @@ -59,3 +59,8 @@
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
];
if (class_exists(Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class)) {
$bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true];
}

return $bundles;

0 comments on commit 4854e38

Please sign in to comment.