BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/202221
Change subject: Separate Monolog shims from other logging shims ...................................................................... Separate Monolog shims from other logging shims Move the non-namespaced classes referencing external Monolog classes to an isolated PHP source file so that they aren't brought into scope by the need to load another shim class. Change-Id: I8270b8d5cd25db5a0f84fa94f59a6555052ae1ae --- M autoload.php M includes/debug/logger/Shims.php A includes/debug/logger/monolog/Shims.php 3 files changed, 74 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/202221/1 diff --git a/autoload.php b/autoload.php index d646a0e..1e62ccc 100644 --- a/autoload.php +++ b/autoload.php @@ -698,11 +698,11 @@ 'MWLoggerFactory' => __DIR__ . '/includes/debug/logger/Shims.php', 'MWLoggerLegacyLogger' => __DIR__ . '/includes/debug/logger/Shims.php', 'MWLoggerLegacySpi' => __DIR__ . '/includes/debug/logger/Shims.php', - 'MWLoggerMonologHandler' => __DIR__ . '/includes/debug/logger/Shims.php', - 'MWLoggerMonologLegacyFormatter' => __DIR__ . '/includes/debug/logger/Shims.php', - 'MWLoggerMonologProcessor' => __DIR__ . '/includes/debug/logger/Shims.php', - 'MWLoggerMonologSpi' => __DIR__ . '/includes/debug/logger/Shims.php', - 'MWLoggerMonologSyslogHandler' => __DIR__ . '/includes/debug/logger/Shims.php', + 'MWLoggerMonologHandler' => __DIR__ . '/includes/debug/logger/monolog/Shims.php', + 'MWLoggerMonologLegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/Shims.php', + 'MWLoggerMonologProcessor' => __DIR__ . '/includes/debug/logger/monolog/Shims.php', + 'MWLoggerMonologSpi' => __DIR__ . '/includes/debug/logger/monolog/Shims.php', + 'MWLoggerMonologSyslogHandler' => __DIR__ . '/includes/debug/logger/monolog/Shims.php', 'MWLoggerNullSpi' => __DIR__ . '/includes/debug/logger/Shims.php', 'MWLoggerSpi' => __DIR__ . '/includes/debug/logger/Shims.php', 'MWMemcached' => __DIR__ . '/includes/objectcache/MemcachedClient.php', diff --git a/includes/debug/logger/Shims.php b/includes/debug/logger/Shims.php index c78b0dc..0476d0f 100644 --- a/includes/debug/logger/Shims.php +++ b/includes/debug/logger/Shims.php @@ -104,56 +104,6 @@ * Backwards compatibility stub for usage from before the introduction of * the MediaWiki\Logger namespace. * - * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\LegacyHandler - * @todo This class should be removed before the 1.25 final release. - */ -class MWLoggerMonologHandler extends \MediaWiki\Logger\Monolog\LegacyHandler { -} - -/** - * Backwards compatibility stub for usage from before the introduction of - * the MediaWiki\Logger namespace. - * - * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\LegacyFormatter - * @todo This class should be removed before the 1.25 final release. - */ -class MWLoggerMonologLegacyFormatter extends \MediaWiki\Logger\Monolog\LegacyFormatter { -} - -/** - * Backwards compatibility stub for usage from before the introduction of - * the MediaWiki\Logger namespace. - * - * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\WikiProcessor - * @todo This class should be removed before the 1.25 final release. - */ -class MWLoggerMonologProcessor extends \MediaWiki\Logger\Monolog\WikiProcessor { -} - -/** - * Backwards compatibility stub for usage from before the introduction of - * the MediaWiki\Logger namespace. - * - * @deprecated since 1.25 Use \MediaWiki\Logger\MonologSpi - * @todo This class should be removed before the 1.25 final release. - */ -class MWLoggerMonologSpi extends \MediaWiki\Logger\MonologSpi { -} - -/** - * Backwards compatibility stub for usage from before the introduction of - * the MediaWiki\Logger namespace. - * - * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\SyslogHandler - * @todo This class should be removed before the 1.25 final release. - */ -class MWLoggerMonologSyslogHandler extends \MediaWiki\Logger\Monolog\SyslogHandler { -} - -/** - * Backwards compatibility stub for usage from before the introduction of - * the MediaWiki\Logger namespace. - * * @deprecated since 1.25 Use \MediaWiki\Logger\NullSpi * @todo This class should be removed before the 1.25 final release. */ diff --git a/includes/debug/logger/monolog/Shims.php b/includes/debug/logger/monolog/Shims.php new file mode 100644 index 0000000..f250713 --- /dev/null +++ b/includes/debug/logger/monolog/Shims.php @@ -0,0 +1,69 @@ +<?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 + */ + +/** + * Backwards compatibility stub for usage from before the introduction of + * the MediaWiki\Logger namespace. + * + * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\LegacyHandler + * @todo This class should be removed before the 1.25 final release. + */ +class MWLoggerMonologHandler extends \MediaWiki\Logger\Monolog\LegacyHandler { +} + +/** + * Backwards compatibility stub for usage from before the introduction of + * the MediaWiki\Logger namespace. + * + * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\LegacyFormatter + * @todo This class should be removed before the 1.25 final release. + */ +class MWLoggerMonologLegacyFormatter extends \MediaWiki\Logger\Monolog\LegacyFormatter { +} + +/** + * Backwards compatibility stub for usage from before the introduction of + * the MediaWiki\Logger namespace. + * + * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\WikiProcessor + * @todo This class should be removed before the 1.25 final release. + */ +class MWLoggerMonologProcessor extends \MediaWiki\Logger\Monolog\WikiProcessor { +} + +/** + * Backwards compatibility stub for usage from before the introduction of + * the MediaWiki\Logger namespace. + * + * @deprecated since 1.25 Use \MediaWiki\Logger\MonologSpi + * @todo This class should be removed before the 1.25 final release. + */ +class MWLoggerMonologSpi extends \MediaWiki\Logger\MonologSpi { +} + +/** + * Backwards compatibility stub for usage from before the introduction of + * the MediaWiki\Logger namespace. + * + * @deprecated since 1.25 Use \MediaWiki\Logger\Monolog\SyslogHandler + * @todo This class should be removed before the 1.25 final release. + */ +class MWLoggerMonologSyslogHandler extends \MediaWiki\Logger\Monolog\SyslogHandler { +} -- To view, visit https://gerrit.wikimedia.org/r/202221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8270b8d5cd25db5a0f84fa94f59a6555052ae1ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits