Into Modern Standards: Drupalize.Me’s Transition from Annotations to PHP Attributes

Drupalize.Me is updating its extensive library of tutorials to reflect Drupal’s shift from PHP annotations to PHP attributes for plugin discovery. This significant transition, one of the largest updates since Drupal 8, impacts tutorials on the Plugin API, including blocks, field types, and views plugins. Joe Shindelar writes that the shift aligns with Drupal core's latest practices, though annotations will still be supported.

This comprehensive update involved over 30 tutorials where code examples were converted to attributes, along with the creation of new tutorials focused on PHP attributes. Approximately 25 additional tutorials were modified for consistency, and extensive testing was performed to maintain accuracy and prevent learner frustration. The update also extended to documentation on Drupal.org and the Examples for Developers project.

Future content updates are planned, such as on Drush commands and custom entity type declarations, emphasizing that documentation remains a continuous effort to keep pace with Drupal’s evolution.

Source Reference

Date of Publication
Organization
URL
https://drupalize.me/blog/keeping-drupals-evolving-plugin-api-updating-tutorials-php-attributes

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

Advertisement Here