1313
1414jobs :
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"
0 commit comments