Skip to content

Commit 38232ec

Browse files
Merge branch 'api-platform:main' into feat/new-doctrine-iri-search-filters
2 parents 773ce67 + cff61ea commit 38232ec

File tree

235 files changed

+5728
-2175
lines changed

Some content is hidden

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

235 files changed

+5728
-2175
lines changed

.commitlintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"elasticsearch",
1414
"mongodb",
1515
"jsonld",
16+
"httpcache",
1617
"hydra",
1718
"httpcache",
1819
"jsonapi",

.github/workflows/ci.yml

Lines changed: 148 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
continue-on-error: true
265265

266266
phpunit-components:
267-
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.coverage && 'coverage' || '' }}${{ matrix.php.deprecations && 'no deprecations' || '' }})
267+
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.coverage && 'coverage' || '' }}
268268
runs-on: ubuntu-latest
269269
timeout-minutes: 20
270270
strategy:
@@ -274,8 +274,6 @@ jobs:
274274
- version: '8.3'
275275
- version: '8.4'
276276
coverage: true
277-
- version: '8.4'
278-
deprecations: true
279277
component:
280278
- api-platform/doctrine-common
281279
- api-platform/doctrine-orm
@@ -309,18 +307,13 @@ jobs:
309307
composer global require soyuka/pmu
310308
composer global config allow-plugins.soyuka/pmu true --no-interaction
311309
composer global link . --permanent
312-
- name: Allow unstable project dependencies
313-
if: matrix.php.deprecations == true
314-
run: |
315-
cd $(composer ${{matrix.component}} --cwd)
316-
composer config minimum-stability dev
317310
- name: Run ${{ matrix.component }} install
318311
run: |
319312
composer ${{matrix.component}} update
320313
- name: Run ${{ matrix.component }} tests
321314
run: |
322315
mkdir -p /tmp/build/logs/phpunit
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' || '' }}
316+
composer ${{matrix.component}} test --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.php.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }}
324317
- name: Upload test artifacts
325318
if: always()
326319
uses: actions/upload-artifact@v4
@@ -347,6 +340,56 @@ jobs:
347340
php-coveralls --coverage_clover=/tmp/build/logs/phpunit/clover.xml
348341
continue-on-error: true
349342

