Problem/Motivation

As per #2935144: DisallowLongArraySyntaxSniff is broken because DrupalPractice_Project::getCoreVersion() makes incorrect assumptions coder is not checking for long array syntax.

Proposed resolution

Move to the generic sniff as it works perfectly.

To test add $a = array(); to core/lib/Drupal/Core/Access/AccessArgumentsResolverFactory.php and then do ../vendor/bin/phpcs --standard=phpcs.xml.dist --runtime-set installed_paths COMPLETE_PATH/vendor/drupal/coder/coder_sniffer/ -ps lib/Drupal/Core/Access/AccessArgumentsResolverFactory.php

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 2935151-2.patch3.86 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
3.86 KB

a patch

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice find and fix!

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

nice!

Committed as 3af9d07 and pushed to 8.5.x.

  • larowlan committed 3af9d07 on 8.5.x
    Issue #2935151 by alexpott: Long array syntax checking in ./core files...

Status: Fixed » Closed (fixed)

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