From 62e8fb0d90131157c4b95fc0ac7ad14f0ab55be1 Mon Sep 17 00:00:00 2001 From: ivanovac Date: Thu, 9 Apr 2026 18:40:29 +0300 Subject: [PATCH 1/2] Change PHP default to 8.3.x (required for cflinuxfs5 packaging) 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. --- manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.yml b/manifest.yml index 3a37e8d2f..ead7da657 100644 --- a/manifest.yml +++ b/manifest.yml @@ -2,7 +2,7 @@ language: php default_versions: - name: php - version: 8.1.32 + version: 8.3.x - name: httpd version: 2.4.66 - name: nginx From f571f3309f9e9af7023bd0d6dc1a0eb37c91001f Mon Sep 17 00:00:00 2001 From: ivanovac Date: Thu, 9 Apr 2026 19:02:12 +0300 Subject: [PATCH 2/2] Remove yaf/mcrypt from all-modules fixtures; fix wildcard version resolution 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 --- .../php_all_modules/.bp-config/options.json | 2 -- .../php_all_modules_composer/composer.json | 1 - src/php/integration/modules_test.go | 19 ++++++++++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fixtures/php_all_modules/.bp-config/options.json b/fixtures/php_all_modules/.bp-config/options.json index 17adc6e76..fc66a8ee2 100644 --- a/fixtures/php_all_modules/.bp-config/options.json +++ b/fixtures/php_all_modules/.bp-config/options.json @@ -25,7 +25,6 @@ "mailparse", "maxminddb", "mbstring", - "mcrypt", "memcached", "mongodb", "msgpack", @@ -63,7 +62,6 @@ "tidy", "xsl", "yaml", - "yaf", "zip", "zlib", "phalcon" diff --git a/fixtures/php_all_modules_composer/composer.json b/fixtures/php_all_modules_composer/composer.json index 4ad23ec42..2ca67aba0 100644 --- a/fixtures/php_all_modules_composer/composer.json +++ b/fixtures/php_all_modules_composer/composer.json @@ -59,7 +59,6 @@ "ext-yaml": "*", "ext-zip": "*", "ext-zlib": "*", - "ext-yaf" : "*", "ext-phalcon": "*" } } diff --git a/src/php/integration/modules_test.go b/src/php/integration/modules_test.go index b61e41650..157b76adf 100644 --- a/src/php/integration/modules_test.go +++ b/src/php/integration/modules_test.go @@ -4,13 +4,13 @@ import ( "fmt" "os" "path/filepath" + "strings" "testing" "github.com/cloudfoundry/switchblade" - "github.com/sclevine/spec" - . "github.com/cloudfoundry/switchblade/matchers" . "github.com/onsi/gomega" + "github.com/sclevine/spec" "gopkg.in/yaml.v2" ) @@ -69,13 +69,22 @@ func testModules(platform switchblade.Platform, fixtures string) func(*testing.T } } + // Resolve wildcard default (e.g. "8.3.x") to the highest matching + // exact version present in the manifest dependencies. + prefix := strings.TrimSuffix(phpVersion, "x") + var resolvedVersion string var modules []SubDependency for _, d := range manifest.Dependencies { - if d.Name == "php" && d.Version == phpVersion { - modules = d.Modules - break + if d.Name == "php" && strings.HasPrefix(d.Version, prefix) { + if resolvedVersion == "" || d.Version > resolvedVersion { + resolvedVersion = d.Version + modules = d.Modules + } } } + if resolvedVersion != "" { + phpVersion = resolvedVersion + } Eventually(deployment).Should(Serve( ContainSubstring(fmt.Sprintf("PHP %s", phpVersion)),