Fatal Error with PHP 7.4

Created on 2 September 2023, about 1 year ago
Updated 14 December 2023, 11 months ago

This issue only arose when I installed the devel module. Previously I had cleared cache on more than one occasion.
Currently I have the update deployed on the live site and it is not erroring on PHP7.4 but I'm certain the error will emerge sooner or later,

ParseError: syntax error, unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE) in Composer\Autoload\includeFile() (line 39 of modules/contrib/entity_legal/src/Form/EntityLegalDocumentForm.php).

These 3 lines are only allowed in > PHP8.0

protected PluginManagerInterface $pluginManager,
protected AccountProxyInterface $currentUser,
protected RendererInterface $renderer

Here is my patch attached (sorry I do not know how to do this the Drupal way)

This appears to fix the issues but I wonder if there are any other areas of the code that need addressing.

Composer install of the latest module does not check the PHP version.

Could you confirm if this is a valid approach?

🐛 Bug report
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom Tim Corkerton

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

Comments & Activities

  • Issue created by @Tim Corkerton
  • Status changed to Closed: works as designed 11 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    PHP 7 is end of life and not supported in 4.0.x branch. Please use a previous version that supports PHP 7

Production build 0.71.5 2024