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/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 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)),