Bump Dockerfile base image to php:8.4-apache#166
Open
mahmoodhamdi wants to merge 1 commit into
Open
Conversation
The previous `php:7.3-apache` base no longer satisfies the project's PHP requirements: composer.json requires `php >= 8.3.0`, and composer.lock pins symfony/var-dumper and symfony/yaml versions that require PHP >= 8.4. As a result, `composer install` aborts inside the container and `docker compose up --build` fails on a fresh clone of master. Verified locally that switching to php:8.4-apache lets the full build complete (composer install in 28.5s, image exported end-to-end). The pdo, pdo_mysql, mysqli extensions and Apache rewrite module install the same way on the new base. Fixes sunnah-com#165
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the
Dockerfilebase image fromphp:7.3-apachetophp:8.4-apachesothat
docker compose up --buildactually completes onmaster.Why
The current base image installs PHP 7.3, but:
composer.jsonrequires"php": ">=8.3.0"composer.lockpinssymfony/var-dumper v8.0.8andsymfony/yaml v8.0.10,both of which require PHP
>= 8.4yiisoft/yii2 2.0.54requires PHP>= 7.4.0So
composer installaborts inside the container on a fresh clone ofmaster, taking down the documented "Quick start" path with it.Full context and reproducer in #165.
Verification
Verified locally that the one-line change makes the build complete
end-to-end:
composer installfinished in 28.5s with all 57 packages installedpdo,pdo_mysql, andmysqliPHP extensions and Apache'srewritemodule install the sameway on the new base
Risks
PHP 8.x is a substantial jump from 7.3, but:
composer.jsonalready declaresphp >= 8.3.0, so the applicationis expected to run on PHP 8.x regardless of the Dockerfile.
fixes, suggesting the codebase is already PHP 8.x-aware.
is configured separately.
If you'd prefer a different target version (e.g.
php:8.3-apache), happy toupdate —
8.4is the smallest version that satisfies every constraint incomposer.lockwithout touching dependencies.Fixes #165