Step-by-step: Converting modules from Drupal 7 to Drupal 8

As Gábor pointed out, now's the time to help make Drupal 8 more unified and user/developer friendly. A great way to do that is try porting your modules, now, while there's still time to fix the APIs before code freeze.


Here's the video and slides from my Upgrading your modules to Drupal 8 talk at DrupalCon Sydney 2013, featuring the Pants module.



Slides: PDF | PPT | KEY (the canonical version)


But wait, there's more! ;)



The DrupalCon talk was only an hour, so wasn't nearly long enough to walk through the actual steps involved in each API. However! Thanks to the magic of Git (and particularly git rebase -i ;)), you can actually step through each step in the porting process.




$ git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/pants.git


This will get you the 7.x version of the Pants module so you can look at code that hopefully looks somewhat familiar. :)


From there, you can step through each of the steps as follows:




$ git branch -a

* 7.x-1.x

8.x-01-basics

8.x-02-tests

8.x-03-config

8.x-04-blocks

8.x-05-router

8.x-06-twig

8.x-1.x


$ git checkout 8.x-01-basics

$ git log


Note: Each commit message cross-references the change notification for that particular issue. (They're more granular at the beginning than at the end; sorry. :\)


There's also kind of a "brain-dump" of notes if you want to present these at your local user group: http://drupal.org/node/1911346


Note: This is accurate now, but not necessarily tomorrow or especially not next week. ;) Nevertheless, I hope this is able to help someone out there get involved in Drupal core! :) There's a global sprint happening tomorrow!


Tags: drupaldrupal 8
 •  0 comments  •  flag
Share on Twitter
Published on February 08, 2013 01:55
No comments have been added yet.


Angela Byron's Blog

Angela Byron
Angela Byron isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Angela Byron's blog with rss.