Merge "die() with explanation when \Psr\Log\LoggerInterface is missing"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 4 Nov 2014 02:14:12 +0000 (02:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 4 Nov 2014 02:14:12 +0000 (02:14 +0000)
includes/debug/logger/Logger.php

index 7164bfa..f5d2445 100644 (file)
  * @file
  */
 
+if ( !interface_exists( '\Psr\Log\LoggerInterface' ) ) {
+       $message = <<<TXT
+MediaWiki requires the <a href="https://github.com/php-fig/log">PSR-3 logging library</a> to be present. This library is not embedded directly in MediaWiki's git repository and must be installed separately by the end user.
+
+Please see <a href="https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries">mediawiki.org</a> for help on installing the required components.
+TXT;
+       echo $message;
+       trigger_error( $message, E_USER_ERROR );
+       die( 1 );
+}
+
 /**
  * PSR-3 logging service.
  *