Testing core PRs on client data
Here is a little write up I did on testing core PRs on client data for our own docs. I couldn't quite work out the best place for it in the developer guide but wanted to create an issue in case it is more widely useful and we can find a place for it.
From time to time, we might want to test out a feature in an upcoming release of CiviCRM on a real client site. Maybe the core team is developing a new feature for us. Or someone has submitted a patch that we are also interested in.
If you know the PR, you can download a patch suitable to applying to CiviCRM as follows:
Then from the repo of the site that you want to patch use
git am to apply the patch. Use the
--directory flag to specify the path to CiviCRM. Something like the following should work:
git am --directory=src/sites/all/modules/civicrm ~/<PATCH_NUMBER>.patch
If the patch relies on other commits that have been merged into master but not yet released, you might want to upgrade to the most recent 'nightly' build. You can find nightlies here: https://download.civicrm.org/latest/