PIE (proudly invented elsewhere) instead of NIH (not invented here) • Drupal needs to become a REST services based system • Some Drupal devs preferred the structure of Symfony • Lead Symfony devs helped directly in the Drupal issue queues
some global variables ($_GET, $_POST, $_FILE, $_COOKIE,$_SESSION, ...) and the response is generated by some functions (echo, header, setcookie, ...). The Symfony2 HttpFoundation component replaces these default PHP global variables and functions by an Object-Oriented layer. Ref: http://symfony.com/doc/current/components/index.html
component. HttpKernel handles the dynamic part of HTTP; it is a thin wrapper on top of the Request and Response classes to standardize the way requests are handled. It also provides extension points and tools that makes it the ideal starting point to create a Web framework without too much overhead. It also optionally adds configurability and extensibility, thanks to the Dependency Injection component and a powerful plugin system (bundles). Ref: http://symfony.com/doc/current/components/index.html
long way to ensuring code extensibility. By creating classes that have well defined responsibilities, your code becomes more flexible and a developer can extend them with subclasses to modify their behaviors. But if he wants to share his changes with other developers who have also made their own subclasses, code inheritance is no longer the answer. Consider the real-world example where you want to provide a plugin system for your project. A plugin should be able to add methods, or do something before or after a method is executed, without interfering with other plugins. This is not an easy problem to solve with single inheritance, and multiple inheritance (were it possible with PHP) has its own drawbacks. Ref: http://symfony.com/doc/current/components/index.html
• Fast: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum. • Secure: Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a template language for applications where users may modify the template design. • Flexible: Twig is powered by a flexible lexer and parser. This allows the developer to define its own custom tags and filters, and create its own DSL. • Ref: http://twig.sensiolabs.org/