Skip to content

Commit b508227

Browse files
authored
Merge 92bc47b into 77e48e9
2 parents 77e48e9 + 92bc47b commit b508227

35 files changed

Lines changed: 241 additions & 416 deletions

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ indent_size = 2
1515
[*.md]
1616
trim_trailing_whitespace = false
1717

18-
[*.sh]
19-
indent_style = tab
20-
2118
[*.{yaml,yml}]
2219
trim_trailing_whitespace = false
2320

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
/.github export-ignore
2+
/etc export-ignore
3+
/docs export-ignore
14
/.editorconfig export-ignore
25
/.gitattributes export-ignore
3-
/.github export-ignore
46
/.gitignore export-ignore
57
/README.md export-ignore
68
/behat.yml.dist export-ignore
@@ -12,3 +14,5 @@
1214
/psalm-baseline.xml export-ignore
1315
/psalm.xml export-ignore
1416
/tests export-ignore
17+
/CHANGELOG.md export-ignore
18+
/UPGRADE.md export-ignore

.github/dependabot.yml

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

.github/workflows/build.yaml

Lines changed: 72 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ env:
1313

1414
jobs:
1515
coding-standards:
16-
name: "Coding Standards"
16+
name: "Coding Standards (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"
1717

1818
runs-on: "ubuntu-latest"
1919

2020
strategy:
2121
matrix:
2222
php-version:
23-
- "7.4"
23+
- "7.4" # Always use the lowest version of PHP since a higher version could create actual syntax errors in lower versions
2424

2525
dependencies:
2626
- "highest"
@@ -50,25 +50,40 @@ jobs:
5050
- name: "Check style"
5151
run: "composer check-style"
5252

53+
- name: "Rector"
54+
run: "vendor/bin/rector process --dry-run"
55+
5356
- name: "Lint yaml files"
5457
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)"
5558

5659
- name: "Lint twig files"
5760
run: "(cd tests/Application && bin/console lint:twig ../../src/Resources)"
5861

5962
dependency-analysis:
60-
name: "Dependency Analysis"
63+
name: "Dependency Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"
6164

6265
runs-on: "ubuntu-latest"
6366

6467
strategy:
6568
matrix:
6669
php-version:
6770
- "7.4"
71+
- "8.0"
72+
- "8.1"
73+
- "8.2"
6874

6975
dependencies:
76+
- "lowest"
7077
- "highest"
7178

79+
symfony:
80+
- "^5.4"
81+
- "^6.0"
82+
83+
exclude:
84+
- php-version: "7.4"
85+
symfony: "^6.0"
86+
7287
steps:
7388
- name: "Checkout"
7489
uses: "actions/checkout@v3"
@@ -79,86 +94,125 @@ jobs:
7994
coverage: "none"
8095
extensions: "${{ env.PHP_EXTENSIONS }}"
8196
php-version: "${{ matrix.php-version }}"
82-
tools: "composer-require-checker, composer-unused"
97+
tools: "composer-require-checker, composer-unused, flex"
98+
99+
- name: "Remove require-dev section in composer.json"
100+
run: "composer config --unset require-dev"
83101

84102
- name: "Install composer dependencies"
85103
uses: "ramsey/composer-install@v2"
104+
env:
105+
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
86106
with:
87107
dependency-versions: "${{ matrix.dependencies }}"
88108

89109
- name: "Run maglnet/composer-require-checker"
90-
run: "composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
110+
run: "composer-require-checker check"
91111

92112
- name: "Run composer-unused/composer-unused"
93113
run: "composer-unused"
94114

95115
static-code-analysis:
96-
name: "Static Code Analysis"
116+
name: "Static Code Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"
97117

98118
runs-on: "ubuntu-latest"
99119

100120
strategy:
101121
matrix:
102122
php-version:
103123
- "7.4"
124+
- "8.0"
125+
- "8.1"
126+
- "8.2"
104127

105128
dependencies:
129+
- "lowest"
106130
- "highest"
107131

132+
symfony:
133+
- "^5.4"
134+
- "^6.0"
135+
136+
exclude:
137+
- php-version: "7.4"
138+
symfony: "^6.0"
139+
108140
steps:
109141
- name: "Checkout"
110142
uses: "actions/checkout@v3"
111143

112144
- name: "Setup PHP, with composer and extensions"
113145
uses: "shivammathur/setup-php@v2"
114146
with:
115-
php-version: "${{ matrix.php-version }}"
116-
extensions: "${{ env.PHP_EXTENSIONS }}"
117147
coverage: "none"
148+
extensions: "${{ env.PHP_EXTENSIONS }}"
149+
php-version: "${{ matrix.php-version }}"
150+
tools: "flex"
151+
152+
- name: "Remove sylius/sylius from composer.json"
153+
run: "composer remove --dev sylius/sylius --no-update --no-install"
118154

119155
- name: "Install composer dependencies"
120156
uses: "ramsey/composer-install@v2"
157+
env:
158+
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
121159
with:
122160
dependency-versions: "${{ matrix.dependencies }}"
123161

