fix: COMPOSER_INSTALL_OPTIONS from options.json silently ignored (#1265)#1274
Merged
Merged
Conversation
…nsion
COMPOSER_INSTALL_OPTIONS set in .bp-config/options.json was silently
ignored because supply.go never wrote the parsed value into the
extension Context.Data map. The composer extension reads it back via
ctx.GetStringSlice(), which returned nil, causing the hardcoded default
["--no-interaction", "--no-dev"] to always be used.
Fix: add ctx.Set("COMPOSER_INSTALL_OPTIONS", s.Options.ComposerInstallOptions)
alongside the other options already written to the context.
Adds a regression integration test with a fixture app that sets
COMPOSER_INSTALL_OPTIONS to ["--dev"] and verifies that a require-dev
package (psr/log) is installed and accessible at runtime.
Fixes #1265
benjaminguttmann-avtq
approved these changes
May 28, 2026
|
Problem solved. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
COMPOSER_INSTALL_OPTIONSset in.bp-config/options.jsonwas silently ignored in v5["--no-interaction", "--no-dev"], making it impossible to install dev dependencies via configurationRoot Cause
supply.goparsesCOMPOSER_INSTALL_OPTIONSfromoptions.jsonintos.Options.ComposerInstallOptionscorrectly, but never wrote it into the extensionContext.Datamap. The composer extension reads it back viactx.GetStringSlice("COMPOSER_INSTALL_OPTIONS"), which returnednil, so the hardcoded default was always used.Fix
One line added in
supply.goalongside the other options already written to the context:Testing
Added an integration test (
composer_test.go) with a fixture app that:"COMPOSER_INSTALL_OPTIONS": ["--dev"]in.bp-config/options.jsonpsr/log ^3.0as arequire-devdependency onlyThe test asserts:
--no-dev(confirming the user option overrides the default)"dev dependencies installed"Fixes #1265