Skip to content

The incompatible version of symfony/console has been fixed#439

Closed
klsoft-web wants to merge 2 commits intoyiisoft:masterfrom
klsoft-web:fix-app
Closed

The incompatible version of symfony/console has been fixed#439
klsoft-web wants to merge 2 commits intoyiisoft:masterfrom
klsoft-web:fix-app

Conversation

@klsoft-web
Copy link

The symfony/console version 7.4 is incompatible because it requires symfony/string: ^7.2|^8.0. The 8.0 version requires PHP: >=8.4. However, the app template php: 8.2 - 8.5.

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (46666f1) to head (b0c5c0b).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #439   +/-   ##
=========================================
  Coverage     76.96%   76.96%           
  Complexity       29       29           
=========================================
  Files            11       11           
  Lines           178      178           
=========================================
  Hits            137      137           
  Misses           41       41           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samdark samdark requested a review from vjik January 30, 2026 16:32
@klsoft-web klsoft-web marked this pull request as draft January 30, 2026 16:38
@klsoft-web klsoft-web marked this pull request as ready for review January 30, 2026 16:46
@vjik
Copy link
Member

vjik commented Jan 30, 2026

^8.0 include 8.2 - 8.5.

Do you have any errors with current composer.json?

@klsoft-web
Copy link
Author

klsoft-web commented Jan 31, 2026

^8.0 include 8.2 - 8.5.

Do you have any errors with current composer.json?

Bug reproduction steps:

Actual: "symfony/console": "^7.4.1"

  1. docker run --rm -it -v "$(pwd):/app" --user $(id -u):$(id -g) composer/composer create-project yiisoft/app your_project
  2. cd your_project
  3. make up
  4. Open your browser, result: " Fatal error: Uncaught RuntimeException: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.4.0". You are running 8.2.30. in /app/vendor/composer/platform_check.php on line 22"

Fix: "symfony/console": "<=7.3"

  1. git clone git@github.com:yiisoft/app.git
  2. cd app
  3. Replace "symfony/console": "^7.4.1" with "symfony/console": "<=7.3" in the composer.json
  4. docker run --rm -it -v "$(pwd):/app" --user $(id -u):$(id -g) composer/composer create-project
  5. make up
  6. Open your browser, result: OK

@samdark
Copy link
Member

samdark commented Jan 31, 2026

Aha. That's not the issue of the dependency itself but of the documentation that uses the composer/composer image, which is of a different PHP version than what's actually used by the app.

@vjik
Copy link
Member

vjik commented Jan 31, 2026

You use different PHP in composer/composer (i think, PHP 8.4) and in docker (PHP 8.2). So, this leads to problem.
Run composer install via your docker image with PHP 8.2.

@vjik vjik closed this Jan 31, 2026
@samdark
Copy link
Member

samdark commented Jan 31, 2026

I'll fix it in the guide.

@samdark
Copy link
Member

samdark commented Jan 31, 2026

yiisoft/docs@203d06f

@klsoft-web
Copy link
Author

Aha. That's not the issue of the dependency itself but of the documentation that uses the composer/composer image, which is of a different PHP version than what's actually used by the app.

That's not correct.
PHP version from Dockerfile: FROM dunglas/frankenphp:1-php8.2-bookworm AS base (https://github.com/yiisoft/app/blob/master/docker/Dockerfile#L3C1-L3C50)
I'm sure it must work with the minimum required version of PHP 8.2.

@klsoft-web
Copy link
Author

klsoft-web commented Jan 31, 2026

You use different PHP in composer/composer (i think, PHP 8.4) and in docker (PHP 8.2). So, this leads to problem. Run composer install via your docker image with PHP 8.2.

The version is from the Dockerfile: FROM dunglas/frankenphp:1-php8.2-bookworm AS base (https://github.com/yiisoft/app/blob/master/docker/Dockerfile#L3C1-L3C50).
Note that I use Docker, not local Composer.
Docker builds images by reading the instructions from a Dockerfile.

When I replace in the Dockerfile:
FROM dunglas/frankenphp:1-php8.2-bookworm AS base
with:
FROM dunglas/frankenphp:1.11.1-php8.5.2-bookworm AS base,
It works, but I'm sure it must work with the minimum required version of PHP 8.2.

@samdark
Copy link
Member

samdark commented Jan 31, 2026

The issue is that you're using composer/composer image to install the project. PHP there is 8.5. Then you run the project using 8.2 that's in the image provided in app-api Dockerfile, and it fails. If you do make composer update it will work with current composer.json.

@klsoft-web
Copy link
Author

The issue is that you're using composer/composer image to install the project. PHP there is 8.5. Then you run the project using 8.2 that's in the image provided in app-api Dockerfile, and it fails. If you do make composer update it will work with current composer.json.

run composer update work. Thanks!
I also tried replacing composer/composer with composer:
docker run --rm -it -v "$(pwd):/app" --user $(id -u):$(id -g) composer create-project yiisoft/app your_project
but got the same error.
I hope you will fix this problem soon.
Have a nice day!

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.

3 participants