Page MenuHomePhabricator

remove requiresES6 from most code
Open, Needs TriagePublic

Description

Now that 1) ES6 is the Grade A JavaScript requirement for MediaWiki and 2) the validator now supports ES6 (T75714), this means we no longer need the "requiresES6" flag for the gadgets extension, correct?

If these assumptions are correct, then we can start simplifying the codebase and doing other cleanup related to this:

  • evaluate and remove "requiresES6" mentions in code (codesearch), except for maybe one spot where we make sure "requiresES6" doesn't throw some kind of definition file validation error, for backwards compatibility
  • remove "requiresES6" from MediaWiki:Gadgets-definition files (global search)
  • update documentation (such as crossing out requiresES6 at mw:Extension:Gadgets#Options)

Event Timeline

Now that 1) ES6 is the Grade A JavaScript requirement for MediaWiki and 2) the validator now supports ES6 (T75714), this means we no longer need the "requiresES6" flag for the gadgets extension, correct?

No! Not correct.

At the moment requiresES6 is different from no option at all. To have async functions you need add the option requiresES6. So effectively that option means requiresESNext.

Event though I understand this is no trivial for PHP, but we still need T357197 before discussing removal of requiresES6.

Thanks for that info. Perhaps we should turn this into a ticket about renaming requiresES6.

requiresESNext is a better name than requiresES6. I wonder if we can think of something better though. Maybe ignoreValidatorErrors?