Page MenuHomePhabricator

The parser should keep a list of variadic functions, and strictly check the amount of parameters for the other functions
Closed, ResolvedPublic

Description

Now it only checks that there are enough parameters, so e.g. count() fails. But the upper bound is not checked, so it's also fine to use count('x', 'y', 'lots', 'of', 'unused', 'params'). Note that we'll need a deprecation phase before actually rejecting extra parameters.

Plan (as of 16 Sept.)

  • Formally deprecated too many params in 1.34
  • Change it to throw in MW 1.35

Event Timeline

Daimona created this task.Aug 20 2019, 2:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 20 2019, 2:14 PM
Daimona updated the task description. (Show Details)Aug 20 2019, 2:14 PM

Change 531438 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Throw if a function has been given too many parameters

https://gerrit.wikimedia.org/r/531438

Change 531441 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Really throw for too many params

https://gerrit.wikimedia.org/r/531441

Daimona claimed this task.Aug 21 2019, 9:07 AM

Again, we'll have to fix WMF filters before starting to throw.

Change 531438 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Warn if a function has been given too many parameters

https://gerrit.wikimedia.org/r/531438

Daimona updated the task description. (Show Details)Sep 16 2019, 1:56 PM

Change 537116 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate too many params

https://gerrit.wikimedia.org/r/537116

Daimona moved this task from Blocker to Deprecate/Remove on the MW-1.34-release board.

The deprecation should happen in 1.34.

Daimona updated the task description. (Show Details)Sep 27 2019, 3:52 PM
Erutuon updated the task description. (Show Details)Oct 8 2019, 7:42 PM

Change 537116 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate too many params

https://gerrit.wikimedia.org/r/537116

Nullzero closed this task as Resolved.Nov 12 2019, 6:19 PM

Change 550527 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@REL1_34] Hard-deprecate too many params

https://gerrit.wikimedia.org/r/550527

Daimona reopened this task as Open.Nov 12 2019, 6:36 PM
Daimona updated the task description. (Show Details)

Change 550527 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@REL1_34] Hard-deprecate too many params

https://gerrit.wikimedia.org/r/550527

Change 531441 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Really throw for too many params

https://gerrit.wikimedia.org/r/531441

Daimona closed this task as Resolved.Dec 3 2019, 7:21 PM
Daimona updated the task description. (Show Details)
Daimona removed a project: Patch-For-Review.