Open tobalsan opened 2 years ago
Hi, thank you for your description. What would you suggest to make it better?
Easy / lazy solution: update the comment in the code example so it says that JSON manipulation happens BEFORE the merge.
Real solution of course is to process the removals on the final, merged root composer.json
.
I could make a PR if it's something you think is worth doing (I found a workaround for my personal need).
I could make a PR if it's something you think is worth doing
That would be amazing :+1:
Hi,
in the monorepo builder package's
README.md
file, the source code provided for themonorepo-builder.php
file is a bit misleading.The comment says:
but in reality, the main method used by the
vendor/bin/monorepo-builder merge
command actually performs the decorations (adds, replaces, and removals) prior to merging all packages'composer.json
files, not after:I don't know if this is by design or not, but when looking at the
README.md
file I thought I could update specific parts of the finalcomposer.json
, after all sub-composer.json
were merged. More precisely, I wanted to remove certain parts of it that are added during the merge, but it's not possible since the removal happens before the merge.Adding extra stuff works because the merge doesn't remove what's been added while in the decorator process. But I wanted to remove a package from the
replace
section of the rootcomposer.json
, and this doesn't work because it gets re-added every time during the merge.