-1

I'm trying to upgrade a project from Symfony 4.4 to 5. I have a problem with api-platform/core package.

I updated all symfony/* package to 4.4.* to 5.0.* and updated api_platform/core from 2.6 to 2.6.5

When I run composer update --with-all-dependencies it 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.

Thanx for your help

Lolo
  • 527
  • 2
  • 8
  • 26

1 Answers1

2

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

...this obviously forbids using Symfony 5.0 with api-platform/core.


Also, Symfony 5.0 is out of support since over a year. Please consider using a supported version of Symfony, like 5.3

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
  • 1
    I wanted to upgrade 4.4 to 5.0, after 50. to 5.1, ... :) I try to ugrade to 5.3. thanx – Lolo Sep 06 '21 at 11:42