124162
- name: "Static analysis"
125-
run: "composer analyse"
163+
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}"
126164

127165
unit-tests:
128-
name: "Unit tests"
166+
name: "Unit tests (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"
129167

130168
runs-on: "ubuntu-latest"
131169

132170
strategy:
133171
matrix:
134172
php-version:
135173
- "7.4"
174+
- "8.0"
175+
- "8.1"
176+
- "8.2"
136177

137178
dependencies:
138-
- "lowest"
139179
- "highest"
140180

181+
symfony:
182+
- "^5.4"
183+
- "^6.0"
184+
185+
exclude:
186+
- php-version: "7.4"
187+
symfony: "^6.0"
188+
141189
steps:
142190
- name: "Checkout"
143191
uses: "actions/checkout@v3"
144192

145193
- name: "Setup PHP, with composer and extensions"
146194
uses: "shivammathur/setup-php@v2"
147195
with:
148-
php-version: "${{ matrix.php-version }}"
149-
extensions: "${{ env.PHP_EXTENSIONS }}"
150196
coverage: "none"
197+
extensions: "${{ env.PHP_EXTENSIONS }}"
198+
php-version: "${{ matrix.php-version }}"
199+
tools: "flex"
200+
201+
- name: "Remove sylius/sylius from composer.json"
202+
run: "composer remove --dev sylius/sylius --no-update --no-install"
151203

152204
- name: "Install composer dependencies"
153205
uses: "ramsey/composer-install@v2"
206+
env:
207+
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
154208
with:
155209
dependency-versions: "${{ matrix.dependencies }}"
156210

157-
- name: "Run phpspec"
158-
run: "composer phpspec"
159-
160211
- name: "Run phpunit"
161212
run: "composer phpunit"
213+
214+
- name: "Run phpspec"
215+
run: "composer phpspec"
162216

163217
integration-tests:
164218
name: "Integration tests"
@@ -241,14 +295,14 @@ jobs:
241295
if-no-files-found: "ignore"
242296

243297
code-coverage:
244-
name: "Code Coverage"
298+
name: "Code Coverage (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"
245299

246300
runs-on: "ubuntu-latest"
247301

248302
strategy:
249303
matrix:
250304
php-version:
251-
- "7.4"
305+
- "8.2"
252306

253307
dependencies:
254308
- "highest"

composer-require-checker.json

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

composer.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
"doctrine/persistence": "^1.3 || ^2.1",
1717
"league/uri": "^6.0",
1818
"league/uri-components": "^2.3",
19-
"setono/symfony-main-request-trait": "^1.0",
19+
"sylius/channel": "^1.0",
20+
"sylius/channel-bundle": "^1.0",
21+
"sylius/core-bundle": "^1.0",
22+
"sylius/product-bundle": "^1.0",
2023
"sylius/resource-bundle": "^1.6",
24+
"sylius/taxonomy-bundle": "^1.0",
25+
"sylius/ui-bundle": "^1.0",
2126
"symfony/config": "^5.4 || ^6.0",
2227
"symfony/console": "^5.4 || ^6.0",
2328
"symfony/dependency-injection": "^5.4 || ^6.0",
@@ -32,6 +37,7 @@
3237
"require-dev": {
3338
"api-platform/core": "^2.7",
3439
"lexik/jwt-authentication-bundle": "^2.16",
40+
"php-http/message-factory": "^1.1",
3541
"phpspec/phpspec": "^7.3",
3642
"phpspec/prophecy-phpunit": "^2.0",
3743
"phpunit/phpunit": "^9.6",
@@ -44,8 +50,7 @@
4450
"symfony/dotenv": "^5.4 || ^6.0",
4551
"symfony/intl": "^5.4 || ^6.0",
4652
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
47-
"symfony/webpack-encore-bundle": "^1.16",
48-
"weirdan/doctrine-psalm-plugin": "^2.8"
53+
"symfony/webpack-encore-bundle": "^1.16"
4954
},
5055
"prefer-stable": true,
5156
"autoload": {
@@ -65,17 +70,14 @@
6570
"allow-plugins": {
6671
"dealerdirect/phpcodesniffer-composer-installer": false,
6772
"ergebnis/composer-normalize": true,
73+
"ocramius/package-versions": true,
6874
"symfony/thanks": false
6975
},
7076
"sort-packages": true
7177
},
7278
"scripts": {
73-
"analyse": [
74-
"@ensure-test-container-exists",
75-
"psalm"
76-
],
79+
"analyse": "psalm",
7780
"check-style": "ecs check",
78-
"ensure-test-container-exists": "[[ -f tests/Application/var/cache/test/ApplicationTests_Setono_SyliusRedirectPlugin_Application_KernelTestDebugContainer.xml ]] || tests/Application/bin/console cache:warmup --env=test",
7981
"fix-style": "ecs check --fix",
8082
"phpspec": "phpspec run",
8183
"phpunit": "phpunit",

0 commit comments

Comments
 (0)