Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Drupal 11.5

By admin, 2 July, 2026
PHP Attributes for Form Routes

Drupal 11.5: Defining Form Routes with PHP Attributes

Drupal 11.5 introduces another significant step toward modern PHP development by allowing form routes to be defined directly on form classes using PHP attributes.

Until now, every custom form required a corresponding entry in a module's .routing.yml file. With this new feature, many of those YAML definitions can be eliminated, making code easier to maintain and keeping route configuration close to the class it belongs to.

Tags

  • Drupal
  • Drupal 11.5
  • Drupal Core
  • PHP Attributes
  • Form Routes
  • Route Discovery
  • Symfony Attributes
  • Module Development
  • ConfigFormBase
  • FormBase
  • Drupal API
  • Modern PHP
Drupal 11.5
Powered by Drupal