Rerolling patches for PSR-4

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
xjm's picture

All Drupal 8 core module code was recently converted to the PSR-4 standard. This issue moved hundreds of files and so many patches will need rerolls. You can update patches safely with the following workflow (provided by @donquixote):

  1. Ensure you have the latest 8.x HEAD in your Drupal 8 repository: git pull origin 8.x
  2. git checkout -b tmp 00339b3d to create a new a new (temporary) branch from the Drupal 8 commit hash before the patch for Issue #2247991 was committed.
  3. git apply --index the patch and commit to the new branch.
  4. git rebase 8.x -- This should actually preserve all the local changes to existing files, because git understands if a file has been moved.
  5. Run php core/scripts/switch-psr4.sh and commit the changes. This is for files that were added in the patch or local branch. Remember, this script will add and remove files without updating the git index, so you will need to add and remove files with git add.
  6. git diff 8.x to produce a new version of the patch.
  7. Upload the new patch to the issue and set the issue "Needs review".

As always, be sure to review your updated patch carefully for any errors.

Core

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week