343+
phpunit-components-fail-deprecation:
344+
name: PHPUnit no deprecations ${{ matrix.component }} (PHP ${{ matrix.php.version }}
345+
runs-on: ubuntu-latest
346+
timeout-minutes: 20
347+
strategy:
348+
matrix:
349+
php:
350+
- version: '8.4'
351+
component:
352+
- api-platform/doctrine-common
353+
- api-platform/doctrine-orm
354+
- api-platform/doctrine-odm
355+
- api-platform/metadata
356+
- api-platform/hydra
357+
- api-platform/json-api
358+
- api-platform/json-schema
359+
- api-platform/elasticsearch
360+
- api-platform/openapi
361+
- api-platform/graphql
362+
- api-platform/http-cache
363+
- api-platform/ramsey-uuid
364+
- api-platform/serializer
365+
- api-platform/state
366+
- api-platform/symfony
367+
- api-platform/validator
368+
fail-fast: false
369+
steps:
370+
- name: Checkout
371+
uses: actions/checkout@v4
372+
- name: Setup PHP
373+
uses: shivammathur/setup-php@v2
374+
with:
375+
php-version: ${{ matrix.php.version }}
376+
tools: pecl, composer
377+
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
378+
ini-values: memory_limit=-1
379+
- name: Linking
380+
run: |
381+
composer global require soyuka/pmu
382+
composer global config allow-plugins.soyuka/pmu true --no-interaction
383+
composer global link . --permanent
384+
- name: Run ${{ matrix.component }} install
385+
run: |
386+
composer ${{matrix.component}} update
387+
- name: Run ${{ matrix.component }} tests
388+
run: |
389+
mkdir -p /tmp/build/logs/phpunit
390+
cd $(composer ${{matrix.component}} --cwd)
391+
./vendor/bin/phpunit --fail-on-deprecation --display-deprecations --log-junit "/tmp/build/logs/phpunit/junit.xml"
392+
350393
behat:
351394
name: Behat (PHP ${{ matrix.php }})
352395
runs-on: ubuntu-latest
@@ -427,26 +470,6 @@ jobs:
427470
export PATH="$PATH:$HOME/.composer/vendor/bin"
428471
php-coveralls --coverage_clover=build/logs/behat/clover.xml
429472
continue-on-error: true
430-
- name: Export OpenAPI documents
431-
run: |
432-
mkdir -p build/out/openapi
433-
tests/Fixtures/app/console api:openapi:export -o build/out/openapi/openapi_v3.json
434-
tests/Fixtures/app/console api:openapi:export --yaml -o build/out/openapi/openapi_v3.yaml
435-
- name: Setup node
436-
uses: actions/setup-node@v4
437-
with:
438-
node-version: '14'
439-
- name: Validate OpenAPI documents
440-
run: |
441-
npx swagger-cli validate build/out/openapi/openapi_v3.json
442-
npx swagger-cli validate build/out/openapi/openapi_v3.yaml
443-
- name: Upload OpenAPI artifacts
444-
if: always()
445-
uses: actions/upload-artifact@v4
446-
with:
447-
name: openapi-docs-php${{ matrix.php }}
448-
path: build/out/openapi
449-
continue-on-error: true
450473

451474
postgresql:
452475
name: Behat (PHP ${{ matrix.php }}) (PostgreSQL)
@@ -726,8 +749,60 @@ jobs:
726749
php-coveralls --coverage_clover=build/logs/behat/clover.xml
727750
continue-on-error: true
728751

729-
elasticsearch:
730-
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch)
752+
elasticsearch-v9:
753+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v9)
754+
runs-on: ubuntu-latest
755+
timeout-minutes: 20
756+
strategy:
757+
matrix:
758+
php:
759+
- '8.4'
760+
fail-fast: false
761+
env:
762+
APP_ENV: elasticsearch
763+
steps:
764+
- name: Checkout
765+
uses: actions/checkout@v4
766+
- name: Configure sysctl limits
767+
run: |
768+
sudo swapoff -a
769+
sudo sysctl -w vm.swappiness=1
770+
sudo sysctl -w fs.file-max=262144
771+
sudo sysctl -w vm.max_map_count=262144
772+
- name: Runs Elasticsearch
773+
uses: elastic/elastic-github-actions/elasticsearch@master
774+
with:
775+
stack-version: '9.0.0'
776+
security-enabled: false
777+
- name: Setup PHP
778+
uses: shivammathur/setup-php@v2
779+
with:
780+
php-version: ${{ matrix.php }}
781+
tools: pecl, composer
782+
extensions: intl, bcmath, curl, openssl, mbstring, mongodb
783+
coverage: none
784+
ini-values: memory_limit=-1
785+
- name: Get composer cache directory
786+
id: composercache
787+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
788+
- name: Cache dependencies
789+
uses: actions/cache@v4
790+
with:
791+
path: ${{ steps.composercache.outputs.dir }}
792+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
793+
restore-keys: ${{ runner.os }}-composer-
794+
- name: Update project dependencies
795+
run: |
796+
composer global require soyuka/pmu
797+
composer global config allow-plugins.soyuka/pmu true --no-interaction
798+
composer global link .
799+
- name: Clear test app cache
800+
run: tests/Fixtures/app/console cache:clear --ansi
801+
- name: Run Behat tests
802+
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
803+
804+
elasticsearch-v8:
805+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v8)
731806
runs-on: ubuntu-latest
732807
timeout-minutes: 20
733808
strategy:
@@ -773,6 +848,7 @@ jobs:
773848
composer global require soyuka/pmu
774849
composer global config allow-plugins.soyuka/pmu true --no-interaction
775850
composer global link .
851+
composer require elasticsearch/elasticsearch "^8.4" -W
776852
- name: Clear test app cache
777853
run: tests/Fixtures/app/console cache:clear --ansi
778854
- name: Run Behat tests
@@ -1229,26 +1305,53 @@ jobs:
12291305
name: behat-logs-php${{ matrix.php }}
12301306
path: build/logs/behat
12311307
continue-on-error: true
1308+
1309+
openapi:
1310+
name: OpenAPI
1311+
runs-on: ubuntu-latest
1312+
timeout-minutes: 20
1313+
strategy:
1314+
matrix:
1315+
php:
1316+
- '8.4'
1317+
fail-fast: false
1318+
steps:
1319+
- name: Checkout
1320+
uses: actions/checkout@v4
1321+
- name: Setup PHP
1322+
uses: shivammathur/setup-php@v2
1323+
with:
1324+
php-version: ${{ matrix.php }}
1325+
tools: pecl, composer
1326+
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
1327+
ini-values: memory_limit=-1
1328+
- name: Setup node
1329+
uses: actions/setup-node@v4
1330+
with:
1331+
node-version: '22'
1332+
- name: Get composer cache directory
1333+
id: composercache
1334+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
1335+
- name: Cache dependencies
1336+
uses: actions/cache@v4
1337+
with:
1338+
path: ${{ steps.composercache.outputs.dir }}
1339+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
1340+
restore-keys: ${{ runner.os }}-composer-
1341+
- name: Update project dependencies
1342+
run: |
1343+
composer global require soyuka/pmu
1344+
composer global config allow-plugins.soyuka/pmu true --no-interaction
1345+
composer global link .
1346+
- name: Clear test app cache
1347+
run: tests/Fixtures/app/console cache:clear --ansi
12321348
- name: Export OpenAPI documents
12331349
run: |
12341350
mkdir -p build/out/openapi
1235-
tests/Fixtures/app/console api:openapi:export -o build/out/openapi/openapi_v3.json
12361351
tests/Fixtures/app/console api:openapi:export --yaml -o build/out/openapi/openapi_v3.yaml
1237-
- name: Setup node
1238-
uses: actions/setup-node@v4
1239-
with:
1240-
node-version: '14'
12411352
- name: Validate OpenAPI documents
12421353
run: |
1243-
npx swagger-cli validate build/out/openapi/openapi_v3.json
1244-
npx swagger-cli validate build/out/openapi/openapi_v3.yaml
1245-
- name: Upload OpenAPI artifacts
1246-
if: always()
1247-
uses: actions/upload-artifact@v4
1248-
with:
1249-
name: openapi-docs-php${{ matrix.php }}
1250-
path: build/out/openapi
1251-
continue-on-error: true
1354+
npx @quobix/vacuum lint -r tests/Fixtures/app/ruleset.yaml build/out/openapi/openapi_v3.yaml -d --ignore-array-circle-ref --ignore-polymorph-circle-ref -b --no-clip
12521355
12531356
laravel:
12541357
name: Laravel (PHP ${{ matrix.php }})

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# Changelog
22

