Page MenuHomePhabricator

Add in Constant Visibility modifiers across Smashpig to satisfy latest mediawiki-codesniffer rule
Open, Needs TriagePublic


After we updated Smashpig to use php7.3 in the composer settings we then needed to update mediawiki-codesniffer to a version compatible with 7.3 and after doing this we ran into a bunch of new violations on Smashpig which were mostly resolved in this patch.

However, we switched off one rule relating to constant visibility. Since it's required in PSR12 to specify these modifiers, let's add those in and switch the rule back on.

To see which ones are affected and where we need to update stuff, remove the exclusion:

<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/>

from within SmashPig/phpcs.xml

and then run /vendor/bin/phpcs -ns from the project root. (-n only shows errors, -s show the ruleset associated to any errors detected)

Event Timeline

jgleeson created this task.Oct 23 2020, 1:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 23 2020, 1:16 PM