Skip to content

Commit 1f6d5c9

Browse files
committed
Merge 4.1
2 parents 0411cd9 + 108d92d commit 1f6d5c9

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,19 @@ jobs:
264264
continue-on-error: true
265265

266266
phpunit-components:
267-
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php }})
267+
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.deprecations && 'no deprecations' || '' }})
268268
runs-on: ubuntu-latest
269269
timeout-minutes: 20
270270
strategy:
271271
matrix:
272272
php:
273-
- '8.2'
274-
- '8.3'
275-
- '8.4'
273+
- version: '8.2'
274+
- version: '8.3'
275+
- version: '8.4'
276+
- version: '8.4'
277+
coverage: true
278+
- version: '8.4'
279+
deprecations: true
276280
component:
277281
- api-platform/doctrine-common
278282
- api-platform/doctrine-orm
@@ -290,32 +294,33 @@ jobs:
290294
- api-platform/state
291295
- api-platform/symfony
292296
- api-platform/validator
293-
include:
294-
- php: '8.2'
295-
- php: '8.3'
296-
- php: '8.4'
297-
coverage: true
298297
fail-fast: false
299298
steps:
300299
- name: Checkout
301300
uses: actions/checkout@v4
302301
- name: Setup PHP
303302
uses: shivammathur/setup-php@v2
304303
with:
305-
php-version: ${{ matrix.php }}
304+
php-version: ${{ matrix.php.version }}
306305
tools: pecl, composer
307306
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
308307
ini-values: memory_limit=-1
308+
- name: Allow unstable project dependencies
309+
if: matrix.php.deprecations == true
310+
run: composer config minimum-stability dev
309311
- name: Run ${{ matrix.component }} install
310312
run: |
311313
composer global require soyuka/pmu
312314
composer global config allow-plugins.soyuka/pmu true --no-interaction
313315
composer global link . --permanent
314316
composer ${{matrix.component}} update
317+
- name: Patch phpunit
318+
if: matrix.php.deprecations == true
319+
run: git apply --directory vendor/phpunit/phpunit .github/patches/phpunit.patch
315320
- name: Run ${{ matrix.component }} tests
316321
run: |
317322
mkdir -p /tmp/build/logs/phpunit
318-
composer ${{matrix.component}} test --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }}
323+
composer ${{matrix.component}} test --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.php.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }} ${{ matrix.php.deprecations && '--fail-on-deprecation --display-deprecations' || '' }}
319324
- name: Upload test artifacts
320325
if: always()
321326
uses: actions/upload-artifact@v4

src/Metadata/Resource/Factory/OperationDefaultsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use ApiPlatform\Metadata\ApiResource;
1717
use ApiPlatform\Metadata\CollectionOperationInterface;
1818
use ApiPlatform\Metadata\Delete;
19-
use ApiPlatform\Metadata\Error;
2019
use ApiPlatform\Metadata\Exception\RuntimeException;
2120
use ApiPlatform\Metadata\Get;
2221
use ApiPlatform\Metadata\GetCollection;
@@ -32,6 +31,7 @@
3231
use ApiPlatform\Metadata\Patch;
3332
use ApiPlatform\Metadata\Post;
3433
use ApiPlatform\Metadata\Util\CamelCaseToSnakeCaseNameConverter;
34+
use ApiPlatform\State\ApiResource\Error;
3535
use ApiPlatform\State\CreateProvider;
3636
use ApiPlatform\Validator\Exception\ValidationException;
3737
use Psr\Log\LoggerInterface;

0 commit comments

Comments
 (0)