How to pull in Magento 2 dev change into standard release

UPDATE:

There is a way!!

There are two parts to this:

  1. Download a copy of the module at the version you want it directly into your code base. If it's a magento module you can just add it directly into app/code/Magento/...

  2. Add an entry into the replace section of composer.json which will tell composer "don't bother pulling in the needed dependency - I've got it locally". e.g. to replace magento/module-braintree, the composer.json section might look like this:

    "replace": { "magento/module-braintree": "*" }

This isn't perfect - it's a little hacky. But it's a way to make replacements when really needed. For example, Magento made a mistake with 2.1.8 which meant that credis needed to be at a higher version than specified in their meta-package. Using this approach I could force the correct version.

Original answer: I've reverted to making my own fixes in a Magetno2fix module locally with reference to the relevant tickets so that these can be removed on upgrade. Seems a shame that we can't more easily use the fine-grained modularisation for this.