Page MenuHomePhabricator

Missing log library when trying to install MediaWiki via WebInstaller (mw-config/index.php)
Closed, ResolvedPublic

Description

When trying to install MediaWiki without having ran composer, the user gets the following error:

MediaWiki requires the PSR-3 logging library 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 mediawiki.org for help on installing the required components.
Fatal error: MediaWiki requires the PSR-3 logging library 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 mediawiki.org for help on installing the required components. in /Users/ori/www/w/includes/debug/logger/Factory.php on line 101
  • It assumes the user is installing via Git.
  • The error message is repeated.
  • The look and feel of the error message is not consistent with the web installer.

The web installer should check for composer dependencies using the same UI it uses to make other checks for the suitability of the environment for running MediaWiki.

Event Timeline

ori created this task.Feb 9 2015, 3:31 AM
ori assigned this task to bd808.
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: MediaWiki-Core-Team.
ori added a subscriber: ori.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 9 2015, 3:31 AM
ori added a comment.Feb 9 2015, 3:35 AM

Specifically, the web installer should be able to at least get to the "Environmental checks" stage. An error about composer and/or composer-installed dependencies should be emitted there, and not before.

bd808 added a comment.Feb 9 2015, 3:38 AM

This is basically an exact dup of T74777: [Regression] MediaWiki should detect absent or outdated vendor. I'm not sure what else can be done beyond the multiple fixes including the quoted error message that have been made as a result of that bug. The assumption about the user installing via git is based on the assumption that official 1.25 tarballs will include the basic required libraries.

ori added a comment.Feb 9 2015, 3:43 AM

This is basically an exact dup of T74777: [Regression] MediaWiki should detect absent or outdated vendor. I'm not sure what else can be done beyond the multiple fixes including the quoted error message that have been made as a result of that bug. The assumption about the user installing via git is based on the assumption that official 1.25 tarballs will include the basic required libraries.

The installer doesn't need logging. There should not be any dependencies for getting to the environment checks page.

bd808 renamed this task from Missing log library when trying to install MediaWiki to Missing log library when trying to install MediaWiki via WebInstaller (mw-config/index.php).Feb 9 2015, 3:56 AM
bd808 set Security to None.
bd808 added a comment.Feb 9 2015, 4:11 AM

mw-config/index.php requires includes/WebStart.php which in turn requires includes/Setup.php. Setup.php makes several wfDebug() calls. The first of these wfDebug() invocations will trigger the error message @ori mentions if the local install does not provide the PSR-3 library.

One possible solution for this specific page/activity would be to use our ComposerJson and ComposerLock classes to check the composer.json file and abort the installer process with a pretty error page in a manner similar to the existing wfPHPVersionError() abort when the minimum PHP version is not satisfied.

bd808 removed bd808 as the assignee of this task.Feb 9 2015, 4:20 AM
bd808 triaged this task as Medium priority.
bd808 added a subscriber: bd808.
demon added a subscriber: demon.Apr 10 2015, 7:51 PM

mw-config/index.php requires includes/WebStart.php which in turn requires includes/Setup.php. Setup.php makes several wfDebug() calls. The first of these wfDebug() invocations will trigger the error message @ori mentions if the local install does not provide the PSR-3 library.

Most of those are completely useless anyway.

aude added a subscriber: aude.Apr 18 2015, 6:47 AM

I just get "Error: LightnCandy class not defined" with the web installer. :(

Change 205001 had a related patch set uploaded (by Aude):
Check for dependencies in entry point and Maintenance.php

https://gerrit.wikimedia.org/r/205001

Parent5446 assigned this task to aude.May 23 2015, 2:34 PM
Parent5446 added a subscriber: Parent5446.

Change 205001 merged by jenkins-bot:
Check for dependencies in entry point and Maintenance.php

https://gerrit.wikimedia.org/r/205001

Change 212949 had a related patch set uploaded (by Chad):
Check for dependencies in entry point and Maintenance.php

https://gerrit.wikimedia.org/r/212949

demon closed this task as Resolved.May 23 2015, 3:43 PM

Merged to master & backported to REL1_25. Closing!

Change 212949 merged by jenkins-bot:
Check for dependencies in entry point and Maintenance.php

https://gerrit.wikimedia.org/r/212949

bd808 moved this task from Untriaged to Done on the Librarization board.Jul 22 2015, 11:16 PM