Recent Release breaks compatibility with D9 aka Symfony 4

Created on 13 November 2023, about 1 year ago

Problem/Motivation

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.

Steps to reproduce

Proposed resolution

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

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.8

Component

Code

Created by

🇦🇺Australia seamus_lee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @seamus_lee
  • @seamus_lee opened merge request.
Production build 0.71.5 2024