ParseError : syntax error, unexpected ')', expecting variable (T_VARIABLE) dans Composer\Autoload\includeFile()

Created on 27 July 2023, over 1 year ago

Problem/Motivation

ParseError : syntax error, unexpected ')', expecting variable (T_VARIABLE) dans Composer\Autoload\includeFile() (/Applications/MAMP/htdocs/*****/modules/contrib/yoast_seo/src/EntityAnalyser.php ligne 91)

public function __construct(
    EntityTypeManagerInterface $entity_type_manager,
    RendererInterface $renderer,
    MetatagManagerInterface $metatag_manager,
    RouterInterface $router,
    ?ThemeManagerInterface $theme_manager = NULL,
    ?ThemeInitializationInterface $theme_initialization = NULL,
    ?ConfigFactoryInterface $configFactory = NULL,
  ) {
    $this->entityTypeManager = $entity_type_manager;
    $this->renderer = $renderer;
    $this->metatagManager = $metatag_manager;
    $this->router = $router;
    $this->themeManager = $theme_manager ?? \Drupal::service('theme.manager');
    $this->themeInitialization = $theme_initialization ?? \Drupal::service('theme.initialization');
    $this->defaultTheme = ($configFactory ?? \Drupal::configFactory())->get("system.theme")->get('default');
  }

The trailing comma fails on PHP 7.4

Proposed resolution

Remove trailing comma

🐛 Bug report
Status

Active

Component

Code

Created by

🇲🇦Morocco m.bkm

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

Comments & Activities

Production build 0.71.5 2024