dunglas / symfony-docker

A Docker-based installer and runtime for Symfony. Install: download and `docker compose up`.
https://dunglas.dev/2021/12/symfonys-new-native-docker-support-symfony-world/
2.59k stars 772 forks source link

Project installation from entrypoint.sh fails because requirements cannot be satisfied #516

Closed Genchou closed 11 months ago

Genchou commented 11 months ago

Following exact steps mentioned in readme after cloning the repo, commands for first time run in the entrypoint (composer create-project) fail with the following error :

backend-symfony-php-1  | Your requirements could not be resolved to an installable set of packages.
backend-symfony-php-1  |
backend-symfony-php-1  |   Problem 1
backend-symfony-php-1  |     - runtime/frankenphp-symfony[0.1.0, ..., 0.1.1] require symfony/dependency-injection ^5.4 || ^6.0 -> found symfony/dependency-injection[v5.4.0, ..., v5.4.33, v6.0.0, ..., v6.4.1] but these were not loaded, likely because it conflicts with another require.
backend-symfony-php-1  |     - Root composer.json requires runtime/frankenphp-symfony * -> satisfiable by runtime/frankenphp-symfony[0.1.0, 0.1.1].
backend-symfony-php-1  |
backend-symfony-php-1  | Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
kieransweetman commented 11 months ago

if you go into your composer.json you can add the following lines under the 'require' object:

"symfony/runtime": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0"

and then update with composer update

note this is obviously a quick solution if you just want to have a running container (like me)

LaurentSanson commented 11 months ago

Hi @Genchou ,

While the dependency runtime/frankenphp-symfony will be updated, you can follow the documentation and build with specific version of Symfony :

SYMFONY_VERSION=6.4.* docker compose up --pull always -d --wait

maxhelias commented 11 months ago

It's an composer dependency issue. Update your dependency and it should be fine.