Last modified: 2014-11-20 23:58:48 UTC
Right now doing git-pull gives me an blank HTTP 500 response with no information at all. This is useless and unacceptable. Before the upcoming release, there must be a detection of sorts. Similar to what we do when PHP version isn't supported or when there are no skins installed, etc. Going into the Apache error log gives me: PHP Fatal error: Class 'Psr\\Log\\AbstractLogger' not found in mediawiki/core/includes/debug/logger/legacy/Logger.php on line 40 PHP Stack trace: PHP 1. {main}() mediawiki/core/index.php:0 Which isn't useful either.
(In reply to Krinkle from comment #0) > Right now doing git-pull gives me an blank HTTP 500 response with no > information at all. git pull where of what repo?
The place where we do the php version check is before the autoloader, so that won't work to fix the problem. Maybe we can put a check in the includes/debug/logger/legacy/Logger.php file itself that is outside of the class. That way when our autoloader first requires the file we could check to see if the PSR-3 classes are loaded/loadable or not. I'm not exactly sure how to trigger a better global warning however. I think about the best we could do is make an error_log() call that gives a more explanatory message.
Change 170274 had a related patch set uploaded by BryanDavis: Throw exception when \Psr\Log\LoggerInterface is unavailable https://gerrit.wikimedia.org/r/170274
*** Bug 72932 has been marked as a duplicate of this bug. ***
I ran into the same problem. This should definitely generate some kind of meaningful error message. Also someone should update the documentation on mediawiki.org to explain that Composer is now required: https://www.mediawiki.org/wiki/Download_from_Git#Prerequisites I'll take a shot at it myself, but I can't guarantee it will be accurate.
(In reply to Ryan Kaldari from comment #5) > I ran into the same problem. This should definitely generate some kind of > meaningful error message. Also someone should update the documentation on > mediawiki.org to explain that Composer is now required: > https://www.mediawiki.org/wiki/Download_from_Git#Prerequisites > I'll take a shot at it myself, but I can't guarantee it will be accurate. It was documented at https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries, but I've stated in the Prerequisites that composer is recommended, but not required.
Legoktm: It seems to be required to me. If I don't install it, I just get a 500 server error (as Krinkle did).
You can just clone https://github.com/wikimedia/mediawiki-vendor instead. you don't have to use composer
Ah, nevermind, I see now. You can install the vendor components manually if you want to. That should be better explained in the prerequisites section.
Guess I should read the entire instructions and not just the first part :)
Fixed in https://gerrit.wikimedia.org/r/#/c/170274/
Change 170274 merged by jenkins-bot: die() with explanation when \Psr\Log\LoggerInterface is missing https://gerrit.wikimedia.org/r/170274
We need a more general solution for this problem than the one off fix for PSR-3 that was applied. I'm thinking that we could install an autolaoder via spl_autoload_register() *after* all other autoloaders to give a nice warning when a class has not been found yet.
I think we could also create a git hook that would compare composer.json and composer.lock when composer.json is seen to be updated by a pull and give the user a warning and instructions on how to proceed. The git install instructions could include details on how to install this hook and MediaWiki-Vagrant could do it automatically.