Skip to content

Commit 04805ca

Browse files
committed
Upgrade for Sylius 1.13
1 parent 434a272 commit 04805ca

7 files changed

Lines changed: 90 additions & 36 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
php: [ "8.0", "8.1", "8.2" ]
21+
php: [ "8.1", "8.2", "8.3" ]
2222
symfony: [ "^5.4", "^6.4" ]
23-
sylius: [ "^1.12.13" ]
24-
node: [ "14.x", "16.x", "18.x" ]
23+
sylius: [ "1.12.16", "1.13.1"]
24+
node: [ "18.x", "20.x" ]
2525
mysql: [ "8.0" ]
2626
env:
2727
APP_ENV: test
@@ -39,7 +39,7 @@ jobs:
3939
coverage: none
4040

4141
- name: Setup Node
42-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@v4
4343
with:
4444
node-version: "${{ matrix.node }}"
4545

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

67+
- name: Validate composer.json
68+
run: composer validate --ansi --strict
69+
6770
- name: Get Composer cache directory
6871
id: composer-cache
6972
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
7073

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

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

124-
- name: Validate composer.json
125-
run: composer validate --ansi --strict
126-
127127
- name: Run Coding Standard
128128
run: vendor/bin/ecs check
129129

behat.yml.dist

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ imports:
33
- tests/Behat/Resources/suites.yml
44

55
default:
6+
formatters:
7+
pretty:
8+
verbose: true
9+
paths: false
10+
snippets: false
11+
612
extensions:
713
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
14+
Robertfausk\Behat\PantherExtension: ~
815

916
FriendsOfBehat\MinkDebugExtension:
1017
directory: etc/build
@@ -15,32 +22,30 @@ default:
1522
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
1623
base_url: "https://127.0.0.1:8080/"
1724
default_session: symfony
18-
javascript_session: chrome_headless
25+
javascript_session: panther
1926
sessions:
2027
symfony:
2128
symfony: ~
22-
chrome_headless:
29+
chromedriver:
2330
chrome:
2431
api_url: http://127.0.0.1:9222
2532
validate_certificate: false
26-
chrome:
27-
selenium2:
28-
browser: chrome
29-
capabilities:
30-
browserName: chrome
31-
browser: chrome
32-
version: ""
33-
marionette: null # https://github.com/Behat/MinkExtension/pull/311
34-
chrome:
35-
switches:
36-
- "start-fullscreen"
37-
- "start-maximized"
38-
- "no-sandbox"
39-
extra_capabilities:
33+
chrome_headless_second_session:
34+
chrome:
35+
api_url: http://127.0.0.1:9222
36+
validate_certificate: false
37+
panther:
38+
panther:
39+
manager_options:
40+
connection_timeout_in_ms: 5000
41+
request_timeout_in_ms: 120000
42+
chromedriver_arguments:
43+
- --log-path=etc/build/chromedriver.log
44+
- --verbose
45+
capabilities:
46+
acceptSslCerts: true
47+
acceptInsecureCerts: true
4048
unexpectedAlertBehaviour: accept
41-
firefox:
42-
selenium2:
43-
browser: firefox
4449
show_auto: false
4550

