diff --git a/buildpacks/php/CHANGELOG.md b/buildpacks/php/CHANGELOG.md index 07adc27..14dac41 100644 --- a/buildpacks/php/CHANGELOG.md +++ b/buildpacks/php/CHANGELOG.md @@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `buildpack.toml` declaration of `[[stacks]]` has been replaced with `[[targets]]`, currently supporting Ubuntu 20.04 and 22.04 (both `amd64`) - Bump versions of Composer and minimal PHP for bootstrapping to 2.7.6 and 8.3.7 +### Fixed + +- Strings should be allowed as values in `scripts` object in `composer.json` ([#90](https://github.com/heroku/buildpacks-php/issues/90)) + ## [0.1.2] - 2023-10-24 ### Changed diff --git a/buildpacks/php/tests/fixtures/smoke/hello-world/composer.json b/buildpacks/php/tests/fixtures/smoke/hello-world/composer.json index 849b227..2936218 100644 --- a/buildpacks/php/tests/fixtures/smoke/hello-world/composer.json +++ b/buildpacks/php/tests/fixtures/smoke/hello-world/composer.json @@ -16,5 +16,12 @@ }, "config":{ "bin-dir": "sbin" + }, + "scripts": { + "foo": "echo 'foo'", + "bar": [ + "echo 'one'", + "echo 'two'" + ] } } diff --git a/composer/src/lib.rs b/composer/src/lib.rs index f5e81e4..245a463 100644 --- a/composer/src/lib.rs +++ b/composer/src/lib.rs @@ -118,6 +118,7 @@ pub struct ComposerBasePackage { pub repositories: Option>, pub require: Option>, pub require_dev: Option>, + #[serde_as(as = "Option>>")] pub scripts: Option>>, pub scripts_descriptions: Option>, pub source: Option,