Problem/Motivation

On install I get:

ParseError: syntax error, unexpected ')' in Composer\Autoload\includeFile() (line 347 of modules\contrib\oembed_providers\src\OembedProviderForm.php).

There is an extra comma in the arguments list of $form_state->setError() at that line number. removing it, fixes it.

Comments

loze created an issue. See original summary.

mohit.bansal623’s picture

Status: Active » Needs review

It doesn't prompt an error when using 1.1.x code version, the module is successfully enabled at the very first go.
I am able to see permission page successfully - admin/people/permissions#module-oembed_providers

Steps -
git clone --branch 1.1.x https://git.drupalcode.org/project/oembed_providers.git
drush cr
drush pm-enable oembed_providers

Successfully enabled.

PHP version - 7.3
MySQL version - 5.7

Please confirm and review.

chris burge’s picture

Version: 1.1.3 » 1.1.x-dev
Assigned: Unassigned » chris burge
Status: Needs review » Active

Support for trailing commas wasn't added until PHP 7.3. Drupal 8 still supports 7.2, even thought it's reached EOL (https://www.drupal.org/docs/system-requirements/php-requirements). I'm going to remove the trailing comma to restore PHP 7.2 support.

loze’s picture

Yea, that was the problem, I'm on 7.2 for this project.

chris burge’s picture

Status: Active » Needs review
StatusFileSize
new563 bytes

Patch attached.

  • Chris Burge committed 3ea1552 on 1.1.x
    Issue #3190765 by Chris Burge: Remove trailing comma from method calls...
chris burge’s picture

Title: ParseError: syntax error in latest version 1.1.3 » Remove trailing comma from method calls for PHP 7.2 support
Assigned: chris burge » Unassigned

  • Chris Burge committed 1a5759b on 1.1.x
    Revert "Issue #3190765 by Chris Burge: Remove trailing comma from method...
  • Chris Burge committed 9aaddc9 on 1.1.x
    Issue #3190765 by Chris Burge, loze, mohit.bansal623: Remove trailing...
chris burge’s picture

Status: Needs review » Fixed

Thanks for identifying this issue. I missed issue credits on the original commit, so I reverted and recommitted with the proper credit.

Status: Fixed » Closed (fixed)

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