4651
FriendsOfBehat\SymfonyExtension:
@@ -53,3 +58,5 @@ default:
5358
FriendsOfBehat\SuiteSettingsExtension:
5459
paths:
5560
- "features"
61+
62+
SyliusLabs\SuiteTagsExtension: ~

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": "^8.0",
11+
"php": "^8.1",
1212
"doctrine/dbal": "^2.7 || ^3.0",
1313
"doctrine/migrations": "^3.0",
1414
"doctrine/orm": "^2.13",
1515
"psr/log": "^2.0",
1616
"sylius/mailer-bundle": "^1.8 || ^2.0",
1717
"sylius/resource": "^1.9",
1818
"sylius/resource-bundle": "^1.9",
19-
"sylius/sylius": "^1.12.13",
19+
"sylius/sylius": "^1.12",
2020
"symfony/config": "^5.4 || ^6.0",
2121
"symfony/console": "^5.4 || ^6.0",
2222
"symfony/dependency-injection": "^5.4 || ^6.0",
@@ -34,7 +34,8 @@
3434
},
3535
"require-dev": {
3636
"behat/behat": "^3.6.1",
37-
"behat/mink-selenium2-driver": "^1.4",
37+
"behat/mink-selenium2-driver": "^1.6",
38+
"dbrekelmans/bdi": "^1.1",
3839
"dmore/behat-chrome-extension": "^1.3",
3940
"dmore/chrome-mink-driver": "^2.7",
4041
"friends-of-behat/mink": "^1.8",
@@ -51,17 +52,19 @@
5152
"phpstan/phpstan-doctrine": "1.3.37",
5253
"phpstan/phpstan-strict-rules": "^1.3.0",
5354
"phpstan/phpstan-webmozart-assert": "^1.2.0",
54-
"phpunit/phpunit": "^9.5",
55+
"phpunit/phpunit": "^9.6 || ^10.5",
5556
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
5657
"rector/rector": "^0.15.0",
58+
"robertfausk/behat-panther-extension": "^1.1",
5759
"sylius-labs/coding-standard": "^4.2",
60+
"sylius-labs/suite-tags-extension": "^0.2",
5861
"symfony/browser-kit": "^5.4 || ^6.0",
5962
"symfony/debug-bundle": "^5.4 || ^6.0",
6063
"symfony/dotenv": "^5.4 || ^6.0",
6164
"symfony/flex": "^2.2.2",
6265
"symfony/intl": "^5.4 || ^6.0",
6366
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
64-
"vimeo/psalm": "5.9.0"
67+
"vimeo/psalm": "^5.9"
6568
},
6669
"conflict": {
6770
"symfony/framework-bundle": "6.2.8"

phpstan.neon

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ includes:
44
parameters:
55
level: max
66
reportUnmatchedIgnoredErrors: false
7-
checkMissingIterableValueType: false
87
paths:
98
- src
109
- tests/Behat
1110

12-
excludes_analyse:
11+
excludePaths:
1312
# Makes PHPStan crash
1413
- 'src/DependencyInjection/Configuration.php'
1514

@@ -18,4 +17,8 @@ parameters:
1817
- 'tests/Application/src/**.php'
1918

2019
ignoreErrors:
20+
-
21+
identifier: missingType.iterableValue
22+
-
23+
identifier: missingType.generics
2124
- '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./'

src/Twig/AvailabilityExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
final class AvailabilityExtension extends AbstractExtension
1111
{
12+
/**
13+
* @psalm-suppress InvalidArgument
14+
*/
1215
public function getFunctions(): array
1316
{
1417
return [

symfony.lock

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@
119119
"ref": "d1227d002b70d1a1f941d91845fcd7ac7fbfc929"
120120
}
121121
},
122+
"nyholm/psr7": {
123+
"version": "1.8",
124+
"recipe": {
125+
"repo": "github.com/symfony/recipes",
126+
"branch": "main",
127+
"version": "1.0",
128+
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
129+
},
130+
"files": [
131+
"config/packages/nyholm_psr7.yaml"
132+
]
133+
},
122134
"payum/payum-bundle": {
123135
"version": "2.5",
124136
"recipe": {
@@ -314,6 +326,15 @@
314326
"config/packages/monolog.yaml"
315327
]
316328
},
329+
"symfony/panther": {
330+
"version": "2.1",
331+
"recipe": {
332+
"repo": "github.com/symfony/recipes",
333+
"branch": "main",
334+
"version": "1.0",
335+
"ref": "673836afb0eac2b0ec36c44f2ff0379e5a4b2177"
336+
}
337+
},
317338
"symfony/routing": {
318339
"version": "6.0",
319340
"recipe": {
@@ -409,6 +430,18 @@
409430
"webpack.config.js"
410431
]
411432
},
433+
"symfony/workflow": {
434+
"version": "6.4",
435+
"recipe": {
436+
"repo": "github.com/symfony/recipes",
437+
"branch": "main",
438+
"version": "3.3",
439+
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
440+
},
441+
"files": [
442+
"config/packages/workflow.yaml"
443+
]
444+
},
412445
"willdurand/hateoas-bundle": {
413446
"version": "2.5",
414447
"recipe": {

tests/Application/config/bundles.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
return [
3+
$bundles = [
44
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
55
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
66
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
@@ -59,3 +59,8 @@
5959
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
6060
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
6161
];
62+
if (class_exists(Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class)) {
63+
$bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true];
64+
}
65+
66+
return $bundles;

0 commit comments

Comments
 (0)