Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By neclimdul on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.3.x
Introduced in version:
8.3.0
Issue links:
Description:
This makes it possible to no longer have to write a method for every single possible HTTP 4xx status code. You can handle them all at once.
Rather than needing to implement on400()
, on401()
, on402()
, and so on, you can just write on4xx()
.
See \Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase
.
Impacts:
Module developers