From 20334b3b29dca992e3520685f33f75f7fcba8da6 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 28 Feb 2025 11:08:08 +0100 Subject: [PATCH 01/18] chore: dependency constraints (#6988) --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 71c570c..9c812aa 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,11 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^3.4 || ^4.0" + "api-platform/metadata": "^4.1" }, "extra": { "branch-alias": { - "dev-main": "4.0.x-dev", + "dev-main": "4.2.x-dev", "dev-3.4": "3.4.x-dev" }, "symfony": { From a41c0d6230c0ed60836c6bba60adb4d08b01e6e2 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 18 Apr 2025 10:39:51 +0200 Subject: [PATCH 02/18] ci: patch phpunit deprecations inside component (#7103) --- composer.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9c812aa..26b76ea 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,12 @@ } }, "require-dev": { - "phpunit/phpunit": "^11.2" - } + "phpunit/phpunit": "11.5.x-dev" + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/soyuka/phpunit" + } + ] } From 237c6c46acc2be98b5e0c60c6de8afc35c78cd37 Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 22 May 2025 15:13:30 +0200 Subject: [PATCH 03/18] chore: bump patch dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 26b76ea..d70d2f0 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^4.1" + "api-platform/metadata": "^4.1.11" }, "extra": { "branch-alias": { From 7369fe57889198eb9c3f3c274500ac8156a67c75 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Wed, 28 May 2025 10:03:08 +0200 Subject: [PATCH 04/18] ci: prefer-lowest to avoid bumping inter components dependencies (#7169) --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d70d2f0..3c8db3e 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "extra": { "branch-alias": { "dev-main": "4.2.x-dev", - "dev-3.4": "3.4.x-dev" + "dev-3.4": "3.4.x-dev", + "dev-4.1": "4.1.x-dev" }, "symfony": { "require": "^6.4 || ^7.0" @@ -44,5 +45,6 @@ "type": "vcs", "url": "https://github.com/soyuka/phpunit" } - ] + ], + "version": "4.1.12" } From ca916e1647baf97eee558f3ca1c167c41f2288f2 Mon Sep 17 00:00:00 2001 From: Maxime Helias Date: Mon, 2 Jun 2025 16:15:04 +0200 Subject: [PATCH 05/18] chore: remove 3.4 deprecation (#7188) --- Action/DocumentationAction.php | 132 --------------------------------- Action/EntrypointAction.php | 70 ----------------- 2 files changed, 202 deletions(-) delete mode 100644 Action/DocumentationAction.php delete mode 100644 Action/EntrypointAction.php diff --git a/Action/DocumentationAction.php b/Action/DocumentationAction.php deleted file mode 100644 index e507041..0000000 --- a/Action/DocumentationAction.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace ApiPlatform\Documentation\Action; - -use ApiPlatform\Documentation\Documentation; -use ApiPlatform\Documentation\DocumentationInterface; -use ApiPlatform\Metadata\Get; -use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface; -use ApiPlatform\Metadata\Util\ContentNegotiationTrait; -use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface; -use ApiPlatform\OpenApi\OpenApi; -use ApiPlatform\OpenApi\Serializer\ApiGatewayNormalizer; -use ApiPlatform\OpenApi\Serializer\LegacyOpenApiNormalizer; -use ApiPlatform\OpenApi\Serializer\OpenApiNormalizer; -use ApiPlatform\State\ProcessorInterface; -use ApiPlatform\State\ProviderInterface; -use Negotiation\Negotiator; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Generates the API documentation. - * - * @deprecated use ApiPlatform\Symfony\DocumentationAction instead - * - * @author Amrouche Hamza - */ -final class DocumentationAction -{ - use ContentNegotiationTrait; - - public function __construct( - private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, - private readonly string $title = '', - private readonly string $description = '', - private readonly string $version = '', - private readonly ?OpenApiFactoryInterface $openApiFactory = null, - private readonly ?ProviderInterface $provider = null, - private readonly ?ProcessorInterface $processor = null, - ?Negotiator $negotiator = null, - private readonly array $documentationFormats = [OpenApiNormalizer::JSON_FORMAT => ['application/vnd.openapi+json'], OpenApiNormalizer::FORMAT => ['application/json']], - ) { - $this->negotiator = $negotiator ?? new Negotiator(); - } - - /** - * @return DocumentationInterface|OpenApi|Response - */ - public function __invoke(?Request $request = null) - { - if (null === $request) { - return new Documentation($this->resourceNameCollectionFactory->create(), $this->title, $this->description, $this->version); - } - - $context = [ - 'api_gateway' => $request->query->getBoolean(ApiGatewayNormalizer::API_GATEWAY), - 'base_url' => $request->getBaseUrl(), - 'spec_version' => (string) $request->query->get(LegacyOpenApiNormalizer::SPEC_VERSION), - ]; - $request->attributes->set('_api_normalization_context', $request->attributes->get('_api_normalization_context', []) + $context); - $format = $this->getRequestFormat($request, $this->documentationFormats); - - if (null !== $this->openApiFactory && ('html' === $format || OpenApiNormalizer::FORMAT === $format || OpenApiNormalizer::JSON_FORMAT === $format || OpenApiNormalizer::YAML_FORMAT === $format)) { - return $this->getOpenApiDocumentation($context, $format, $request); - } - - return $this->getHydraDocumentation($context, $request); - } - - /** - * @param array $context - */ - private function getOpenApiDocumentation(array $context, string $format, Request $request): OpenApi|Response - { - if ($this->provider && $this->processor) { - $context['request'] = $request; - $operation = new Get( - class: OpenApi::class, - read: true, - serialize: true, - provider: fn () => $this->openApiFactory->__invoke($context), - normalizationContext: [ - ApiGatewayNormalizer::API_GATEWAY => $context['api_gateway'] ?? null, - LegacyOpenApiNormalizer::SPEC_VERSION => $context['spec_version'] ?? null, - ], - outputFormats: $this->documentationFormats - ); - - if ('html' === $format) { - $operation = $operation->withProcessor('api_platform.swagger_ui.processor')->withWrite(true); - } - - return $this->processor->process($this->provider->provide($operation, [], $context), $operation, [], $context); - } - - return $this->openApiFactory->__invoke($context); - } - - /** - * TODO: the logic behind the Hydra Documentation is done in a ApiPlatform\Hydra\Serializer\DocumentationNormalizer. - * We should transform this to a provider, it'd improve performances also by a bit. - * - * @param array $context - */ - private function getHydraDocumentation(array $context, Request $request): DocumentationInterface|Response - { - if ($this->provider && $this->processor) { - $context['request'] = $request; - $operation = new Get( - class: Documentation::class, - read: true, - serialize: true, - provider: fn () => new Documentation($this->resourceNameCollectionFactory->create(), $this->title, $this->description, $this->version) - ); - - return $this->processor->process($this->provider->provide($operation, [], $context), $operation, [], $context); - } - - return new Documentation($this->resourceNameCollectionFactory->create(), $this->title, $this->description, $this->version); - } -} diff --git a/Action/EntrypointAction.php b/Action/EntrypointAction.php deleted file mode 100644 index d93e1d9..0000000 --- a/Action/EntrypointAction.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace ApiPlatform\Documentation\Action; - -use ApiPlatform\Documentation\Entrypoint; -use ApiPlatform\Metadata\Get; -use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface; -use ApiPlatform\Metadata\Resource\ResourceNameCollection; -use ApiPlatform\OpenApi\Serializer\LegacyOpenApiNormalizer; -use ApiPlatform\State\ProcessorInterface; -use ApiPlatform\State\ProviderInterface; -use Symfony\Component\HttpFoundation\Request; - -/** - * Generates the API entrypoint. - * - * @deprecated use ApiPlatform\Symfony\EntrypointAction instead - * - * @author Kévin Dunglas - */ -final class EntrypointAction -{ - private static ResourceNameCollection $resourceNameCollection; - - public function __construct( - private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, - private readonly ProviderInterface $provider, - private readonly ProcessorInterface $processor, - private readonly array $documentationFormats = [], - ) { - } - - public function __invoke(Request $request) - { - self::$resourceNameCollection = $this->resourceNameCollectionFactory->create(); - $context = [ - 'request' => $request, - 'spec_version' => (string) $request->query->get(LegacyOpenApiNormalizer::SPEC_VERSION), - ]; - $request->attributes->set('_api_platform_disable_listeners', true); - $operation = new Get( - outputFormats: $this->documentationFormats, - read: true, - serialize: true, - class: Entrypoint::class, - provider: [self::class, 'provide'] - ); - $request->attributes->set('_api_operation', $operation); - $body = $this->provider->provide($operation, [], $context); - $operation = $request->attributes->get('_api_operation'); - - return $this->processor->process($body, $operation, [], $context); - } - - public static function provide(): Entrypoint - { - return new Entrypoint(self::$resourceNameCollection); - } -} From 43e00750144b09e669085d3a4a6e791d6da1556b Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 6 Jun 2025 16:02:15 +0200 Subject: [PATCH 06/18] fix: bump composer.json version nodes --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3c8db3e..6cd2cc5 100644 --- a/composer.json +++ b/composer.json @@ -46,5 +46,5 @@ "url": "https://github.com/soyuka/phpunit" } ], - "version": "4.1.12" + "version": "4.1.14" } From b74bc3b1e1306c26d03a3ea8e76a666df316da23 Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 6 Jun 2025 16:18:03 +0200 Subject: [PATCH 07/18] chore: missing "v" prefix in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6cd2cc5..1be9e48 100644 --- a/composer.json +++ b/composer.json @@ -46,5 +46,5 @@ "url": "https://github.com/soyuka/phpunit" } ], - "version": "4.1.14" + "version": "v4.1.15" } From 1a0ac988d659008ef8667d05bc9978863026bab8 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 6 Jun 2025 16:56:47 +0200 Subject: [PATCH 08/18] ci: remove version from composer to avoid release side effects (#7196) --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1be9e48..6be8bb7 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,5 @@ "type": "vcs", "url": "https://github.com/soyuka/phpunit" } - ], - "version": "v4.1.15" + ] } From c5a54336d8c51271aa5d54e57147cdee7162ab3a Mon Sep 17 00:00:00 2001 From: soyuka Date: Tue, 19 Aug 2025 10:04:29 +0200 Subject: [PATCH 09/18] chore: 4.2 branch alias --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6be8bb7..93a3278 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ }, "extra": { "branch-alias": { - "dev-main": "4.2.x-dev", + "dev-main": "4.3.x-dev", + "dev-4.2": "4.2.x-dev", "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev" }, From 5181186d9d0da3a2aaa449747af55bee1759969b Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 31 Oct 2025 17:12:05 +0100 Subject: [PATCH 10/18] chore: bump deps --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 93a3278..56a2729 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^4.1.11" + "api-platform/metadata": "^4.2" }, "extra": { "branch-alias": { From 8910f2a0aa7910ed807f128510553b24152e5ea5 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Sun, 30 Nov 2025 13:55:42 +0100 Subject: [PATCH 11/18] chore: support symfony 8 (#7561) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 56a2729..01bbdc9 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "dev-4.1": "4.1.x-dev" }, "symfony": { - "require": "^6.4 || ^7.0" + "require": "^6.4 || ^7.0 || ^8.0" }, "thanks": { "name": "api-platform/api-platform", From 873543a827df5c25b008bd730f2096701e1943b8 Mon Sep 17 00:00:00 2001 From: soyuka Date: Sat, 27 Dec 2025 22:56:46 +0100 Subject: [PATCH 12/18] ci: upgrade to phpunit 12 Remove soyuka/phpunit fork from all composer.json files and upgrade to PHPUnit 12.2. Update CI workflow to install PHPUnit before other steps and configure MongoDB conditional execution. Migrate tests from Prophecy to PHPUnit native mocking in FieldsBuilderTest and Symfony event listener tests. Remove unused dataprovider and fix warnings. --- composer.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 01bbdc9..ffc9291 100644 --- a/composer.json +++ b/composer.json @@ -39,12 +39,6 @@ } }, "require-dev": { - "phpunit/phpunit": "11.5.x-dev" - }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/soyuka/phpunit" - } - ] + "phpunit/phpunit": "^12.2" + } } From 9220cf161a047ab8e34bff577f2b5343f21c3ee0 Mon Sep 17 00:00:00 2001 From: Antoine Bluchet Date: Fri, 6 Mar 2026 10:30:10 +0100 Subject: [PATCH 13/18] chore: bump sub-components dependencies to ^4.3 (#7820) --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ffc9291..adfafba 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^4.2" + "api-platform/metadata": "^4.3" }, "extra": { "branch-alias": { @@ -40,5 +40,7 @@ }, "require-dev": { "phpunit/phpunit": "^12.2" - } + }, + "minimum-stability": "beta", + "prefer-stable": true } From a63a3a7f020b6a001b1228c5bd916e1a76887d1d Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 6 Mar 2026 16:07:49 +0100 Subject: [PATCH 14/18] chore: switch dev-main branch alias to 4.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index adfafba..64a8cfa 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-main": "4.3.x-dev", + "dev-main": "4.4.x-dev", "dev-4.2": "4.2.x-dev", "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev" From f07b444aef1f75bb07beb9f8d799213f05070e5f Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 30 Apr 2026 14:21:24 +0200 Subject: [PATCH 15/18] chore: allow phpunit ^11.5 for PHP 8.2 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPUnit 12 requires PHP 8.3+. Widen the constraint in the root and each component composer.json so PHP 8.2 resolves to 11.5 (LTS) and 8.3+ to 12.x. Removes the per-job "Force PHPUnit 11.5" workaround steps from CI. | Q | A | ------------- | --- | Branch? | 4.3 | Tickets | ∅ | License | MIT | Doc PR | ∅ --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 64a8cfa..0b46b32 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^12.2" + "phpunit/phpunit": "^11.5 || ^12.2" }, "minimum-stability": "beta", "prefer-stable": true From 0b9eb70f4a25bf83d86178f104e9cac72b8b4ffb Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 25 Jun 2026 17:18:03 +0200 Subject: [PATCH 16/18] chore: open 5.0 development line Bump dev-main branch alias 4.4.x-dev -> 5.0.x-dev across root and all 21 subpackage composer.json files. Update COMPOSER_ROOT_VERSION to 5.0.x-dev (was stale at 4.3.x-dev). The 4.4 branch was cut from the prior 4.4.x-dev HEAD before this bump to carry the 4.4 maintenance line. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0b46b32..fc662ae 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-main": "4.4.x-dev", + "dev-main": "5.0.x-dev", "dev-4.2": "4.2.x-dev", "dev-3.4": "3.4.x-dev", "dev-4.1": "4.1.x-dev" From 2d7454d1d8f0e7c2c6ded35637542aeedf504431 Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 25 Jun 2026 18:15:00 +0200 Subject: [PATCH 17/18] chore: require ^4.4@alpha for inter-package dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #7115 added cross-package calls new in 4.4 — getStateOptionsRepositoryMethod() in api-platform/state and the repositoryMethod constructor argument in api-platform/doctrine-common — that 4.4 provider code invokes. The old ^4.2/^4.3 sibling floors let `composer update --prefer-lowest` pull releases lacking these symbols, so the per-component lowest CI jobs failed with "undefined method" / "unknown named parameter". Floor all api-platform/* inter-package constraints at ^4.4. The @alpha stability flag is required because the subpackages set minimum-stability:beta, under which a plain ^4.4 would not match the 4.4.0-alpha prereleases. Revert to plain ^4.4 once 4.4.0 stable ships. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0b46b32..cb03468 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^4.3" + "api-platform/metadata": "^4.4@alpha" }, "extra": { "branch-alias": { From 80553b9250ad85c7040cd4720c78407a85f68ede Mon Sep 17 00:00:00 2001 From: soyuka Date: Mon, 29 Jun 2026 13:22:12 +0200 Subject: [PATCH 18/18] chore: bump inter-package constraints to ^5.0@alpha Completes 22ece5199 (open 5.0 dev line): root is 5.0.x-dev but the self-referential api-platform/* constraints were left at ^4.4@alpha, which is unresolvable in the component split-tests (published 4.4 alphas require metadata ^4.4, conflicting with the 5.0 root). --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 22b4349..b02d87e 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": ">=8.2", - "api-platform/metadata": "^4.4@alpha" + "api-platform/metadata": "^5.0@alpha" }, "extra": { "branch-alias": {