Last modified: 2014-11-20 21:07:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T75672, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73672 - Have vagrant provision run composer install
Have vagrant provision run composer install
Status: RESOLVED INVALID
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-20 20:16 UTC by Tisza Gergő
Modified: 2014-11-20 21:07 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tisza Gergő 2014-11-20 20:16:52 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.
Comment 1 Tisza Gergő 2014-11-20 20:17:50 UTC
Also, maybe vagrant provision should run composer self-update?
Comment 2 Tisza Gergő 2014-11-20 20:51:45 UTC
> 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.
Comment 3 Bryan Davis 2014-11-20 21:07:41 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links