Essentially the same as #3143404: ParseError: syntax error, unexpected ')' in bootstrap_layout_builder/src/Plugin/Layout/BootstrapLayout.php on line 54 but for 2.0.

This module currently requires PHP versions that permit trailing commas in function calls, which was first implemented in PHP 7.3. See: https://wiki.php.net/rfc/trailing-comma-function-calls. While Drupal 9 does require PHP 7.3+, versions of Drupal 8 that this module supports do not. Attempting to install this module with PHP versions < 7.3 will result in errors similar to

ParseError: syntax error, unexpected ')' in bootstrap_layout_builder...

Options to fix this would include:

  1. Refactoring code to not use trailing commas in function calls (and any other PHP <=7.3 breaking changes)
  2. Changing the module's core version requirement to only be D9+
  3. Noting somewhere that this module requires at least PHP 7.3

Option 3 may be sufficient.

Comments

komlenic created an issue. See original summary.

mahmoud-zayed’s picture

Title: Requires PHP >= 7.3 » ParseError: syntax error, unexpected ')' in Composer\Autoload\includeFile() (line 132 of modules/contrib/bootstrap_layout_builder/src/Plugin/Layout/BootstrapLayout.php
Component: Documentation » Code
Status: Active » Needs work

  • mahmoud-zayed committed 7415cfd on 2.x
    Issue #3166637 by mahmoud-zayed: remove trailing comma in the function...
mahmoud-zayed’s picture

Status: Needs work » Fixed

Thanks Chris for reporting this issue.

mahmoud-zayed’s picture

Status: Fixed » Closed (fixed)