3+
## v4.1.11 - v4.1.12
4+
5+
### Bug fixes
6+
7+
* [b14a463a9](https://github.com/api-platform/core/commit/b14a463a9da8a285eba1b0adc63ca4121efb0dce) fix(laravel): register error handler without graphql
8+
9+
## v4.1.10
10+
11+
### Bug fixes
12+
13+
* [329acf21e](https://github.com/api-platform/core/commit/329acf21e3a8618136a21b9121c5891f1fe6b9e8) fix(metadata): infer parameter string type from schema (#7161)
14+
* [5459ba375](https://github.com/api-platform/core/commit/5459ba375b0e7ffd1c783a6e18a6452769eaff46) fix(metadata): parameter cast to array flag (#7160)
15+
* [fe73002bf](https://github.com/api-platform/core/commit/fe73002bf5ae64adb1eb9e310dc62ff158de094d) fix(laravel): duplicated property names
16+
* [b0390080e](https://github.com/api-platform/core/commit/b0390080e90be9ac494c8b4d968e59a4962f32ca) fix(laravel): name convert validation property path
17+
* [730d17a30](https://github.com/api-platform/core/commit/730d17a306df4b92082484a19e82c5e150537331) fix(laravel): validate the model instead of body
18+
* [4d66f5ef3](https://github.com/api-platform/core/commit/4d66f5ef313fe3857611e8345702a10019c79ec5) fix(laravel): persist embeded relations with groups
19+
* [39123942a](https://github.com/api-platform/core/commit/39123942a0e1ff9dfb1e46f4a410160e3cd3fbd7) fix(laravel): register error handler without graphql
20+
* [fd010ea1b](https://github.com/api-platform/core/commit/fd010ea1be86073f5d8905d5640846390ade7ce6) fix(openapi): nullable externalDocs return type
21+
* [470c2e8bd](https://github.com/api-platform/core/commit/470c2e8bdf8d7a7502c02d2b681ced2001e2c1cc) fix(httpcache): iri cache tag for collection operation with path parameter
22+
* [9c0dbb653](https://github.com/api-platform/core/commit/9c0dbb65319beb89193e653e14c99352ac529a55) fix(state): do not expose FQCN in DeserializeProvider on PartialDenormalizationException (#7158)
23+
* [f78986000](https://github.com/api-platform/core/commit/f789860009888582791611a31d6084c620050615) fix(serializer): exception message to not expose resource FQCN (#7156)
24+
25+
### Features
26+
27+
* [767fa926b](https://github.com/api-platform/core/commit/767fa926b10bef771e896300b8e796287392d8c0) feat(laravel): add name_converter option
28+
29+
## v4.1.9
30+
31+
### Bug fixes
32+
33+
* [4dd0cdfc4](https://github.com/api-platform/core/commit/4dd0cdfc4a7f4cc73e7e67a49ee790ed1aaf5707) fix(doctrine): support integer-backed enums in BackedEnumFilter (#7127)
34+
* [70a922573](https://github.com/api-platform/core/commit/70a9225737bece18ad4b66b8ac636c38b2a1008a) fix: error formats (#7148)
35+
* [723d041c4](https://github.com/api-platform/core/commit/723d041c47467d8be0d8a0f20431da9de0a87c5a) fix(metadata): xml PHPize HTTP cache headers (#7140)
36+
* [d3d0ca21b](https://github.com/api-platform/core/commit/d3d0ca21bd45a8383e3e51166a65162be93655bf) fix(serializer): invalid uri variable 400 response (#7135)
37+
38+
## v4.1.8
39+
40+
### Bug fixes
41+
42+
* [0cd9b9f70](https://github.com/api-platform/core/commit/0cd9b9f7002829a6238ed4a1731c3a123c4a91c4) fix: backport handling of union/intersection type in item normalizer (#7106)
43+
* [0fc0904b9](https://github.com/api-platform/core/commit/0fc0904b9409e81041d4d5ae48d699f3360208fc) fix(metadata): correct class to exclude defaults (#7088)
44+
* [5145a8383](https://github.com/api-platform/core/commit/5145a8383c8e234012b957a36701ec824774a817) fix: filtering not using strategy set in attribute when strategy not set per property (#7136)
45+
* [613bb5b75](https://github.com/api-platform/core/commit/613bb5b75fe6cbc79c99e06bcbd664fc3f25c167) fix(doctrine): filters schema for dates and numbers (#7131)
46+
* [ed1ef2594](https://github.com/api-platform/core/commit/ed1ef2594e72180e5fe153e762809e3c22b29e7f) fix(state): specify :property parameter properties (#7110)
47+
* [f55606b01](https://github.com/api-platform/core/commit/f55606b01179703fb4be44f1b66a36136852f154) fix(serializer): throw NotNormalizableValueException when resource not found or invalid IRI on denormalization
48+
* [3faf5d4b4](https://github.com/api-platform/core/commit/3faf5d4b44f7c39d7a9d6ecbcfdf90f7061f1b6f) fix(doctrine): order filter instance service
49+
* [0ff950f37](https://github.com/api-platform/core/commit/0ff950f376345ff6a6d39a202b8bef15c3e423d2) fix: type info deprecations to baseline
50+
* [d93d580a1](https://github.com/api-platform/core/commit/d93d580a1dbaf6a1af5f05f0ebde2f7b68d75d25) fix: command name deprecation
51+
352
## v4.1.7
453

554
### Bug fixes

0 commit comments

Comments
 (0)