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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | oembed_providers-trailing_comma-3190765-5.patch | 563 bytes | chris burge |
Comments
Comment #2
mohit.bansal623 commentedIt 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.
Comment #3
chris burge commentedSupport 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.
Comment #4
loze commentedYea, that was the problem, I'm on 7.2 for this project.
Comment #5
chris burge commentedPatch attached.
Comment #7
chris burge commentedComment #9
chris burge commentedThanks for identifying this issue. I missed issue credits on the original commit, so I reverted and recommitted with the proper credit.