Skip to content

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 77.22%. Comparing base (5c333dc) to head (79a8d08).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #262   +/-   ##
=========================================
  Coverage     77.22%   77.22%           
  Complexity       52       52           
=========================================
  Files            16       16           
  Lines           180      180           
=========================================
  Hits            139      139           
  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
Copy link
Member

samdark commented Jan 31, 2026

The issue is with docs, not the actual dependency.

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

vjik commented Jan 31, 2026

You should use the same PHP version for composer install and in Docker.

This problem occurs when running composer install or composer create-project with a PHP version that is higher than PHP version used in Docker.

@samdark
Copy link
Member

samdark commented Jan 31, 2026

yiisoft/docs@203d06f

@klsoft-web
Copy link
Author

The issue is with docs, not the actual dependency.

That's not correct.
PHP version from Dockerfile: FROM dunglas/frankenphp:1-php8.2-bookworm AS base (https://github.com/yiisoft/app-api/blob/master/docker/Dockerfile#L3)
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 should use the same PHP version for composer install and in Docker.

This problem occurs when running composer install or composer create-project with a PHP version that is higher than PHP version used in Docker.

The version is from the Dockerfile: FROM dunglas/frankenphp:1-php8.2-bookworm AS base (https://github.com/yiisoft/app-api/blob/master/docker/Dockerfile#L3).
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