Skip to content

2. Merge composer.json

Manual merging

Sorted packages since 2.4 changes

Because the 2.4 packages in composer.json are sorted, there will be more conflicts when updating to 2.4, but far fewer conflicts in the future. This is controlled by sort-packages config in composer.json.

Conflicts in composer.json need to be fixed manually. If you're not familiar with the diff output, you may checkout the tag's version and inspect the changes. It should be readable for most:

From your new update branch

1
git checkout --theirs composer.json && git diff HEAD composer.json

You should see what was changed, as compared to your own version, in the diff output. The update changes the requirements for all of the ezsystems/ packages. Those changes should be left untouched. All of the other changes will be removals of what you added for your own project. Use git checkout -p to selectively cancel those changes:

1
git checkout -p composer.json

Answer no (do not discard) to the requirement changes of ezsystems dependencies. Answer yes (discard) to removals of your changes.

Once you are done, inspect the file, by either using an editor or running git diff composer.json. You may also test the file's sanity with composer validate, and test the dependencies by running composer update --dry-run (it will output what it would do to the dependencies, without applying the changes).

Once finished, run git add composer.json and commit.

Fixing other conflicts

Depending on the local changes you have done, you may get other conflicts on configuration files, kernel, etc.

There shouldn't be many, and you should be able to figure out which value is the right one for all of them:

  • Edit the file, and identify the conflicting changes. If a setting you have modified has also been changed by us, you should be able to figure out which value is the right one.
  • Run git add conflicting-file to add the changes
Read the Docs