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.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | 2935151-2.patch | 3.86 KB | alexpott |
Comments
Comment #2
alexpotta patch
Comment #3
dawehnerNice find and fix!
Comment #4
larowlannice!
Committed as 3af9d07 and pushed to 8.5.x.