From: Timo Tijhof Date: Tue, 30 Jul 2019 14:25:23 +0000 (+0100) Subject: resourceloader: Hard-deprecate ResourceLoaderContext::getConfig X-Git-Tag: 1.34.0-rc.0~828^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%22%20.%20generer_url_entite%28%24id_rubrique%2C?a=commitdiff_plain;h=fb7bed386340836414ac955c82c1096b3b389c2a;p=lhc%2Fweb%2Fwiklou.git resourceloader: Hard-deprecate ResourceLoaderContext::getConfig Already in 1.34 release notes from when it was soft-deprecated, earlier this release cycle. Depends-On: I949b91daabb0cf16519ef02e718ad97c827c4eec Depends-On: Icf1ead8829268505709c71f46dede5cdfc4471a8 Change-Id: I471088b322848a779d0dd58651dc1bd0d49067f1 --- diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index 1f06ede1b7..9712f67d07 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -140,8 +140,10 @@ class ResourceLoaderContext implements MessageLocalizer { * @deprecated since 1.34 Use ResourceLoaderModule::getConfig instead * inside module methods. Use ResourceLoader::getConfig elsewhere. * @return Config + * @codeCoverageIgnore */ public function getConfig() { + wfDeprecated( __METHOD__, '1.34' ); return $this->getResourceLoader()->getConfig(); } diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php index c3d5ec1fed..f6fd82408d 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php @@ -48,7 +48,6 @@ class ResourceLoaderContextTest extends PHPUnit\Framework\TestCase { public function testAccessors() { $ctx = new ResourceLoaderContext( $this->getResourceLoader(), new FauxRequest( [] ) ); $this->assertInstanceOf( ResourceLoader::class, $ctx->getResourceLoader() ); - $this->assertInstanceOf( Config::class, $ctx->getConfig() ); $this->assertInstanceOf( WebRequest::class, $ctx->getRequest() ); $this->assertInstanceOf( Psr\Log\LoggerInterface::class, $ctx->getLogger() ); }