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

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

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

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.

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

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

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 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 updated the task description. (Show Details)
Daimona removed a project: Patch-For-Review.