Ensure that correct PHP version is symlinked #53
Merged
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.
This PR fixes laradock/laradock#3133 by ensuring that the correct PHP version is symlinked. As noted in my comment on the issue it seems that there is an indirect dependency on PHP 8.1 during the installation of the PHP 8.0 packages. This causes both PHP 8.0 and PHP 8.1 to be installed, and for 8.1 to take priority in the
php
virtual package. The fix in this PR re-sets the virtual package to use PHP 8.0 instead, which then restores the image's expected behaviour.This issue seems to be affecting the CI job for testing the build of PHP 8.0 workspace, so this fix should resolve that failure. It looks like this issue could also be affecting the other workspace jobs for previous PHP versions, however I haven't been able to validate that locally. If this is the case, I imagine that a similar fix in each of the previous Dockerfile's could resolve that too (ie. in
Dockerfile-7.4
:update-alternatives --set php /usr/bin/php7.4
, etc).I suppose that this fix could instead be applied in laradock/laradock's
workspace/Dockerfile
asRUN update-alternatives --set php /usr/bin/php${LARADOCK_PHP_VERSION}
- however, as it seems a more fundamental fix I figured it might be better placed here in the base image itself.Please feel free to amend this PR as necessary.