Skip to content

Commit fe5eb72

Browse files
authored
Merge pull request #1251 from cloudfoundry/pr-by-releng-bot-1775727592
Change PHP default to 8.3.x (required for cflinuxfs5 packaging)
2 parents 519bbd3 + f571f33 commit fe5eb72

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

fixtures/php_all_modules/.bp-config/options.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"mailparse",
2626
"maxminddb",
2727
"mbstring",
28-
"mcrypt",
2928
"memcached",
3029
"mongodb",
3130
"msgpack",
@@ -63,7 +62,6 @@
6362
"tidy",
6463
"xsl",
6564
"yaml",
66-
"yaf",
6765
"zip",
6866
"zlib",
6967
"phalcon"

fixtures/php_all_modules_composer/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"ext-yaml": "*",
6060
"ext-zip": "*",
6161
"ext-zlib": "*",
62-
"ext-yaf" : "*",
6362
"ext-phalcon": "*"
6463
}
6564
}

manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
language: php
33
default_versions:
44
- name: php
5-
version: 8.1.32
5+
version: 8.3.x
66
- name: httpd
77
version: 2.4.66
88
- name: nginx

src/php/integration/modules_test.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"fmt"
55
"os"
66
"path/filepath"
7+
"strings"
78
"testing"
89

910
"github.com/cloudfoundry/switchblade"
10-
"github.com/sclevine/spec"
11-
1211
. "github.com/cloudfoundry/switchblade/matchers"
1312
. "github.com/onsi/gomega"
13+
"github.com/sclevine/spec"
1414
"gopkg.in/yaml.v2"
1515
)
1616

@@ -69,13 +69,22 @@ func testModules(platform switchblade.Platform, fixtures string) func(*testing.T
6969
}
7070
}
7171

72+
// Resolve wildcard default (e.g. "8.3.x") to the highest matching
73+
// exact version present in the manifest dependencies.
74+
prefix := strings.TrimSuffix(phpVersion, "x")
75+
var resolvedVersion string
7276
var modules []SubDependency
7377
for _, d := range manifest.Dependencies {
74-
if d.Name == "php" && d.Version == phpVersion {
75-
modules = d.Modules
76-
break
78+
if d.Name == "php" && strings.HasPrefix(d.Version, prefix) {
79+
if resolvedVersion == "" || d.Version > resolvedVersion {
80+
resolvedVersion = d.Version
81+
modules = d.Modules
82+
}
7783
}
7884
}
85+
if resolvedVersion != "" {
86+
phpVersion = resolvedVersion
87+
}
7988

8089
Eventually(deployment).Should(Serve(
8190
ContainSubstring(fmt.Sprintf("PHP %s", phpVersion)),

0 commit comments

Comments
 (0)