LostCarPark Drupal Blog: Drupal Advent Calendar day 21 - PHP Attributes

Drupal Advent Calendar day 21 - PHP Attributes james Thu, 12/21/2023 - 07:00 Image removed.

It’s day 21, and our stockings are warming over the fireplace. Joe Shindelar (eojthebrave) joins us to open today’s door, and for the PHP developers among us, it will make a nice little stocking filler.

As of PHP 8.1, the PHP language has native support for attributes that are compatible with Drupal’s plugin system use case. As a result, Drupal will transition from the use of annotations to PHP attributes, to supply metadata and configuration for plugins. This will require developers to learn the new PHP attributes syntax, and update their existing code to use it. For now Drupal will continue…

Tags

PubDate

Tags