• Home
  • Contact
symfony_drupal.jpg

Symfony is not the biggest change in Drupal 8

Jesus Manuel Olivas
March 01, 2014

The title of this blog post it's based on some of the topics Larry Garfield AKA @Crell talk about at the Acquia podcast. "Drupal 8 Wins: Avoiding the Dead Hook Blues" Part1 , Part2 & Part3

"Adopting various Symfony components has had a huge impact on Drupal, however people should not confuse the parts that are done with Symfony versus the parts that are done with PHP 5.3. PHP 4 and PHP 5.3 are different languages: conceptually, structurally; they happen to be mostly backward-compatible, but that's about it. Drupal 8's biggest shift is that it is a PHP 5.3 system. We have ported Drupal to a new language. That is the biggest jump for people. Symfony is a PHP 5.3 component library that we're using a lot of pieces of to save time and because they have already solved a lot of hard problems in ways that are very good."
~Larry Garfield

Recaping some of the mentioned concepts I decided to curate this list including a summary for some of those concepts and links for more information and reference.

Composer
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
https://getcomposer.org/

YAML
YAML is a human-readable data serialization format.
http://www.yaml.org/

Namespaces
Namespaces are a way of encapsulating items. Bringing the ability to organize and group related clases and also to avoid name collision.
http://us1.php.net/namespaces

Use
The Use operator bring the ability to refer to an external fully qualified name with an alias, or importing. This is similar to the ability of unix-based filesystems to create symbolic links to a file or to a directory.
http://www.php.net/manual/en/language.namespaces.importing.php

Dependency Injection
Dependency Injection is where objects or components dependencies are passed to another object using constructor or methods.
http://fabien.potencier.org/article/11/what-is-dependency-injection

Service Container
A Service Container (or dependency injection container) is simply a PHP object that manages the instantiation of services.
http://fabien.potencier.org/article/13/introduction-to-the-symfony-service-container

Annotations
An anotation is metadata attached to your code using "docblocks", that can be read at runtime.
http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/annotations.html

Routing
A route is a map from a URL path to a controller.

Controller
A controller is a PHP function method you create that takes information from the HTTP request and constructs and returns an HTTP response.

Videos resources

Links & resources

Test Drupal8 online

Ready to embrace the JAMstack revolution?

Build fast and secure sites and apps delivered by pre-rendering files and serving them directly from a CDN, removing the requirement to manage or run web servers, databases and worry about traffic spikes.
Work with us!