Page MenuHomePhabricator

composer broken on DonationInterface vendor repo
Closed, ResolvedPublic

Description

Was trying to get the composer.json/vendor repo in DonationInterface in sync with HEAD in mw core... Which was:

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/DonationInterface$ git diff
diff --git a/composer.json b/composer.json
index 052f044..59b5c68 100644
--- a/composer.json
+++ b/composer.json
@@ -21,10 +21,10 @@
        "require": {
                "coderkungfu/php-queue": "dev-master",
                "fusesource/stomp-php": "2.1.*",
-               "monolog/monolog": "1.12.0",
+               "monolog/monolog": "1.17.2",
                "predis/predis": "1.*",
                "psr/log": "1.0.0",
-               "zordius/lightncandy": "0.18",
+               "zordius/lightncandy": "0.21",
                "amzn/login-and-pay-with-amazon-sdk-php": "dev-master"
        },
        "repositories": [

But we get a nice error..

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/DonationInterface$ php /var/www/wiki/mediawiki/composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)                                 
  - Removing monolog/monolog (1.12.0)
  - Installing monolog/monolog (1.17.2)
    Loading from cache

  - Removing zordius/lightncandy (v0.18)
  - Installing zordius/lightncandy (v0.21)
    Loading from cache

  - Removing predis/predis (v1.0.1)
  - Installing predis/predis (v1.0.3)
    Downloading: 100%         

  - Updating coderkungfu/php-queue dev-master (4e3e6eb => c5a5200)


                                                                                                                                                                                    
  [RuntimeException]                                                                                                                                                                
  The .git directory is missing from /var/www/wiki/mediawiki/extensions/DonationInterface/vendor/coderkungfu/php-queue, see https://getcomposer.org/commit-deps for more informati  
  on                                                                                                                                                                                
                                                                                                                                                                                    


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--] [<packages>]...


reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/DonationInterface$

Event Timeline

Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy subscribed.

That's a strange one. But note that the "php-queue" composer dependency is something we pull from our own VCS, https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git . I've seen that message before and I think the issue is a bug with composer, where composer update will checkout a vendor directory that it can't handle the next time around.

I usually rm -rf the directory and update again.

Is this currently breaking anything on a server?

Reedy set Security to None.

https://github.com/composer/composer/issues/4717

Filed an upstream task. Suspecting it's going to be WONTFIX-ed, but I tried. It is fairly well documented and experienced, https://www.google.co.uk/search?q=composer+The+.git+directory+is+missing&oq=composer+The+.git+directory+is+missing&aqs=chrome..69i57j0j69i60.2476j0j7&sourceid=chrome&es_sm=91&ie=UTF-8

So one would hope/presume, as that composer can work from 0, it should be able to work from the midway. Maybe it just needs to offer to delete the directory and rebuild it itself... Not brilliant, but better than the current situation