Drupal Code Builder 4.6.11 Adds PHPUnit Attributes for Drupal 12

A pale blue Discover Drupal graphic features a portrait labeled "Joachim Noreiko" beside the Drupal Code Builder logo. Text reads "DISCOVER DRUPAL. Generated Tests Move Toward Drupal 12. Drupal Code Builder 4.6.11 adds PHPUnit attributes and fixes several scaffold generation errors. Joachim Noreiko. Follow us on. https www.thedroptimes.com. THE DROP TIMES."

Released on 28 September 2026, Drupal Code Builder 4.6.11 adds PHPUnit attributes to generated test classes and fixes several scaffold-generation errors. Maintainer Joachim Noreiko described the update as a set of minor bug fixes, with the test-generation change preparing generated code for Drupal 12.

Drupal's testing framework has been moving from doc-comment annotations to PHP attributes as PHPUnit drops annotation support. PHPUnit 12 no longer supports metadata supplied through those annotations, and Drupal 11.3 also requires the #[RunTestsInSeparateProcesses] attribute on concrete Kernel, Functional and FunctionalJavascript test classes. Code Builder 4.6.11 updates generated tests accordingly.

The release also fixes a crash and related errors when a service selected for dependency injection is no longer present in site analysis data. Generated Drush command methods now handle command names containing hyphens correctly, while another fix addresses plugin types that use a plugin definition class.

A separate correction prevents quoted numeric PHP values from being rendered as strings when generated code expects a numeric value. Internal changes also add detection for configurable plugin interfaces and move plugin-class fetching into a helper method.

Noreiko said he is also working on improved name generation for plugins and services, as well as support for configurable plugins. Those changes will take longer, he wrote, so he released the bug fixes separately rather than waiting for the larger work.

Drupal Code Builder generates scaffold code for Drupal modules and components, including hooks, plugins, services, entity types and test classes. It can be used through the Drupal Module Builder project or through its Drush command extension.

References

  1. Release 4.6.11 | Drupal Code Builder, Drupal Code Builder (28 September 2026)
  2. Module Builder announces Drupal Code Builder 4.6.11, Drupal Community (28 September 2026)
  3. Tests with PHPUnit 10 attributes are now supported, Drupal.org (13 June 2025)

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

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 reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related People

Upcoming Events

Latest Opportunities