2014

For clients:
I am subscribed to the Drupal security mailinglist.
And luckily I did not miss the highly critical https://www.drupal.org/SA-CORE-2014-005.

All Drupal 7 sites that I am involved with are now upgraded to '7.32, or I warned whoever is maintaining the site.
If anything still goes wrong with those sites, it must be something else.

I wanted to write a module with a views plugin.
This is one single class. Do we need PSR-4 for that? (*)

Looking back, I can say: The question was misleading.
No, I don't necessarily need PSR-4 for one single class. But once I had it in place, I quickly noticed how I could split big parts of the logic out of the views plugin, into a separate class. Quite a healthy thing to do.
Without PSR-4, I would have hesitated to introduce another class.

Series: 

Drupal's "theme" concept introduces unhealthy dependencies and hinders modularity. Use theme-agnostic front-end components instead, and let them live outside the theme.

(Disclaimer: Yes, Drupal is not the only system with "themes". Forgive the clickbait headline.)

Someone at the Acquia booth talked me into their certification program. Here is how it went.

Series: 

The DOM is a hierarchical structure. And yet we are generating HTML in a linear fashion. We can do better!

Cellbrush table generator

Cellbrush is (yet another) PHP library to generate HTML tables.
It does support colspan and rowspan.

What really makes it special is that table cells are addressed by string keys, and empty cells are filled automatically. This means, you can add cells in any order, and you don't need to babysit the table's structural integrity! This allows for a more semantical work flow.

Tags: 
xautoload

xautoload never had a database cache. But now it has, thanks to O(log n).

All (*) the procedural pasta salad of Drupal 7 core, turned into services with dependency injection because we can?
(and because PHPUnit, and because ..)
(*) exaggerating.

No, this is not Drupal 8. It is just a testing ground for xautoload.

A one-off service container that is simpler than Pimple.

It will not be very flexible or reusable, it will just do the job.
And your IDE will love it!

One of the great new things in Drupal 8 is that it comes with a dependency injection container ("DIC").
In fact, it borrows the dependency injection container component from Symfony..

If you don't like the DIC from Symfony, you could try Pimple instead.
Or you can skip to the next article, and build your own.

Pages