From 04bb124ca5df376bdce0d1c68df988a5d5cb407e Mon Sep 17 00:00:00 2001 From: Marco Wansinck Date: Mon, 5 Oct 2026 16:56:52 +0200 Subject: [PATCH] feat(composer): allow API Platform 5 Widen api-platform/symfony (and the dev requirement api-platform/core) to also accept ^5.0. No source changes are needed. symfony/http-client is added as a dev requirement: with API Platform 5 the functional test kernel fails to compile without it (TestClientPass loads ApiPlatform\Symfony\Bundle\Test\Client, which uses HttpClientTrait). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + README.md | 8 ++++---- composer.json | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index beaf41a..d842273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). `TranslationsEagerLoadingExtension`), so listing N resources issues one query instead of one translation query per entity per locale; disable with the `eager_load_translations` option (#10) +- Support for API Platform 5: `api-platform/symfony` now also allows `^5.0` ### Changed - Modern bundle layout: the bundle class extends `AbstractBundle` and services diff --git a/README.md b/README.md index 34201db..57768b5 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ Translation bundle for [API Platform](https://api-platform.com/) based on [Syliu Supported versions: ------------------- -| Version | PHP | API Platform | Doctrine ORM | -|----------------------|--------|------------------|--------------| -| 2.x (`master`) | `^8.2` | `^3.4 \|\| ^4.0` | `^3.0` | -| 1.4 | `^8.1` | `^2.1 \|\| ^3.0` | `^3.0` | +| Version | PHP | API Platform | Doctrine ORM | +|----------------------|--------|----------------------------|--------------| +| 2.x (`master`) | `^8.2` | `^3.4 \|\| ^4.0 \|\| ^5.0` | `^3.0` | +| 1.4 | `^8.1` | `^2.1 \|\| ^3.0` | `^3.0` | Installation: ------------- diff --git a/composer.json b/composer.json index 20396cf..fc19f7d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": "^8.2", - "api-platform/symfony": "^3.4 || ^4.0", + "api-platform/symfony": "^3.4 || ^4.0 || ^5.0", "doctrine/orm": "^3.0", "doctrine/doctrine-bundle": "^2.13 || ^3.0", "symfony/config": "^6.4 || ^7.0 || ^8.0", @@ -29,7 +29,8 @@ "friendsofphp/php-cs-fixer": "^3.95", "symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0", "symfony/validator": "^6.4 || ^7.0 || ^8.0", - "api-platform/core": "^3.4 || ^4.0" + "api-platform/core": "^3.4 || ^4.0 || ^5.0", + "symfony/http-client": "^6.4 || ^7.0 || ^8.0" }, "prefer-stable": true, "autoload": {