From e159142920f9e5f3c7cca3d9ec08a0ec2b961316 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 30 Nov 2023 17:28:09 -0500 Subject: [PATCH] Drop ExtensionProcessor::getExtraAutoloaderPaths(), deprecated in 1.39 Change-Id: Id42357123b1db4c6a42bca2d48e860e029e616ed --- RELEASE-NOTES-1.42 | 2 ++ includes/registration/ExtensionProcessor.php | 17 ----------------- includes/registration/Processor.php | 12 ------------ .../includes/registration/ExtensionProcessorTest.php | 11 ----------- 4 files changed, 2 insertions(+), 40 deletions(-) diff --git a/RELEASE-NOTES-1.42 b/RELEASE-NOTES-1.42 index 07f97f26690..20440b8f3fc 100644 --- a/RELEASE-NOTES-1.42 +++ b/RELEASE-NOTES-1.42 @@ -153,6 +153,8 @@ because of Phabricator reports. - ::getLazyReadConnectionRef(), deprecated in 1.38; use getReadConnection() * CoreParserFunctions::mwnamespace(), deprecated in 1.39, has been removed. Use CoreParserFunctions::namespace() instead. +* Processor:: and ExtensionProcessor::getExtraAutoloaderPaths(), deprecated in + 1.39, have been removed; use ::getExtractedAutoloadInfo() instead. * MediaWikiIntegrationTestCase::$tablesUsed has been deprecated. The framework now detects these automatically. * Support for setting dynamic property on StatusValue object has been removed. diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index d258ce152f0..f9ae72da059 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -923,23 +923,6 @@ class ExtensionProcessor implements Processor { } /** - * @deprecated since 1.39, use getExtractedAutoloadInfo instead - * - * @param string $dir - * @param array $info - * - * @return array - */ - public function getExtraAutoloaderPaths( $dir, array $info ) { - wfDeprecated( __METHOD__, '1.39' ); - $paths = []; - if ( isset( $info['load_composer_autoloader'] ) && $info['load_composer_autoloader'] === true ) { - $paths[] = "$dir/vendor/autoload.php"; - } - return $paths; - } - - /** * Returns the extracted autoload info. * The autoload info is returned as an associative array with three keys: * - files: a list of files to load, for use with Autoloader::loadFile() diff --git a/includes/registration/Processor.php b/includes/registration/Processor.php index 7c9625db56d..f4b7b226403 100644 --- a/includes/registration/Processor.php +++ b/includes/registration/Processor.php @@ -42,18 +42,6 @@ interface Processor { public function getRequirements( array $info, $includeDev ); /** - * Get the path for additional autoloaders, e.g. the one of Composer. - * - * @deprecated since 1.39, use getExtractedAutoloadInfo instead - * - * @param string $dir - * @param array $info - * @return array Containing the paths for autoloader file(s). - * @since 1.27 - */ - public function getExtraAutoloaderPaths( $dir, array $info ); - - /** * Returns the extracted autoload info. * The autoload info is returned as an associative array with three keys: * - files: a list of files to load, for use with Autoloader::loadFile() diff --git a/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php b/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php index b37110fcffb..e0f821751c6 100644 --- a/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php +++ b/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php @@ -1189,17 +1189,6 @@ class ExtensionProcessorTest extends MediaWikiUnitTestCase { ); } - public function testGetExtraAutoloaderPaths() { - $this->hideDeprecated( 'ExtensionProcessor::getExtraAutoloaderPaths' ); - $processor = new ExtensionProcessor(); - $this->assertSame( - [ "{$this->dirname}/vendor/autoload.php" ], - $processor->getExtraAutoloaderPaths( $this->dirname, [ - 'load_composer_autoloader' => true, - ] ) - ); - } - public function testGetExtractedAutoloadInfo() { $processor = new ExtensionProcessor(); -- 2.11.4.GIT