- Issue created by @seamus_lee
- @seamus_lee opened merge request.
In a recent commit https://git.drupalcode.org/project/redirect_after_login/-/commit/2fa71b6... there was a change to support D10 by introducing the RedirectMiddleware class.
The issue is that in some circumstances such as if you try and clone an error var which CiviCRM does here https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Error.php#L564 this can cause fatal errors on D9 because of the use of the constant `self::MAIN_REQUEST` in the redirectMiddleware class.
This is because that constant was only added in Symfony versions later than 4.4. Drupal 9 uses Symfony 4.4 and the class constant is MASTER_REQUEST.
Rewrite the class so its similar to this https://git.drupalcode.org/project/domain/-/blob/2.0.x/domain_config/tes... but without the need for the constants to be defined on the class
Active
2.8
Code