Skip to content

Commit 6a677f5

Browse files
committed
Migrate to use new Sylius test app for plugins and fully support Sylius 2
1 parent d080705 commit 6a677f5

119 files changed

Lines changed: 1482 additions & 1434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docker/nginx/nginx.conf

Lines changed: 0 additions & 48 deletions
This file was deleted.

.docker/php/php.ini

Lines changed: 0 additions & 5 deletions
This file was deleted.

.dockerignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
**/*.log
2+
**/*.md
3+
**/*.php~
4+
**/._*
5+
**/.dockerignore
6+
**/.DS_Store
7+
**/.git/
8+
**/.gitattributes
9+
**/.github
10+
**/.gitignore
11+
**/.gitkeep
12+
**/.gitmodules
13+
**/.idea
14+
**/Dockerfile
15+
**/Thumbs.db
16+
**/docker-compose*.yaml
17+
**/docker-compose*.yml
18+
.editorconfig
19+
.php_cs.cache
20+
.travis.yml
21+
composer.phar
22+
docker/mysql/data/
23+
etc/build/*
24+
node_modules/
25+
var/*
26+
vendor/
27+
public/assets/
28+
public/build/
29+
public/bundles/
30+
public/css/
31+
public/js/
32+
public/media/

.editorconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ indent_size = 4
6969
indent_style = space
7070
indent_size = 2
7171

72-
[phpspec.yml{,.dist}]
73-
indent_style = space
74-
indent_size = 4
75-
7672
[phpstan.neon]
7773
indent_style = space
7874
indent_size = 4

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/.docker export-ignore
2+
/.editorconfig export-ignore
3+
/.gitattributes export-ignore
4+
/.github export-ignore
5+
/behat.yml.dist export-ignore
6+
/docker-compose.yml export-ignore
7+
/docs export-ignore
8+
/ecs.php export-ignore
9+
/etc export-ignore
10+
/Makefile export-ignore
11+
/node_modules export-ignore
12+
/phpspec.yml.dist export-ignore
13+
/phpstan.neon export-ignore
14+
/phpunit.xml.dist export-ignore
15+
/psalm.xml export-ignore
16+
/symfony.lock export-ignore

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @Sylius/core-team
1+
* @webgriffe/wg-devs

.github/workflows/build.yml

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'dependabot/**'
77
pull_request: ~
88
release:
9-
types: [created]
9+
types: [ created ]
1010
schedule:
1111
-
1212
cron: "0 1 * * 6" # Run at 1am every Saturday
@@ -21,13 +21,15 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
php: [ "8.2", "8.3" ]
25-
symfony: [ "^6.4", "^7.1" ]
26-
node: ["20.x"]
27-
mysql: ["8.0"]
24+
php: [ "8.3", "8.4" ]
25+
symfony: [ "^6.4", "^7.4" ]
26+
sylius: [ "~2.1.10", "~2.2.1" ]
27+
node: [ "22.x" ]
28+
mysql: [ "8.4" ]
2829

2930
env:
3031
APP_ENV: test
32+
BEHAT_BASE_URL: "https://127.0.0.1:8080/"
3133
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
3234

3335
steps:
@@ -40,7 +42,7 @@ jobs:
4042
with:
4143
php-version: "${{ matrix.php }}"
4244
extensions: intl
43-
tools: flex,symfony
45+
tools: flex, symfony
4446
coverage: none
4547

4648
-
@@ -64,22 +66,6 @@ jobs:
6466
name: Output PHP version for Symfony CLI
6567
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
6668

67-
-
68-
name: Install certificates
69-
run: symfony server:ca:install
70-
71-
-
72-
name: Run Chrome Headless
73-
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
74-
75-
-
76-
name: Run webserver
77-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
78-
79-
-
80-
name: Validate composer.json
81-
run: composer validate --ansi --strict
82-
8369
-
8470
name: Get Composer cache directory
8571
id: composer-cache
@@ -94,16 +80,12 @@ jobs:
9480
restore-keys: |
9581
${{ runner.os }}-php-${{ matrix.php }}-composer-
9682
97-
-
98-
name: Configure global composer
99-
run: |
100-
composer global config --no-plugins allow-plugins.symfony/flex true
101-
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2"
102-
10383
-
10484
name: Restrict Symfony version
10585
if: matrix.symfony != ''
10686
run: |
87+
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
88+
composer global config --no-plugins allow-plugins.symfony/flex true
10789
composer config extra.symfony.require "${{ matrix.symfony }}"
10890
10991
-
@@ -113,9 +95,23 @@ jobs:
11395

11496
-
11597
name: Install PHP dependencies
116-
run: composer install --no-interaction --no-plugins
117-
env:
118-
SYMFONY_REQUIRE: ${{ matrix.symfony }}
98+
run: composer install --no-interaction
99+
100+
-
101+
name: RUN EasyCodingStandard
102+
run: vendor/bin/ecs check
103+
104+
-
105+
name: Run PHPStan
106+
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/
107+
108+
-
109+
name: Run Psalm
110+
run: vendor/bin/psalm
111+
112+
-
113+
name: Run unit tests
114+
run: vendor/bin/phpunit --colors=always --testsuite=unit
119115

120116
-
121117
name: Get Yarn cache directory
@@ -133,65 +129,66 @@ jobs:
133129
134130
-
135131
name: Install JS dependencies
136-
run: (cd tests/Application && yarn install)
132+
run: (cd vendor/sylius/test-application && yarn install)
137133

138134
-
139135
name: Prepare test application database
140136
run: |
141-
(cd tests/Application && bin/console doctrine:database:create -vvv)
142-
(cd tests/Application && bin/console doctrine:schema:create -vvv)
137+
(vendor/bin/console doctrine:database:create -vvv)
138+
(vendor/bin/console doctrine:schema:create -vvv)
143139
144140
-
145141
name: Prepare test application assets
146142
run: |
147-
(cd tests/Application && bin/console assets:install public -vvv)
148-
(cd tests/Application && bin/console sylius:install:assets -vvv)
149-
(cd tests/Application && yarn build:prod)
143+
vendor/bin/console assets:install -vvv
144+
(cd vendor/sylius/test-application && yarn build)
150145
151146
-
152147
name: Prepare test application cache
153-
run: (cd tests/Application && bin/console cache:warmup -vvv)
148+
run: vendor/bin/console cache:warmup -vvv
154149

155150
-
156151
name: Load fixtures in test application
157-
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
152+
run: vendor/bin/console sylius:fixtures:load -n
158153

159154
-
160-
name: Validate database schema
161-
run: (cd tests/Application && bin/console doctrine:schema:validate)
155+
name: Validate composer.json
156+
run: composer validate --ansi --strict
162157

163158
-
164-
name: Run ECS
165-
run: vendor/bin/ecs check
159+
name: Validate container
160+
run: vendor/bin/console lint:container
166161

167162
-
168-
name: Run PHPStan
169-
run: vendor/bin/phpstan analyse
163+
name: Run Non-unit PHPUnit tests
164+
run: vendor/bin/phpunit --colors=always --testsuite=non-unit
170165

171166
-
172-
name: Run Psalm
173-
run: vendor/bin/psalm
167+
name: Run Chrome Headless
168+
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
174169

175170
-
176-
name: Run PHPSpec
177-
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
171+
name: Install certificates
172+
run: symfony server:ca:install || true
178173

179174
-
180-
name: Run PHPUnit
181-
run: vendor/bin/phpunit --colors=always
175+
name: Run webserver
176+
run: symfony server:start --port=8080 --daemon
182177

183178
-
184179
name: Run Behat
185-
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
180+
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
186181

187182
-
188183
name: Upload Behat logs
189184
uses: actions/upload-artifact@v4
190185
if: failure()
191186
with:
192-
name: Behat logs
187+
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
193188
path: etc/build/
194189
if-no-files-found: ignore
190+
compression-level: 6
191+
overwrite: true
195192

196193
roave_bc_check:
197194
name: Roave BC Check

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
/vendor/
22
/var/
33
/node_modules/
4+
/drivers/
45
/composer.lock
56

67
/etc/build/*
78
!/etc/build/.gitignore
89

9-
/tests/Application/yarn.lock
10-
1110
/.phpunit.result.cache
1211
/behat.yml
13-
/phpspec.yml
1412
/phpunit.xml
13+
/compose.override.yaml
14+
/compose.override.yml
1515
.phpunit.result.cache
1616

1717
# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
1818
/.php-version
1919
/php.ini
2020

21-
docker-compose.override.yml
21+
/tests/TestApplication/.env.local
22+
/tests/TestApplication/.env.*.local
2223

2324
!/tests/PIM/.gitkeep
2425
/tests/PIM/

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See @CLAUDE.md

0 commit comments

Comments
 (0)