Change PHP default to 8.3.x (required for cflinuxfs5 packaging)#1251
Merged
Change PHP default to 8.3.x (required for cflinuxfs5 packaging)#1251
Conversation
PHP 8.1.x is EOL (2024-11-25) and is not available on cflinuxfs5. buildpack-packager validates that the default version exists for every target stack, so packaging for cflinuxfs5 failed with: No matching default dependency `php` for stack `cflinuxfs5` Change the default to 8.3.x which is present in both cflinuxfs4 and cflinuxfs5. This also aligns the default with the actively maintained PHP stream.
…olution yaf and mcrypt are not available for PHP 8.3.x (dropped upstream). The default PHP version was changed to 8.3.x in the previous commit, so tests using PHP 8.3.30 no longer have these extensions. - Remove ext-yaf from php_all_modules_composer/composer.json (composer install was failing: ext-yaf not found in system) - Remove yaf and mcrypt from php_all_modules/.bp-config/options.json - Fix ItLoadsAllTheModules to resolve wildcard default version (e.g. '8.3.x') to the highest matching exact version in the manifest, instead of doing an exact string match that would always fail to find any modules
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.
Fix cflinuxfs5 packaging and update all-modules test fixtures
Context
This PR follows #1250 which added PHP 8.2.30 for cflinuxfs5. Two additional issues were discovered when the pipeline ran tests against cflinuxfs5.
1. Change PHP default to 8.3.x (required for cflinuxfs5 packaging)
PHP 8.1.x (EOL 2024-11-25) is not available on cflinuxfs5.
buildpack-packagervalidates that everydefault_versionsentry resolves to an existing dependency on the target stack, so packaging for cflinuxfs5 failed entirely with:This caused every switchblade-docker-cflinuxfs5 test to fail with
buildpack.zip: no such file or directory— the zip was never produced.Changed the default from
8.1.32to8.3.xwhich resolves to8.3.30in both cflinuxfs4 and cflinuxfs5.Note: Apps that do not pin a PHP version will now default to 8.3.x instead of 8.1.x. This is intentional — 8.1.x has been EOL since November 2024.
2. Remove yaf/mcrypt from all-modules fixtures; fix wildcard version resolution
With 8.3.x now the default, staging runs PHP 8.3.30.
yafandmcryptwere never ported to PHP 8.3.x upstream and are absent from the 8.3.30 manifest sub-dependencies.fixtures/php_all_modules_composer/composer.json: removedext-yaf(caused
composer installto fail: ext-yaf missing from your system)fixtures/php_all_modules/.bp-config/options.json: removedyafandmcryptAlso fixed
ItLoadsAllTheModulesinmodules_test.go: it matched the manifest default version string ("8.3.x") exactly against dependency entries, which never matched any concrete version and silently skipped all module assertions.Now resolves the wildcard to the highest matching concrete version (e.g.
"8.3.30") before looking up modules.