Repository navigation
feat(composer): allow API Platform 5 - #89
Merged
Merged
Conversation
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 <noreply@anthropic.com>
Member
|
@mwansinck Thank you for the PR, this looks good. One request before merge: with this change the highest CI jobs resolve API Platform 5, so 4.2–4.4 lose CI coverage (lowest stays on 4.1.30). Could you add a matrix job pinned to 4.4, for example |
With API Platform 5 allowed, the highest jobs resolve 5.x and the lowest job stays on 4.1, so 4.2-4.4 lost CI coverage. Add a PHP 8.5 highest job that runs `composer require --dev --no-update api-platform/core:^4.4` before installing. api-platform is listed in the matrix with an empty default; otherwise GitHub merges the include into the existing PHP 8.5 highest job instead of adding a new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Thanks! Added a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The bundle cannot be installed alongside API Platform 5:
api-platform/symfonyis constrained to^3.4 || ^4.0, so Composer refuses to resolve a project that requiresapi-platform/core:^5.0.Changes
api-platform/symfony(and the dev requirementapi-platform/core) to^3.4 || ^4.0 || ^5.0. No source changes were needed.symfony/http-clientas a dev requirement. With API Platform 5.0.2 the functional test kernel fails to compile without it:TestClientPassloadsApiPlatform\Symfony\Bundle\Test\Client, which usesHttpClientTrait(Error: Trait "Symfony\Component\HttpClient\HttpClientTrait" not found, 7 tests inConfigurationTest).Verification
Run locally:
bin/phpunit: 100 tests, 209 assertions, OKbin/phpstan analyse: no errorsbin/php-cs-fixer check: nothing to fixcomposer validate --strict: validcomposer update --with api-platform/core:^4.0), on PHP 8.5.10:bin/phpunit: 100 tests, 209 assertions, OK--prefer-lowest --prefer-stablejob, on PHP 8.2.34 (php:8.2-clicontainer). This resolves to API Platform 4.1.30 (Symfony 6.4.0, Doctrine ORM 3.0.0, DoctrineBundle 2.13.0):bin/phpunit: 100 tests, 209 assertions, OKcomposer validate --strict: validcomposer update --prefer-lowest --prefer-stable --no-security-blocking --with api-platform/core:^3.4), on PHP 8.2.34:bin/phpunit: 100 tests, 209 assertions, OKNote on the lowest job: it does not install API Platform 3.4. Composer blocks every 3.4 release because of security advisories, so
--prefer-lowestfalls back to 4.1.30. API Platform 3.4 is only reachable with--no-security-blocking, which is how the last run above was done.🤖 Generated with Claude Code