Repository navigation
Conversation
patch-composer decoded composer.json to arrays and encoded it back, so
"autoload-dev": {} and "allow-plugins": {} came out as [] and composer
dump-autoload rejected the file. Decode to objects instead, which keeps
empty objects and empty lists apart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
patch-composer(and soprepare) read composer.json withjson_decode(..., true)and wrote it back withjson_encode. PHP arrays can't tell an empty object from an empty list, so keys like"autoload-dev": {}or"config": {"allow-plugins": {}}were written back as[]. Thecomposer dump-autoloadthat runs afterpreparethen rejects the file. We hit this building a NativePHP iOS app with the mobile preset.The command now decodes to objects, so
{}stays{}and[]stays[]. The two edits it makes (addingbox-helper.phptoautoload.filesand dropping testbenchpost-autoload-dumpscripts) work the same as before.That is the only place Parcel decodes and re-encodes a JSON file. box.json is copied from the stubs as is,
compileonly reads it, andsignonly decodes the server's response.The new test runs
prepare --mobileon a composer.json with empty objects and empty lists, checks both kinds survive, and then runscomposer dump-autoloadin that directory. It fails on main. Ifcomposerisn't on the PATH the dump step is marked incomplete rather than failing.One small change in behaviour: a
post-autoload-dumpgiven as a single string used to make the command error out. It is now treated as a one-item list.🤖 Generated with Claude Code