Drupal 8: Under the Hood

Buy Access

Drupal 8 comes with a shiny new objecy-oriented base, and a lot of hype surrounding it. But personally, I love it. So in this screencast, I'll take you - Drupal 7 dev - through all of the new concepts, paradigms, terms and patterns in Drupal 8.

We'll go beyond how to do something and explore how things actually work in D8. What are routes? How can I use events to tap into core parts of the system? What's all this dependency injection and service stuff? What's this Drupal Console thing I keep hearing about?

If you're serious about mastering D8, then let's go!

Your Guides

Ryan Weaver Leanna Pelham

Questions? Conversation?

  • 2017-02-22 weaverryan

    Ha, get to it!!! :D

  • 2017-02-22 Nicholas Babu

    can't wait to get to this tutorial, but first got to learn the basics; Knp TM you're the best.

  • 2015-12-08 weaverryan

    Hey Hans!

    Ah, thank you so much for the nice words!! I think I know the issue. Sometimes, when you dump a large variable - a variable that a lot of references to other objects - PHP has problems dumping it. This might be the case with the GetResponseEvent inside of Drupal. If you have XDebug installed, then it does some work to make sure this big dump doesn't fail. If you don't have this installed, then sometimes dumping large things will just print forever and ever. But sometimes it will just cause the page to be white. I think that's what's happening for you. The $event->getRequest() probably doesn't have the same recursive object references (i.e. it's smaller), so it doesn't die. Try installing XDebug, or you ever simply wanted to know the class of an event, you could var_dump(get_class($event));


  • 2015-12-08 weaverryan

    Chris and I talked about this on Twitter - it's in the plans now :)

  • 2015-12-08 weaverryan

    Cheers! Thanks for the helpful comments / questions along the way!

  • 2015-12-07 Hans Nieuwenhuis

    First of all, I cannot give You enough compliments on these excellent tutorials !!

    I have a problem in chapter "Event Subscribers and Dependency Injection Tags"

    when I use

    class DinoListener implements EventSubscriberInterface{
    public function onKernelRequest(GetResponseEvent $event){


    The page is empty and the browser says " no response from server.

    But when I use:

    class DinoListener implements EventSubscriberInterface{
    public function onKernelRequest(GetResponseEvent $event){


    I get output in the browser.

    So it seems that var_dumping $event does not generate output, but var_dumping $event->getRequest() does !

    I am using Drupal 8.0.1



  • 2015-12-04 Jesus Manuel Olivas

    Hans Nieuwenhuis: in order for us to track and fix this, do you mind to:
    * Open an issue at the project page https://github.com/hechoend...
    * Join our support channel https://gitter.im/hechoendr...

  • 2015-12-04 Jesus Manuel Olivas

    Awesome videos as usual from KNP and thank you so much weaverryan for spreading the word about Drupal Console.

  • 2015-12-03 Chris Weber

    https://knpuniversity.com/s... is nice but it would be helpful if you could tie the render array creation with sending the data to a twig template.

  • 2015-12-02 Chris Weber

    It would have been really awesome if you had dove into Twig + Drupal at the end. This series seems to focus on Drupal from a backend perspective, but even backenders need to help the frontend development process by mapping backend process to frontend templates.

    So if you were to add a video showing how the ROOOOOOAR method's output could be taken over by a twig template that would help a lot of folks understand a very common Drupal development task.


  • 2015-12-02 Hans Nieuwenhuis

    Error after upgrading to Drupal Console version 0.9.8 ( from 0.9.6 )

    When updating drupal console to new version I get errors when using drupal console (

    drupal --version

    PHP Fatal error: Class 'Drupal\Component\Assertion\Handle' not found in /var/www/html/jhmtest/web/sites/default/settings.local.php on line 31
    PHP Stack trace:
    PHP 1. {main}() /usr/local/bin/drupal:0
    PHP 2. require() /usr/local/bin/drupal:10
    PHP 3. require() phar:///usr/local/bin/drupal/bin/console:3
    PHP 4. Symfony\Component\Console\Application->run() phar:///usr/local/bin/drupal/bin/console.php:87
    PHP 5. Drupal\Console\Application->doRun() phar:///usr/local/bin/drupal/vendor/symfony/console/Application.php:126
    PHP 6. Drupal\Console\Helper\DrupalHelper->isValidRoot() phar:///usr/local/bin/drupal/src/Application.php:197
    PHP 7. Drupal\Console\Helper\DrupalHelper->isSettingsFile() phar:///usr/local/bin/drupal/src/Helper/DrupalHelper.php:71
    PHP 8. include_once() phar:///usr/local/bin/drupal/src/Helper/DrupalHelper.php:94
    PHP 9. include() /var/www/html/jhmtest/web/sites/default/settings.php:720

  • 2015-12-02 Chuck

    This was fantastic! Will you be creating more D8 tutorials?

  • 2015-12-01 Philippe

    guys You will have a tutorial on doc.ez.no .. you could extends it :)

  • 2015-11-24 Ivo Lukač

    Roger that! :)

  • 2015-11-24 weaverryan

    With your help, we *should* create something!

  • 2015-11-24 Ivo Lukač

    Really nice one! Hope to create something similar for eZ ;)

  • 2015-11-20 weaverryan

    Hi Hans!

    Thanks for the nice words! So here's the deal: rebuild_access setting is *off* by default. BUT, as soon as we created the settings.local.php file, *it* has line (the last line) that sets this to true. As long as you don't have this file on production with this setting on, I believe you're just fine.


  • 2015-11-20 Hans Nieuwenhuis

    Very good tutorial !!

    I notice a message in the status report after setting the settings.local.php:

    The rebuild_access setting is enabled in settings.php. It is recommended to have this setting disabled unless you are performing a rebuild.

    Is this expected ??

  • 2015-11-13 Felipe Martins

    So good! Thanks so much, Ryan! ;)

  • 2015-11-13 weaverryan

    Hey Felipe!

    It'll be 100% free until Dec 25th :). After that, it'll be part of the subscription and we'll add an individual purchase price.


  • 2015-11-13 Felipe Martins

    How much is the course?