* The Block typehint only refers to blocks stored in the database. It should be
updated to AbstractBlock in cases where any type of block could be expected.
* FileRepoStatus, deprecated in 1.25, has been removed.
+* The LegacyHookPreAuthenticationProvider class, deprecated since its creation
+ in 1.27, has been removed.
* …
=== Deprecations in 1.34 ===
"wikimedia/avro": "1.8.0",
"wikimedia/testing-access-wrapper": "~1.0",
"wmde/hamcrest-html-matchers": "^0.1.0",
- "mediawiki/mediawiki-phan-config": "0.5.0"
+ "mediawiki/mediawiki-phan-config": "0.6.0"
},
"replace": {
"symfony/polyfill-ctype": "1.99",
pcntl_signal_dispatch();
} else {
declare( ticks = 1 ) {
+ // @phan-suppress-next-line PhanPluginDuplicateExpressionAssignment
$status = $status;
}
}
$this->initializeMutableRevisionFromArray( $revision, $fields );
if ( isset( $fields['content'] ) && is_array( $fields['content'] ) ) {
+ // @phan-suppress-next-line PhanTypeNoPropertiesForeach
foreach ( $fields['content'] as $role => $content ) {
$revision->setContent( $role, $content );
}
+++ /dev/null
-<?php
-/**
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Auth
- */
-
-namespace MediaWiki\Auth;
-
-/**
- * A pre-authentication provider to call some legacy hooks.
- * @ingroup Auth
- * @since 1.27
- * @deprecated since 1.27
- */
-class LegacyHookPreAuthenticationProvider extends AbstractPreAuthenticationProvider {
- public function __construct() {
- wfDeprecated( self::class, '1.27' );
- }
-}
$date = $lang->userTimeAndDate( $ts, $user );
if ( $rev->userCan( Revision::DELETED_TEXT, $user ) ) {
$link = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
- $title !== null ? $title : $rev->getTitle(),
+ $title ?? $rev->getTitle(),
$date,
[ 'class' => 'mw-changeslist-date' ],
[ 'oldid' => $rev->getId() ]
}
protected function updateWatchlistNotification() {
- $casTimestamp = ( $this->params['notifTime'] !== null )
- ? $this->params['notifTime']
- : $this->params['curTime'];
+ $casTimestamp = $this->params['notifTime'] ?? $this->params['curTime'];
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'watchlist',
if ( $rcode >= 200 && $rcode <= 299 ) { // OK
$this->authCreds = [
'auth_token' => $rhdrs['x-auth-token'],
- 'storage_url' => ( $this->swiftStorageUrl !== null )
- ? $this->swiftStorageUrl
- : $rhdrs['x-storage-url']
+ 'storage_url' => $this->swiftStorageUrl ?? $rhdrs['x-storage-url']
];
$this->srvCache->set( $cacheKey, $this->authCreds, ceil( $this->authTTL / 2 ) );
public function notify( RecentChange $rc, $actionComment = null ) {
$params = $this->params;
/** @var RCFeedFormatter $formatter */
+ // @phan-suppress-next-line PhanTypeExpectedObjectOrClassName
$formatter = is_object( $params['formatter'] ) ? $params['formatter'] : new $params['formatter'];
$line = $formatter->getLine( $params, $rc, $actionComment );
*/
private function parseParams( FormOptions $opts, $par ) {
# Get parameters
- $par = $par !== null ? $par : '';
+ $par = $par ?? '';
$parms = explode( '/', $par );
$symsForAll = [ '*', 'all' ];
if ( $parms[0] != '' &&
}
$request = $this->getRequest();
- $par = ( $par !== null ) ? $par : '';
+ $par = $par ?? '';
$parms = explode( '/', $par );
$symsForAll = [ '*', 'user' ];