@@ -117,6 +117,28 @@ func testComposer(platform switchblade.Platform, fixtures string) func(*testing.
117117 })
118118 })
119119
120+ // Regression test for https://github.com/cloudfoundry/php-buildpack/issues/1265
121+ // COMPOSER_INSTALL_OPTIONS in options.json was silently ignored in v5 because
122+ // supply.go never wrote the parsed value into the extension Context.Data map.
123+ // As a result, composer always ran with the hardcoded default ["--no-interaction",
124+ // "--no-dev"], making it impossible to install dev dependencies via options.json.
125+ context ("composer app with COMPOSER_INSTALL_OPTIONS set to --dev in options.json" , func () {
126+ it ("installs dev dependencies (issue #1265)" , func () {
127+ deployment , logs , err := platform .Deploy .
128+ WithEnv (map [string ]string {
129+ "COMPOSER_GITHUB_OAUTH_TOKEN" : os .Getenv ("COMPOSER_GITHUB_OAUTH_TOKEN" ),
130+ }).
131+ Execute (name , filepath .Join (fixtures , "composer_install_options" ))
132+ Expect (err ).NotTo (HaveOccurred (), logs .String )
133+
134+ // Staging log must NOT contain --no-dev, confirming the user option overrides the default
135+ Expect (logs .String ()).NotTo (ContainSubstring ("--no-dev" ))
136+
137+ // The running app confirms psr/log (a require-dev package) was installed
138+ Eventually (deployment ).Should (Serve (ContainSubstring ("dev dependencies installed" )))
139+ })
140+ })
141+
120142 if ! settings .Cached {
121143 context ("deployed with invalid COMPOSER_GITHUB_OAUTH_TOKEN" , func () {
122144 it ("logs warning" , func () {
0 commit comments