I just updated colorbox from version 2.0.1 to 2.1.1 and ended up with the following error:

ParseError: syntax error, unexpected ')', expecting variable (T_VARIABLE) in /code/web/modules/composer/colorbox/src/Form/ColorboxSettingsForm.php on line 71 #0 /code/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/code/web/modul...')

I'm on Drupal version 9.5.11

Working on a patch to be uploaded shortly.

CommentFileSizeAuthor
#2 fix_syntax_error-3500053-2.patch1.06 KBasila96

Issue fork colorbox-3500053

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

asila96 created an issue. See original summary.

asila96’s picture

StatusFileSize
new1.06 KB

Patch attached.

alyaj2a’s picture

Hello, how to reproduce the error? Please?

niharika.s’s picture

This module is compatible with ^10.2 || ^11 drupal version
I am using drupal version 10.1.8 and install this module without getting any error after changing info file of this module version
9||^10.2 || ^11.

asila96’s picture

I am on Drupal 9.5.11, nginx/1.27.1, and using PHP 7.4.33

I believe the error might have been triggered by the PHP version. It didn't like the extra comma at the end of the construct parameters list.

paulmckibben’s picture

Unfortunately, version 2.1.x of Colorbox does not support Drupal 9 or PHP 7. The info.yml file reflects Drupal core compatibility (Drupal 10 does not suppport PHP 7 either), but the composer.json file still needs to be updated.

paulmckibben’s picture

Title: Syntax error in 2.1.1 » Syntax error in 2.1.1 on D9/PHP7 - composer json allows install even though not supported
paulmckibben’s picture

Status: Active » Fixed

The composer.json file has been updated to reflect that only Drupal 10 and 11 are supported. By virtue of the minimum PHP requirements for Drupal 10, the minimum PHP version is 8.1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.