An event's scripts can be defined as either a string (only for a single script) or an array (for single or multiple scripts.)
[builder]
[builder] [Error: Failed to parse 'composer.json']
[builder] The parsed contents were invalid.
[builder]
[builder] Details: invalid type: string "phpcbf", expected a sequence at line 100 column 1
[builder]
[builder] Please run 'composer validate' on your local computer for verification.
[builder]
[builder] If you believe this message to be in error, please report it.
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 51
After moving from
heroku/buildpacks:20
toheroku/builder:22
, composer.json parsing fails when using strings in scripts. This is noted as valid syntax from Composer: https://getcomposer.org/doc/articles/scripts.md#defining-scriptsExample composer.json:
This is resolved when moving the strings into arrays: