- Issue created by @cweiske
- First commit to issue fork.
Running "composer update -W" on my Drupal 9 installation upgraded drupal/redirect from 1.7.0 to 1.11.0.
Now I get an error:
ParseError: syntax error,
unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE)
in Composer\Autoload\{closure}()
(line 71 of /var/www/drupal/docroot/modules/contrib/redirect/src/EventSubscriber/RouteNormalizerRequestSubscriber.php).
The culprit are the "protected" inline constructor variable declarations that are not supported in PHP 7.4:
public function __construct(..., protected ?AliasManagerInterface $aliasManager = NULL, protected ?CurrentPathStack $currentPath = NULL)
composer.json does not contain any PHP version limitations, so 1.11.0 gets installed here, although composer knows that PHP 7.4 is used.
The ticket that broke 7.4 support is #3340999, with commit 192d972d50129ecabc471e2517765a7f0c9aa4d2 (released with 1.11.0).
Install drupal/redirect 1.11.0 on a drupal 9.5 system with php 7.4
Re-release 1.11.0 with a minimum PHP version requirement in composer.json
Active
1.11
Code