<img alt="" src="https://secure.agile365enterprise.com/790157.png" style="display:none;">

PHP-FIG: Making the Drupal Community bigger

author
By Team Srijan Feb 23, 2016
PHP-FIG: Making the Drupal Community bigger
PHP-FIG: Making the Drupal Community bigger

Jeffery ‘jam’ McGuire and Campbell Vertesi hosted a joint session on PHP-FIG, on Day 1 of DrupalCon Asia. The session was all about the structural changes in Drupal 8 and what’s different as compared to the older versions.

The session started with a talk on Drupal namespace standards. One of the often emphasized points was that Drupal and PHP are not two separate entities. In fact, 

 

"Drupal is PHP and PHP is Drupal"

 

This was followed by a discussion about the replacement of ‘drupal_http_request’ function, which was approximately 304 lines of code function. It was a lousy API function which was not fit for serious web services work. We needed a strong bi-directional HTTP support for that. 

 

In Drupal 8, the Guzzle HTTP client library was added to Drupal core, which supports many features that the ‘drupal_http_request’ currently does not. A few examples would be an object oriented and easier to use API, error-handling using exceptions, and better support for the HTTP standard. Guzzle also has a modern architecture, which can be extended with plugins to support requesting mocking for tests, caching and much more.

The next topic discussed was the PHP template which was used heavily in Drupal 7. But it has been removed from the Drupal 8 core and is replaced by Twig.

 

You can read more about the Comparison between PHP Template and Twig theming paradigms in the community documentation on Drupal.org.

Subscribe to our newsletter