This was a webinar hosted by Acquia. Ron Northcutt, a solutions architect at Acquia discussed improvements in Drupal 8 that will surely boost productivity for Drupal developers.
2. Who am I?
Ron Northcutt
Solutions Architect, Acquia
● using Drupal since 4.7 (circa 2006)
● freelance developer
● small dev shop
● sr. developer & tech lead
● solutions architect
Find me online:
https://www.drupal.org/u/rlnorthcutt
https://www.linkedin.com/in/rlnorthcutt
https://twitter.com/rlnorthcutt
https://plus.google.com/+RonNorthcutt
3. Agenda
● Setup all the dev tools
● Review CLI commands
● Create a sample module
● Explore tools
● Chrome extensions
5. DD2 and PHPStorm 1/7
● Dev Desktop 2
https://www.acquia.com/products-services/dev-desktop
○ full LAMP stack with configurable PHP versions
○ includes drush
○ includes PHPMyAdmin
○ integration with Acquia Cloud
● PHPStorm
http://www.jetbrains.com/phpstorm/
○ free 30 day trial then $90, or
○ possible free license for OSS projects
○ http://confluence.jetbrains.com/display/PhpStorm/Drupal+Development+using+PhpStorm
6. Xdebug 2/7
Xdebug setup instructions: https://docs.acquia.com/dev-desktop/sites/phpstorm
1. Edit php.ini
2. Restart apache
3. Configure PHPStorm to use Xdebug
4. Add your site as a project
5. Configure remote debug
7. Drupal Console 3/7
Drupal console setup instructions: https://drupalconsole.com/
1. Download the latest Console version:
curl https://drupalconsole.com/installer -L -o drupal.phar
2. Make it accessible anywhere on your system:
mv drupal.phar /usr/local/bin/drupal
3. Apply executable permissions on the downloaded file:
chmod +x /usr/local/bin/drupal
4. Copy configuration files to user home directory:
drupal init [--override]
5. List all available commands:
drupal list
8. Composer Manager 4/7
Composer Manager project page:
https://www.drupal.org/project/composer_manager
“Composer expects each project (Drupal installation, in our case) to have a single composer.json file
listing all required packages. Composer Manager allows each contributed module to ship with its own
composer.json file, listing the module-specific requirements. It then merges the requirements of all
found modules into the consolidated composer.json file. This results in a single vendor/ directory shared
across all modules which prevents code duplication and version mismatches.”
1. drush dl composer_manager -y
2. drush en composer_manager -y
3. composer drupal-update --no-dev
9. Devel and Webprofiler 5/7
Devel project page:
https://www.drupal.org/project/devel
Devel
Helper functions for Drupal developers and inquisitive admins. Enable the included Kint submodule as for pretty print of
variables. kint($array) function is provided, which pretty prints arrays. Useful during development. Similarly, a
ddebug_backtrace() is offered.
WebProfiler (D8+)
Add a powerful footer to all pages of your site. There, admins can review resource utilization, cache effectiveness,
database queries, Views, and so much more.
1. drush dl devel -y
2. drush en devel webprofiler -y
3. optional : install additional js libraries for webprofiler (see status page)
10. Xhprof 6/7
Xhprof setup instructions: https://docs.acquia.com/articles/xhprof-acquia-dev-
desktop-mac-osx
1. Edit php.ini
2. Restart apache
3. Create output directory for data
4. Install and enable the xhprof module
5. Configure the module
13. Drush
● update core and contrib
● download modules
● enable modules
● clear cache
● update db
● run cron
● import config
● export config
● create user
● change password
● one time login
● backup drupal
● restore drupal
● compile twig templates
● type “drush” to get a full list
● http://www.drushcommands.com/
14. Drupal Console
● update modules and core
● download modules
● enable modules
● clear cache
● update db
● run cron
● import config
● export config
● generate console command
● generate entity
● generate content type
● generate module
● run unit tests
● type “drupal list” for a full list
● https://drupalconsole.com/docs
17. Homework
This webinar is intended to introduce you to these developer tools, and help you get them setup for
your use. However, there is still plenty of work you need to do to learn how to use them. Some
suggested homework to help you:
● Start using these tools in your daily work
● Help to test and port modules
● Create a new module or theme
● Help someone else get these tools setup
● Dive into PHPStorm’s features
● Learn one new CLI command a day
● Blog about your experiences
● Present a session at a DUG or Camp