Add to calendar module needs to be converted to use short array syntax as per new coding standard

Comments

Pavan B S created an issue. See original summary.

Pavan B S’s picture

Assigned: Pavan B S » Unassigned
Status: Active » Needs review
StatusFileSize
new1.85 KB

Applying the patch, please review.

dhruveshdtripathi’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new54.2 KB

Patch applied cleanly. All the arrays converted to short array syntax. Checked it manually. Results attached.

Good work!

gg24’s picture

Assigned: Unassigned » gg24
Status: Reviewed & tested by the community » Needs work

Patch failed on 8.x-1.x-dev branch. Hence re-rolling patch.

  • gg24 committed 68cfdc3 on 8.x-1.x
    Issue #2869288 by Pavan B S, dhruveshdtripathi, gg24: Convert module to...
gg24’s picture

Assigned: gg24 » Unassigned
Status: Needs work » Fixed
StatusFileSize
new2.23 KB

  • gg24 committed 68cfdc3 on 8.x-2.x
    Issue #2869288 by Pavan B S, dhruveshdtripathi, gg24: Convert module to...
yanniboi’s picture

Priority: Minor » Critical
Status: Fixed » Needs work

I think this change should be reverted.

Short array syntax is a new standard for Drupal 8 modules only! It was introduced in PHP 5.4, so any Drupal site running on PHP 5.2.5+ which is supported by Drupal 7 will not be able to use this module.

Short array syntax should not be used in Drupal 7.x or 6.x core or contributed modules.

- #2135291: [Policy, no patch] PHP 5.4 short array syntax coding standards for Drupal 8
Do you agree? I can provide a patch to achieve this...

gg24’s picture

Status: Needs work » Fixed

@yannibol FYI this patch is against 8.x version only. So, don't worry :).
Marking this issue as fixed, feel free to re-open if issue still persists.

Thanks and Regards

gg24’s picture

Priority: Critical » Normal
yanniboi’s picture

Ah, sorry, that's the wrong issue then.

I will start a related issue to fix this in the Drupal 7 branch.

#2876640: Remove short array syntax in Drupal 7

Status: Fixed » Closed (fixed)

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