Closed (duplicate)
Project:
CAPTCHA
Version:
8.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2021 at 07:41 UTC
Updated:
2 Jun 2022 at 07:24 UTC
Jump to comment: Most recent
In CaptchaPoints.php there are this code:
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
return new static(
$configuration,
$plugin_id,
$plugin_definition,
$migration,
$container->get('state'),
$container->get('entity_type.manager'), <-- this comma
);
}
But trailing comma in function calls is only available since php 7.3, it's safer remove the comma to backwards compatibility.
(the version is 8.1.2 but i don't see it in the select list)
| Comment | File | Size | Author |
|---|---|---|---|
| catpcha-trailing-comma.patch | 658 bytes | carlitus |
Comments
Comment #2
larisse commentedLooking through the Drupal Documentation (https://www.drupal.org/docs/system-requirements/php-requirements), PHP 7.3 is compatible with 8.x and 9.x Drupal versions. But versions smaller than PHP 7.3 is compatible too in Drupal 8.x version. So I think that make sense remove the comma, because the 8.x-1.1 Captcha version is compatible from Drupal 8.x.
Comment #3
carlitus commented¿There is something i have to do or only the module maintainer can?
Comment #4
paulocsOnly the module maintainer...
Comment #5
japerryComment #6
carlitus commentedFirst of all, thank you very much for this fantastic module.
When I opened this issue I searched for the same problem and found nothing.
¿Can i ask what is the issue which refers to this problem?