Skip to content

feat(composer): allow API Platform 5 - #89

Open
mwansinck wants to merge 1 commit into
Locastic:masterfrom
webstacknl:api-platform-5
Open

mwansinck wants to merge 1 commit into
Locastic:masterfrom
webstacknl:api-platform-5

Conversation

@mwansinck

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Issues -
License MIT

Problem

The bundle cannot be installed alongside API Platform 5: api-platform/symfony is constrained to ^3.4 || ^4.0, so Composer refuses to resolve a project that requires api-platform/core:^5.0.

Changes

  • Widen api-platform/symfony (and the dev requirement api-platform/core) to ^3.4 || ^4.0 || ^5.0. No source changes were needed.
  • Add symfony/http-client as a dev requirement. With API Platform 5.0.2 the functional test kernel fails to compile without it: TestClientPass loads ApiPlatform\Symfony\Bundle\Test\Client, which uses HttpClientTrait (Error: Trait "Symfony\Component\HttpClient\HttpClientTrait" not found, 7 tests in ConfigurationTest).
  • Update the supported-versions table in the README and add a line to the Unreleased section of the changelog.

Verification

Run locally on PHP 8.5.10:

  • API Platform 5.0.2 (Symfony 8.1.8, Doctrine ORM 3.7.3, DoctrineBundle 3.3.2):
    • bin/phpunit: 100 tests, 209 assertions, OK
    • bin/phpstan analyse: no errors
    • bin/php-cs-fixer check: nothing to fix
    • composer validate --strict: valid
  • API Platform 4.4.3 (composer update --with api-platform/core:^4.0):
    • bin/phpunit: 100 tests, 209 assertions, OK

Not run locally: the PHP 8.2 / --prefer-lowest job (API Platform 3.4); that is left to CI.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant