uuid: - value: 95476ad8-f2dd-4667-99a5-5a5309299702 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-05-11T09:00:16+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'PHP attributes: coming soon to a Drupal version near you' created: - value: '2024-04-04T00:00:00+00:00' changed: - value: '2025-05-11T09:00:16+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2024/04/04/php-attributes--coming-soon-to-a-drupal-version-near-you langcode: en body: - value: |
Since Drupal 10.2, the framework has started to adopt PHP attributes - a new feature since PHP 8 - as an alternative to annotations when defining plugins, such as blocks and queues.
From the 10.2 release notes:
Drupal core has started adopting PHP attributes, a modern PHP language feature, to provide better developer experience for plugin annotations. Contributed and custom code can begin adopting this improved API for their plugins, and Block and Action plugins can all be converted to the new API.
It seems that what's been added so far is the first phase of converting the core's plugins, with more to follow in future versions.
There are also discussions about supporting both attributes and annotations in Drupal 11.
I love to see Drupal continuing to evolve and adopt new features from the PHP language and Symfony framework (such as autowiring and autoconfiguration), and I'm looking forward to using attributes in my projects.
format: full_html processed: |Since Drupal 10.2, the framework has started to adopt PHP attributes - a new feature since PHP 8 - as an alternative to annotations when defining plugins, such as blocks and queues.
From the 10.2 release notes:
Drupal core has started adopting PHP attributes, a modern PHP language feature, to provide better developer experience for plugin annotations. Contributed and custom code can begin adopting this improved API for their plugins, and Block and Action plugins can all be converted to the new API.
It seems that what's been added so far is the first phase of converting the core's plugins, with more to follow in future versions.
There are also discussions about supporting both attributes and annotations in Drupal 11.
I love to see Drupal continuing to evolve and adopt new features from the PHP language and Symfony framework (such as autowiring and autoconfiguration), and I'm looking forward to using attributes in my projects.
summary: null field_daily_email_cta: { }