HomePhabricator

Make Status extend StatusValue and start FileBackend update

Authored by aaron on Sep 16 2016, 10:55 PM.

Description

Make Status extend StatusValue and start FileBackend update

  • This avoids code duplication.
  • Callers can safely start type-hinting StatusValue as well.
  • Also moved the wrap() logic out of Status::__construct(), which only wrap() was (and should have been) using. Use "static" as well, so subclass behave properly.
  • The docs and type-hints in /filebackend are updated as an example.
  • A migration pattern is to inject a StatusValue wrapper into the backend and use it on all returned statuses, so MediaWiki will still get Status for message methods.

Change-Id: Iff9255f34870ea6b0c4b91f6ddc69eea95186aba