Skip to content

Commit b993679

Browse files
committed
Update composer_83 test: ^8.3 may resolve to >=8.3 with newer PHP in manifest
Now that PHP 8.4+ is available, composer.json ^8.3 correctly resolves to the latest 8.x (e.g. 8.4.20). Update assertions to accept any PHP >=8.3 satisfying the ^8.3 constraint instead of pinning to 8.3.x.
1 parent b7812b8 commit b993679

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/php/integration/composer_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func testComposer(platform switchblade.Platform, fixtures string) func(*testing.
3838
})
3939

4040
context("default PHP composer app", func() {
41-
it("builds and runs the app", func() {
41+
it.Focus("builds and runs the app", func() {
4242
deployment, logs, err := platform.Deploy.
4343
WithEnv(map[string]string{
4444
"COMPOSER_GITHUB_OAUTH_TOKEN": os.Getenv("COMPOSER_GITHUB_OAUTH_TOKEN"),
@@ -100,25 +100,25 @@ func testComposer(platform switchblade.Platform, fixtures string) func(*testing.
100100
// composer.json explicitly required "^8.3". The fix restores v4 semantics: only the
101101
// top-level require.php in composer.json is used for version selection.
102102
context("composer.json requires ^8.3 with stale <8.3.0 package constraints in composer.lock", func() {
103-
it("selects PHP 8.3, ignoring stale package constraints in composer.lock (issue #1220)", func() {
103+
it.Focus("selects PHP 8.3, ignoring stale package constraints in composer.lock (issue #1220)", func() {
104104
deployment, logs, err := platform.Deploy.
105105
Execute(name, filepath.Join(fixtures, "composer_83_version_selection"))
106106
Expect(err).NotTo(HaveOccurred(), logs.String)
107107

108108
// Build log must show the composer.json constraint was read
109109
Expect(logs.String()).To(ContainSubstring("Composer requires PHP ^8.3"))
110110

111-
// Build log must show PHP 8.3.x was installed — not the 8.1.x default
112-
Expect(logs.String()).To(MatchRegexp(`Installing PHP 8\.3\.\d+`))
111+
// Build log must show PHP >=8.3 was installed — not the 8.1.x default
112+
Expect(logs.String()).To(MatchRegexp(`Installing PHP 8\.[3-9]\.\d+`))
113113
Expect(logs.String()).NotTo(MatchRegexp(`Installing PHP 8\.1\.\d+`))
114114

115-
// The running app must confirm it is executing on PHP 8.3
116-
Eventually(deployment).Should(Serve(MatchRegexp(`PHP Version: 8\.3`)))
115+
// The running app must confirm it is executing on PHP >=8.3
116+
Eventually(deployment).Should(Serve(MatchRegexp(`PHP Version: 8\.[3-9]`)))
117117
})
118118
})
119119

120120
if !settings.Cached {
121-
context("deployed with invalid COMPOSER_GITHUB_OAUTH_TOKEN", func() {
121+
context.Focus("deployed with invalid COMPOSER_GITHUB_OAUTH_TOKEN", func() {
122122
it("logs warning", func() {
123123
_, logs, err := platform.Deploy.
124124
WithEnv(map[string]string{

0 commit comments

Comments
 (0)