oliverdavies.uk/content/node.95476ad8-f2dd-4667-99a5-5a5309299702.yml

72 lines
3.1 KiB
YAML

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: |
<p>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.</p>
<p>From the 10.2 release notes:</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>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.</p>
<p>There are also discussions about supporting both attributes and annotations in Drupal 11.</p>
<p>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.</p>
format: full_html
processed: |
<p>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.</p>
<p>From the 10.2 release notes:</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>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.</p>
<p>There are also discussions about supporting both attributes and annotations in Drupal 11.</p>
<p>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.</p>
summary: null
field_daily_email_cta: { }