Born in .co.uk • Lives in .com.au • Drupalist since ‘11 • Contributor since ‘12 • Acquian since ‘13 Hernâni Borges de Freitas (hernani) • Technical Team Lead (EMEA) • .PT • Lives in .UK • Long time PHP Developer • Drupalist since 2008 • Acquian since 2011
support for D8 in contrib on release date (D8CX) • Learn the APIs for custom modules • Stepping stone to learning Core • Stepping stone to learning Symfony, Guzzle, phpunit, twig etc
only 12 hours of work ahead • Remember you will hit blockers • Review module’s issue queue to verify there isn’t any work already developed for d8 • Start small • find a simple module • select modules you’ve used • Try not to pick a module that will use entities as a first module • Review your choice before going ahead
Create .info.yml and associated .module file • If needed create .install file with associated schemas • Install module verify if it appeared installed and if needed the schemas were created in DB • Port old hook_menu to new routing • Copy over associated hook_permission if needed • Convert admin forms • Port other defined hooks • Convert old tpl.php functions to new twig templates • Assign different parts of the build to different people • One person does config • One person does routing • One builds forms and controllers •
own ctools exportable like content types or views - Features exporting configuration Mix between files and db D8 • $config->get(‘variable’) • Configuration entities could be part of module config • Exportable • defaults => yaml • active => db • staging => files can be imported into active
$user • Functions like l(), t() • Drush cc all • dpm() D8 • Blocks defined in their own plugin defined by an annotated class. • Objects and functions accessible by service controllers. • Drush cr • ksm()
commits involving the function to understand what is the equivalent one in D8. https://drupal.org/list-changes/drupal Same method can be applied to other similar symptoms like hook not being called or code not being executed. Verify code defining the function is loaded. • Look for inspiration in examples module, in core or in api.drupal.org • Always check logs (Drupal and PHP). • Check with your team before any task to get a common understanding of effort. • Ask for help, we are here for that!
(alpha/beta/rc) • Assume HEAD will break your code • IDEs can help you with deprecations • Change notices are usually great to peruse • Don’t be afraid to look at how core/another module does something, it’s not cheating
to examples module • https://drupal.org/project/examples • Look through some already ported modules Other examples • Views in core • Rules (http://d8rules.org/)
com/presentation/d/1I1t1y_m3Gfq0nVngJN33XB0D49l8RcyzdIaF2 0Li3M8/edit#slide=id.p • Drupal 8 in a nutshell https://austin2014.drupal.org/session/drupal-8-nutshell • Drupal 8 where did the code go http://www.nyccamp.org/sites/default/files/slides/pwolanin-2014-04- Drupal-8-code-go.pdf • Drupal 8 API overview documentation: https://drupal. org/developing/api/8