Drupal Embraces PHP Attributes: A New Era in Plugin Definition

php coding computer css data digital function concept
Freepik

Oliver Davies recently shared insights on PHP attributes making their way into Drupal, especially since the introduction of Drupal 10.2. PHP attributes, a new feature in PHP 8, are being embraced as an alternative to annotations for defining plugins like blocks and queues within the framework. While the initial phase has focused on converting core plugins, discussions are underway regarding the potential support for both attributes and annotations in Drupal 11. This move underscores Drupal's commitment to evolving with the latest features from PHP and the Symfony framework, promising enhanced functionality and flexibility for developers like Davies in future projects.

Source Reference

Date of Publication
Organization
URL
https://www.oliverdavies.uk/archive/2024/04/04/php-attributes--coming-soon-to-a-drupal-version-near-you

Disclosure: This content is produced with the assistance of AI.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related Organizations

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here