Symfony 4 => 5:ApiPlatform 问题

Symfony 4 => 5 : Problem with ApiPlatform

我正在尝试将项目从 Symfony 4.4 升级到 5。api-platform/core 包有问题。

我将所有 symfony/* 包更新到 4.4.* 到 5.0.*,并将 api_platform/core 从 2.6 更新到 2.6.5

当我 运行 composer update --with-all-dependencies 时 returns :

Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.0.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires api-platform/core ^2.6.5 -> satisfiable by api-platform/core[v2.6.5].
    - api-platform/core v2.6.5 requires symfony/http-foundation ^4.4 || ^5.1 -> found symfony/http-foundation[v4.4.0, ..., v4.4.30, v5.1.0, ..., v5.3.7] but these were not loaded, likely because it conflicts with another require.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

感谢您的帮助

api-platform/core v2.6.5 requires symfony/http-foundation ^4.4 || ^5.1

...这显然禁止将 Symfony 5.0 与 api-platform/core.

一起使用

此外,Symfony 5.0 已停止支持一年多了。请考虑使用受支持的 Symfony 版本,例如 5.3