Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#2776975: March 3, 2017: Convert core to array syntax coding standards for Drupal 8.3.x RC phase landed for Drupal 8. We can't globally enable Generic.Arrays.DisallowLongArraySyntax in our ruleset.xml because this is also used for Drupal 7 code where long array syntax is allowed.
Proposed solution: Add a custom DisallowLongArraySyntax sniff that only triggers on Drupal 8 code.
Comments
Comment #3
klausidone.
Comment #4
joelpittet@klausi just curious but should it check
>= 8.3
?Comment #5
klausiNo, because Drupal modules are generally written against any version of Drupal 8, so we have no indication of minor core version there. The new short array standard applies to all code written for Drupal 8.
Comment #6
joelpittetThank you @klausi