From: Kunal Mehta Date: Mon, 17 Jul 2017 21:44:53 +0000 (-0700) Subject: Return a typed object from WikiPage::prepareContentForEdit X-Git-Tag: 1.31.0-rc.0~2669 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=85585c47ecbf21982e77d54e0e20fcfb9434c245 Return a typed object from WikiPage::prepareContentForEdit This makes it easier to figure out what values are available and includes documentation about each field. This will also allow us to add deprecation warnings for deprecated properties via __get() in the future. Change-Id: I4ecc900372546013253256749563aaa203ff8963 --- diff --git a/autoload.php b/autoload.php index ce69ecd8a1..a6128a43b9 100644 --- a/autoload.php +++ b/autoload.php @@ -875,6 +875,7 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\Auth\\UsernameAuthenticationRequest' => __DIR__ . '/includes/auth/UsernameAuthenticationRequest.php', 'MediaWiki\\Diff\\ComplexityException' => __DIR__ . '/includes/diff/ComplexityException.php', 'MediaWiki\\Diff\\WordAccumulator' => __DIR__ . '/includes/diff/WordAccumulator.php', + 'MediaWiki\\Edit\\PreparedEdit' => __DIR__ . '/includes/edit/PreparedEdit.php', 'MediaWiki\\HeaderCallback' => __DIR__ . '/includes/HeaderCallback.php', 'MediaWiki\\Interwiki\\ClassicInterwikiLookup' => __DIR__ . '/includes/interwiki/ClassicInterwikiLookup.php', 'MediaWiki\\Interwiki\\InterwikiLookup' => __DIR__ . '/includes/interwiki/InterwikiLookup.php', diff --git a/includes/edit/PreparedEdit.php b/includes/edit/PreparedEdit.php new file mode 100644 index 0000000000..62624f4d91 --- /dev/null +++ b/includes/edit/PreparedEdit.php @@ -0,0 +1,113 @@ +timestamp = $cachedEdit->timestamp; } else {