build: Updating dependencies

composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* ws: 7.3.0 → 7.5.3
  * https://npmjs.com/advisories/1748 (CVE-2021-32640)
* glob-parent: 5.1.1 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* normalize-url: 4.5.0 → 4.5.1
  * https://npmjs.com/advisories/1755 (CVE-2021-33502)

Change-Id: Ie14979780cdbd04fa2804f5317e8b0f6b0029470
This commit is contained in:
libraryupgrader 2021-07-22 11:56:28 +00:00
parent 77c4b6c561
commit b409746fc6
17 changed files with 127 additions and 11147 deletions

View file

@ -1,6 +1,6 @@
{ {
"require-dev": { "require-dev": {
"mediawiki/mediawiki-codesniffer": "36.0.0", "mediawiki/mediawiki-codesniffer": "37.0.0",
"mediawiki/mediawiki-phan-config": "0.10.6", "mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/minus-x": "1.1.1", "mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0", "php-parallel-lint/php-console-highlighter": "0.5.0",

11212
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -49,7 +49,7 @@ class InputCheckFactory {
* @param string $type * @param string $type
* @return MathoidChecker * @return MathoidChecker
*/ */
public function newMathoidChecker( string $input, string $type ) : MathoidChecker { public function newMathoidChecker( string $input, string $type ): MathoidChecker {
return new MathoidChecker( return new MathoidChecker(
$this->cache, $this->cache,
$this->httpFactory, $this->httpFactory,

View file

@ -58,7 +58,7 @@ class MathoidChecker extends BaseChecker {
/** /**
* @return array * @return array
*/ */
public function getCheckResponse() : array { public function getCheckResponse(): array {
if ( !isset( $this->statusCode ) ) { if ( !isset( $this->statusCode ) ) {
list( $this->statusCode, $this->response ) = $this->cache->getWithSetCallback( list( $this->statusCode, $this->response ) = $this->cache->getWithSetCallback(
$this->getCacheKey(), $this->getCacheKey(),
@ -73,7 +73,7 @@ class MathoidChecker extends BaseChecker {
/** /**
* @return string * @return string
*/ */
public function getCacheKey() : string { public function getCacheKey(): string {
return $this->cache->makeGlobalKey( return $this->cache->makeGlobalKey(
self::class, self::class,
md5( $this->type . '-' . $this->inputTeX ) md5( $this->type . '-' . $this->inputTeX )
@ -84,7 +84,7 @@ class MathoidChecker extends BaseChecker {
* @return array * @return array
* @throws MWException * @throws MWException
*/ */
public function runCheck() : array { public function runCheck(): array {
$url = "{$this->url}/texvcinfo"; $url = "{$this->url}/texvcinfo";
$q = rawurlencode( $this->inputTeX ); $q = rawurlencode( $this->inputTeX );
$postData = "type=$this->type&q=$q"; $postData = "type=$this->type&q=$q";

View file

@ -89,28 +89,28 @@ class MathWikibaseConfig {
/** /**
* @return EntityIdParser * @return EntityIdParser
*/ */
public function getIdParser() : EntityIdParser { public function getIdParser(): EntityIdParser {
return $this->idParser; return $this->idParser;
} }
/** /**
* @return EntityRevisionLookup * @return EntityRevisionLookup
*/ */
public function getEntityRevisionLookup() : EntityRevisionLookup { public function getEntityRevisionLookup(): EntityRevisionLookup {
return $this->entityRevisionLookup; return $this->entityRevisionLookup;
} }
/** /**
* @return LanguageFallbackLabelDescriptionLookupFactory * @return LanguageFallbackLabelDescriptionLookupFactory
*/ */
public function getLabelLookupFactory() : LanguageFallbackLabelDescriptionLookupFactory { public function getLabelLookupFactory(): LanguageFallbackLabelDescriptionLookupFactory {
return $this->labelLookupFactory; return $this->labelLookupFactory;
} }
/** /**
* @return Site * @return Site
*/ */
public function getSite() : Site { public function getSite(): Site {
return $this->site; return $this->site;
} }
@ -126,28 +126,28 @@ class MathWikibaseConfig {
/** /**
* @return PropertyId * @return PropertyId
*/ */
public function getPropertyIdHasPart() : PropertyId { public function getPropertyIdHasPart(): PropertyId {
return $this->propertyIdHasPart; return $this->propertyIdHasPart;
} }
/** /**
* @return PropertyId * @return PropertyId
*/ */
public function getPropertyIdQuantitySymbol() : PropertyId { public function getPropertyIdQuantitySymbol(): PropertyId {
return $this->propertyIdQuantitySymbol; return $this->propertyIdQuantitySymbol;
} }
/** /**
* @return PropertyId * @return PropertyId
*/ */
public function getPropertyIdDefiningFormula() : PropertyId { public function getPropertyIdDefiningFormula(): PropertyId {
return $this->propertyIdDefiningFormula; return $this->propertyIdDefiningFormula;
} }
/** /**
* @return MathWikibaseConfig default config * @return MathWikibaseConfig default config
*/ */
public static function getDefaultMathWikibaseConfig() : MathWikibaseConfig { public static function getDefaultMathWikibaseConfig(): MathWikibaseConfig {
if ( !self::$defaultConfig ) { if ( !self::$defaultConfig ) {
$site = null; $site = null;
try { try {

View file

@ -239,7 +239,7 @@ class SpecialMathWikibase extends SpecialPage {
* @param string $header Plain text * @param string $header Plain text
* @return string Raw HTML * @return string Raw HTML
*/ */
private static function createHTMLHeader( string $header ) : string { private static function createHTMLHeader( string $header ): string {
return Html::rawElement( return Html::rawElement(
'h2', 'h2',
[], [],

View file

@ -26,7 +26,7 @@ class MathDataUpdaterTest extends MediaWikiTestCase {
/** /**
* @inheritDoc * @inheritDoc
*/ */
protected function setUp() : void { protected function setUp(): void {
parent::setUp(); parent::setUp();
$this->mathProperty = new PropertyId( 'P' . DummyPropertyDataTypeLookup::$mathId ); $this->mathProperty = new PropertyId( 'P' . DummyPropertyDataTypeLookup::$mathId );
$this->otherProperty = new PropertyId( 'P' . ( DummyPropertyDataTypeLookup::$mathId + 1 ) ); $this->otherProperty = new PropertyId( 'P' . ( DummyPropertyDataTypeLookup::$mathId + 1 ) );

View file

@ -33,7 +33,7 @@ class MathDatabaseTest extends MediaWikiTestCase {
* } * }
* was not sufficient. * was not sufficient.
*/ */
protected function setUp() : void { protected function setUp(): void {
parent::setUp(); parent::setUp();
// TODO: figure out why this is necessary // TODO: figure out why this is necessary
$this->db = wfGetDB( DB_MASTER ); $this->db = wfGetDB( DB_MASTER );

View file

@ -21,12 +21,12 @@ class MathFormatterTest extends MediaWikiTestCase {
/** @var bool */ /** @var bool */
protected static $hasRestbase; protected static $hasRestbase;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
$rbi = new MathRestbaseInterface(); $rbi = new MathRestbaseInterface();
self::$hasRestbase = $rbi->checkBackend( true ); self::$hasRestbase = $rbi->checkBackend( true );
} }
protected function setUp() : void { protected function setUp(): void {
$this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' ); $this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' );
parent::setUp(); parent::setUp();

View file

@ -15,7 +15,7 @@ class MathInputCheckRestbaseTest extends MediaWikiTestCase {
/** @var RestbaseChecker */ /** @var RestbaseChecker */
protected $GoodObject; protected $GoodObject;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
$rbi = new MathRestbaseInterface(); $rbi = new MathRestbaseInterface();
self::$hasRestbase = $rbi->checkBackend( true ); self::$hasRestbase = $rbi->checkBackend( true );
} }
@ -24,7 +24,7 @@ class MathInputCheckRestbaseTest extends MediaWikiTestCase {
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() : void { protected function setUp(): void {
$this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' ); $this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' );
parent::setUp(); parent::setUp();
if ( !self::$hasRestbase ) { if ( !self::$hasRestbase ) {

View file

@ -40,7 +40,7 @@ class MathLaTeXMLDatabaseTest extends MediaWikiTestCase {
* } * }
* was not sufficient. * was not sufficient.
*/ */
protected function setUp() : void { protected function setUp(): void {
parent::setUp(); parent::setUp();
// TODO: figure out why this is necessary // TODO: figure out why this is necessary
$this->db = wfGetDB( DB_MASTER ); $this->db = wfGetDB( DB_MASTER );

View file

@ -19,7 +19,7 @@ class MathMLRdfBuilderTest extends MediaWikiTestCase {
private const ACME_REF = 'testing'; private const ACME_REF = 'testing';
protected static $hasRestbase; protected static $hasRestbase;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
$rbi = new MathRestbaseInterface(); $rbi = new MathRestbaseInterface();
self::$hasRestbase = $rbi->checkBackend( true ); self::$hasRestbase = $rbi->checkBackend( true );
} }
@ -28,7 +28,7 @@ class MathMLRdfBuilderTest extends MediaWikiTestCase {
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() : void { protected function setUp(): void {
$this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' ); $this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' );
parent::setUp(); parent::setUp();
if ( !self::$hasRestbase ) { if ( !self::$hasRestbase ) {

View file

@ -34,7 +34,7 @@ class MathMathMLTest extends MediaWikiTestCase {
self::$timeout = $timeout; self::$timeout = $timeout;
} }
protected function setUp() : void { protected function setUp(): void {
parent::setUp(); parent::setUp();
$this->setMwGlobals( 'wgMathoidCli', false ); $this->setMwGlobals( 'wgMathoidCli', false );
} }

View file

@ -18,7 +18,7 @@ class MathRendererTest extends MediaWikiTestCase {
protected static $hasRestbase; protected static $hasRestbase;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
$rbi = new MathRestbaseInterface(); $rbi = new MathRestbaseInterface();
self::$hasRestbase = $rbi->checkBackend( true ); self::$hasRestbase = $rbi->checkBackend( true );
} }
@ -27,7 +27,7 @@ class MathRendererTest extends MediaWikiTestCase {
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() : void { protected function setUp(): void {
$this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' ); $this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' );
parent::setUp(); parent::setUp();
if ( !self::$hasRestbase ) { if ( !self::$hasRestbase ) {

View file

@ -16,7 +16,7 @@ use MediaWiki\Extension\Math\MathRestbaseInterface;
class MathRestbaseInterfaceTest extends MediaWikiTestCase { class MathRestbaseInterfaceTest extends MediaWikiTestCase {
protected static $hasRestbase; protected static $hasRestbase;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
$rbi = new MathRestbaseInterface(); $rbi = new MathRestbaseInterface();
self::$hasRestbase = $rbi->checkBackend( true ); self::$hasRestbase = $rbi->checkBackend( true );
} }
@ -25,7 +25,7 @@ class MathRestbaseInterfaceTest extends MediaWikiTestCase {
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() : void { protected function setUp(): void {
$this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' ); $this->markTestSkipped( 'All HTTP requests are banned in tests. See T265628.' );
parent::setUp(); parent::setUp();
if ( !self::$hasRestbase ) { if ( !self::$hasRestbase ) {

View file

@ -14,7 +14,7 @@ class MathoidCliTest extends MediaWikiTestCase {
private $badInput = '\newcommand{\text{do evil things}}'; private $badInput = '\newcommand{\text{do evil things}}';
protected static $hasMathoidCli; protected static $hasMathoidCli;
public static function setUpBeforeClass() : void { public static function setUpBeforeClass(): void {
global $wgMathoidCli; global $wgMathoidCli;
if ( is_array( $wgMathoidCli ) && is_executable( $wgMathoidCli[0] ) ) { if ( is_array( $wgMathoidCli ) && is_executable( $wgMathoidCli[0] ) ) {
self::$hasMathoidCli = true; self::$hasMathoidCli = true;
@ -25,7 +25,7 @@ class MathoidCliTest extends MediaWikiTestCase {
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() : void { protected function setUp(): void {
parent::setUp(); parent::setUp();
if ( !self::$hasMathoidCli ) { if ( !self::$hasMathoidCli ) {
$this->markTestSkipped( "No mathoid cli configured on server" ); $this->markTestSkipped( "No mathoid cli configured on server" );

View file

@ -35,7 +35,7 @@ class InputCheckFactoryTest extends MediaWikiUnitTestCase {
return 'new' . ( new \ReflectionClass( MathoidChecker::class ) )->getShortName(); return 'new' . ( new \ReflectionClass( MathoidChecker::class ) )->getShortName();
} }
protected function setUp():void { protected function setUp(): void {
parent::setUp(); parent::setUp();
$this->markTestSkipped( 'FactoryArgTestTrait can not yet handle the parameter numbers.' ); $this->markTestSkipped( 'FactoryArgTestTrait can not yet handle the parameter numbers.' );
} }