Problem/Motivation

Followup from #3454142: Convert long array syntax in comments.

It turns out that I missed usages in comments starting with "//".

Instances can be found with

git grep -r "\barray(" * | grep -F \/\/ | grep -v "vendor" | grep -v "node_modules"

Steps to reproduce

Proposed resolution

Change to short array syntax in file found by the grep, but exclude fixture files.

Remaining tasks

Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3500403

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

quietone’s picture

Status: Fixed » Needs review
Parent issue: #3454142: Convert long array syntax in comments »

quietone’s picture

Issue summary: View changes
Issue tags: +Novice

Tagging novice as the review is suitable for getting started with reviews.

jvbrian’s picture

I've verified the commit: use short array syntax using git grep to find matches, and everything seems to be fine.

enrique.diaz changed the visibility of the branch 3500403-convert-long-array to hidden.

karimb’s picture

Status: Needs review » Reviewed & tested by the community

I've reviewed the commit and also clone the branch locally to launch the grep command as follow:

git grep -r "\barray(" * | grep -F \/\/ | grep -v "vendor" | grep -v "node_modules" | awk '{print NR ": " $0}'
1: core/modules/migrate_drupal/tests/fixtures/drupal6.php:  'source' => "return array(\n  0 => array(@columns),\n  // You'll usually want to stop here. Provide more values\n  // if you want your 'default value' to be multi-valued:\n  1 => array(@columns),\n  2 => ...\n);",
2: core/modules/migrate_drupal/tests/fixtures/drupal6.php:  'translation' => "return array(\n  0 => array(@columns),\n  // Vous voudrez vous arrêter là dans la plupart des cas. Fournir plus de valeurs\n  // si vous souhaitez que votre 'valeur par défaut' ait des valeurs multiples :\n  1 => array(@columns),\n  2 => ...\n);",

I adjusted the git grep command to display the results line by line.

We can see that we still have 'array( ... ' but it's not in a comment as asked in the description of this issue.

Everything looks fine.

karimb changed the visibility of the branch 3500403-convert-long-array to active.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

  • catch committed b45e19af on 11.x
    Issue #3500403 by quietone, karimb: Convert long array syntax in...

Status: Fixed » Closed (fixed)

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