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.
I am reporting https://www.drupal.org/coding-standards to moderators because:
On June 3, 2015 - 23:27 use pwolanin added edit about short array syntax policy that has not been finalised yet.
The discussion is still open at https://www.drupal.org/node/2135291
This brings a lot of contrib modules that want to use short array syntax for D7 to their knees.
Please consider reverting this change as there were no decision made on this.
Comments
Comment #2
alex.skrypnykComment #3
merauluka CreditAttribution: merauluka as a volunteer commentedAs mentioned in the issue you noted, the reason that short array syntax should not be used in D7 modules is to preserve backward compatibility for PHP 5.2. Short array syntax was introduced in PHP 5.4, and websites really shouldn't be running on PHP versions under 5.4, but that isn't really the issue here.
The issue is that Drupal 7 states it is compatible with PHP 5.2.5 and higher, with PHP 5.4 being the recommended version. Contributed modules should match the compatibility of the version of core they are created to work with.
However, that can easily be overridden by the core team if they decide it is the way they want Drupal core to go.
This issue cannot be resolve until that discussion is complete. As of now, the Coding Standards document is complete and accurate until such time as a change is decided.
I'm going to mark this as postponed and cross-link the discussion on that case.
Comment #4
apadernoGiven the linked issue has been closed as fixed, this issue is outdated.