Change record status: 
Project: 
Introduced in branch: 
9.4.x
Introduced in version: 
9.4.0
Description: 

After this change it is possible for modules to subscribe to Drupal\Core\Site\MaintenanceModeEvents::MAINTENANCE_MODE_REQUEST to apply extra logic to maintenance mode.

This change was introduced to make it possible for the jsonapi module to respond with a JSON:API document, implemented in Drupal\jsonapi\EventSubscriber\JsonapiMaintenanceModeSubscriber. The special logic from the user module has been removed from Drupal\Core\EventSubscriber\MaintenanceModeSubscriber into its own subscriber Drupal\user\EventSubscriber\MaintenanceModeSubscriber. This logic consisted of logging any user that is not exempt from maintenance mode and redirecting that user to the frontpage..

This change enables other modules to hook into the maintenance mode to run their own code or serve their own type of request.

Impacts: 
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers