Patching Mediawiki

Mediawiki allows the update of minor versions using patches. there is a section in the manual explaining the procedure, but it lacks some details we are expanding upon here.

Procedure
After running the dry test with  several errors might show up like:

This not necessarily indicates an issue with the patch (unless you see errors on each single line), most likely, like in this case, the problem arises from a component that was updated outside Mediawiki package. In the example above, the Guzzle component was updated because an extension needed a new version of it: the patch expected an old version and then it shows a mismatch error.

In this specific case the procedure should be:
 * 1) Check with a dry run that all the errors are related to extensions or PHP modules only
 * 2) run   the   switch will apply the patch anyway
 * 3) run   to solve any inconsistencies in PHP modules
 * 4) depending on the patch might be necessary to run the update, it is advisable to run it anyway with

External reference

 * Upgrading using patch
 * patch(1) — Linux manual page, The Linux man-pages project