#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

klausi created an issue. See original summary.

  • klausi committed f7372dd on 8.x-2.x
    feat(DisallowLongArraySyntaxSniff): Enable sniff to only allow short...
klausi’s picture

Status: Active » Fixed

done.

joelpittet’s picture

@klausi just curious but should it check >= 8.3?

klausi’s picture

No, 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.

joelpittet’s picture

Thank you @klausi

Status: Fixed » Closed (fixed)

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