[go: nahoru, domu]

Page MenuHomePhabricator

phpcs is unable to sort class constant keys properly
Open, Needs TriagePublic

Description

Steps to replicate the issue (include links if applicable):

  • Add /** @phpcs-require-sorted-array */ at the beginning of an array that contains PHP class consts as keys. e.g. The EXPECTED_CONTEXT_KEYS array in github link
  • Run mw dev mw composer phpcs-modified

What happens?:
We get the following warning: Found duplicate key "self" on array required sorting (MediaWiki.Arrays.AlphabeticArraySort.Duplicate).

What should have happened instead?:
sort the consts alphabetically