mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-12 01:01:48 +00:00
build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0 * php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0 Change-Id: I5e0b9e78f0436355cc21dc356fb78e96e59cb536
This commit is contained in:
parent
1f084d6507
commit
c3c98c1146
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"require-dev": {
|
||||
"mediawiki/mediawiki-codesniffer": "35.0.0",
|
||||
"mediawiki/mediawiki-codesniffer": "36.0.0",
|
||||
"mediawiki/mediawiki-phan-config": "0.10.6",
|
||||
"mediawiki/minus-x": "1.1.1",
|
||||
"php-parallel-lint/php-console-highlighter": "0.5.0",
|
||||
"php-parallel-lint/php-parallel-lint": "1.2.0"
|
||||
"php-parallel-lint/php-parallel-lint": "1.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": [
|
||||
|
|
|
@ -88,7 +88,7 @@ class Gadget {
|
|||
*/
|
||||
public static function newFromDefinitionContent( $id, GadgetDefinitionContent $content ) {
|
||||
$data = $content->getAssocArray();
|
||||
$prefixGadgetNs = function ( $page ) {
|
||||
$prefixGadgetNs = static function ( $page ) {
|
||||
return 'Gadget:' . $page;
|
||||
};
|
||||
$info = [
|
||||
|
|
|
@ -46,7 +46,7 @@ class GadgetDefinitionNamespaceRepo extends GadgetRepo {
|
|||
return $this->wanCache->getWithSetCallback(
|
||||
$key,
|
||||
self::CACHE_TTL,
|
||||
function ( $oldValue, &$ttl, array &$setOpts ) use ( $fname ) {
|
||||
static function ( $oldValue, &$ttl, array &$setOpts ) use ( $fname ) {
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$setOpts += Database::getCacheSetOptions( $dbr );
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
|
|||
$value = $wanCache->getWithSetCallback(
|
||||
$key,
|
||||
Gadget::CACHE_TTL,
|
||||
function ( $old, &$ttl, &$setOpts ) use ( $us ) {
|
||||
static function ( $old, &$ttl, &$setOpts ) use ( $us ) {
|
||||
$setOpts += Database::getCacheSetOptions( wfGetDB( DB_REPLICA ) );
|
||||
|
||||
$now = microtime( true );
|
||||
|
|
|
@ -69,11 +69,11 @@ class GadgetTest extends MediaWikiUnitTestCase {
|
|||
*/
|
||||
public function testIsAllowed() {
|
||||
$user = $this->getMockBuilder( User::class )
|
||||
->setMethods( [ 'isAllowedAll' ] )
|
||||
->onlyMethods( [ 'isAllowedAll' ] )
|
||||
->getMock();
|
||||
$user->method( 'isAllowedAll' )
|
||||
->willReturnCallback(
|
||||
function ( ...$rights ) {
|
||||
static function ( ...$rights ) {
|
||||
return array_diff( $rights, [ 'test' ] ) === [];
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue