-2

我正在尝试将项目从 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 它返回:

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.

感谢您的帮助

4

1 回答 1

1

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

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


此外,一年多以来,Symfony 5.0 就不再受支持。请考虑使用受支持的 Symfony 版本,例如 5.3

于 2021-09-06T11:37:48.170 回答