Last modified: 2014-11-20 21:07:41 UTC
After running git pull on the /vagrant/mediawiki directory, I got this error: Fatal error: Class 'Cdb\Reader' not found in /vagrant/mediawiki/includes/cache/LocalisationCache.php on line XXX and while the reason was easy to guess (Cdb has been vendorized), I wasted some time figuring out what to do to update it (vagrant provision, vagrant reload, setup.sh, git pull on the vagrant repo...) as I thought the vendor directory is maintained by vagrant. I can see the logic in not updating automatically, as MediaWiki and extension code is also not updated automatically after the initial install; still I wonder if vagrant provision should always re-run composer install so that users have to remember one less thing. composer install does not touch already installed libraries, so no code gets updated without the user's consent, it just the ones which have been added to mediawiki/composer.json, and have not been installed at all yet. That seems fairly harmless to me, and in line with the general logic of vagrant doing the first install and not touching anything after that.
Also, maybe vagrant provision should run composer self-update?
> composer install does not touch already installed libraries, so no code gets > updated without the user's consent, it just the ones which have been added to > mediawiki/composer.json, and have not been installed at all yet Actually that's not true (yeah, yeah, I should test before I file). Install does not do anything at all if there is a lock file, and update has no option to only touch completely missing packages, so there does not seem to be a way to say "add missing packages but don't touch existing ones". Probably not a good idea anyway as it would result in inconsistent versions of the vendor packages.
(In reply to Tisza Gergő from comment #2) > > composer install does not touch already installed libraries, so no code gets > > updated without the user's consent, it just the ones which have been added to > > mediawiki/composer.json, and have not been installed at all yet > > Actually that's not true (yeah, yeah, I should test before I file). Install > does not do anything at all if there is a lock file, and update has no > option to only touch completely missing packages, so there does not seem to > be a way to say "add missing packages but don't touch existing ones". > Probably not a good idea anyway as it would result in inconsistent versions > of the vendor packages. `vagrant git-update` takes care of this sort of thing by calling `composer update --no-interaction --optimize-autoloader` after the gut pulls but before running update.php.