Page MenuHomePhabricator

Introduce IParser interface with `getOutput()` method for implementation
Closed, InvalidPublic

Description

In an attempt to do a bit of organization to parsing code, the introduction of an IParser interface was made to declare methods within classes that implement it.

Is this something useful in the long run related to parser code?

Event Timeline

Change 531314 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/core@master] [parser][edit] Introduce IParser interface with getOutput() method

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

See my comments on the patch. The IParser interface seems misnamed, since it is really a "ParserOutput getter" interface, and it is only used in three places: Parser, a Parser mock, and a deprecated class that will likely be removed in 1.36. Doesn't quite seem worthwhile.

xSavitar added a subscriber: Krinkle.

I'll rethink this and re-propose when ready to try again. Maybe I got things mixed up at one point :(. Thanks @cscott & @Krinkle.

Change 531314 abandoned by D3r1ck01:
[mediawiki/core@master] [parser][edit] Introduce IParser interface with getOutput() method

Reason:
will rethink this again and propose when ready

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

Actually removing includes/edit/PreparedEdit would be nice! Although that's probably a lot more work...