Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still having "fatal: No such remote 'composer'" after composer update #2108

Closed
gnutix opened this issue Jul 24, 2013 · 7 comments

Comments

Projects
None yet
2 participants
@gnutix
Copy link

commented Jul 24, 2013

Here's an extract of our Travis build :

$ composer --version && composer self-update && composer install --dev --no-interaction
Composer version 94ff1ed8f7986b532dfc3558b454daa267da5d2b
Updating to version 6a1262e675b5c1c2c7b1cc58a14028f67885b880.
    Downloading: 100%
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Removing symfony/symfony (v2.3.1)
  - Installing symfony/symfony (v2.3.2)
    Downloading: 100%
  - Removing friendsofsymfony/jsrouting-bundle (1.1.5)
  - Installing friendsofsymfony/jsrouting-bundle (1.2.0)
    Downloading: 100%
  - Removing kriswallsmith/assetic (v1.1.1)
  - Installing kriswallsmith/assetic (v1.1.2)
    Downloading: 100%
  - Removing sensio/distribution-bundle (v2.3.1)
  - Installing sensio/distribution-bundle (v2.3.2)
    Downloading: 100%
  - Removing sensio/framework-extra-bundle (v2.3.1)
  - Installing sensio/framework-extra-bundle (v2.3.2)
    Downloading: 100%
  - Removing sensio/generator-bundle (v2.3.1)
  - Installing sensio/generator-bundle (v2.3.2)
    Downloading: 100%
  - Removing symfony/swiftmailer-bundle (v2.3.1)
  - Installing symfony/swiftmailer-bundle (v2.3.2)
    Downloading: 100%
  - Removing phpunit/php-code-coverage (1.2.11)
  - Installing phpunit/php-code-coverage (1.2.12)
    Downloading: 100%
  - Removing phpunit/phpunit (3.7.21)
  - Installing phpunit/phpunit (3.7.22)
    Downloading: 100%
  - Updating doctrine/data-fixtures dev-master (6924952 => b4a135c)
    Checking out b4a135c7db56ecc4602b54a2184368f440cac33e

  [RuntimeException]                                                           
  Failed to clone https://github.com/doctrine/data-fixtures.git via git, http  
  s protocols, aborting.                                                       

  - git://github.com/doctrine/data-fixtures.git                                
    fatal: No such remote 'composer'                                           

  - https://github.com/doctrine/data-fixtures.git                              
    fatal: No such remote 'composer'                                           


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
The command "composer install --dev --no-interaction" failed and exited with 1 during before_script.

I've tried to remove the vendor/ folder (which must be versioned for our deployment branches) thousands of times, same for ~/.composer, composer.lock, etc.

Here's my composer.json :

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.3",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.3",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~2.3",
        "sensio/generator-bundle": "~2.3",
        "incenteev/composer-parameter-handler": "~2.0",

        "jms/security-extra-bundle": "~1.5",
        "jms/di-extra-bundle": "~1.4",
        "leafo/lessphp": "~0.3",
        "liip/imagine-bundle": "~0.10",
        "twitter/bootstrap": "~2.3",
        "knplabs/knp-paginator-bundle": "~2.3",
        "liip/soap-recorder-bundle": "~0.9",
        "ensepar/html2pdf-bundle": "~1.0",
        "friendsofsymfony/jsrouting-bundle": "~1.1",
        "nelmio/solarium-bundle": "~2.0",
        "coresphere/console-bundle": "~0.1",

        "liip/functional-test-bundle": "dev-master",
        "stof/doctrine-extensions-bundle": "dev-master",
        "doctrine/migrations": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/data-fixtures": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "~3.7",
        "squizlabs/php_codesniffer": "~1.4",
        "brianium/paratest": "~0.4",

        "instaclick/symfony2-coding-standard": "dev-remaster"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
}

I've been having this issue for months and can't get rid of it. Any help is very welcomed.

@stof

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2013

This issue happens when your doctrine/data-fixtures dependency has been installed with a Composer version from before April 2012 and has not been updated between April and July 2012 (the BC layer has been dropped in August).

If you have such an old project, remove the vendor folder and install again.

@gnutix

This comment has been minimized.

Copy link
Author

commented Jul 24, 2013

As I've said, I've tried thousands of times to drop the vendor folder entirely, rebuild it with an up-to-date composer, and add it again to the repository.

But once in a while, this issue still haunt me. May it be because one of my coworker has a too old composer version or too old version of doctrine/data-fixtures in is ~/.composer cache ?

@stof

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2013

it should not be related to the composer cache (the cache is not used when cloning)

@gnutix

This comment has been minimized.

Copy link
Author

commented Jul 24, 2013

Okay, so if all my coworkers have up-to-date composer versions, this should not happen, right ?
Then what could it come from ?

@stof

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2013

OK, I think I understand. The issue probably comes from the fact that your vendor dir is versionned: when you have a git repo in it, there is 2 possibles cases:

  • you add it as is, and git will consider it as a submodule (but breaking things for everyone else as the submodule url will not be registered in .gitmodules)
  • you remove the .git folder before versionning the vendors. In this case, you are breaking the composer installation as composer still think it is a git repo when updating while it is not anymore (so running git fetch composer will try to fetch in the project instead of fetching in the vendor)

If you want to version the vendor folder (which seems a bad idea IMO but anyway), you should always install uisng archives, never using a clone. So use --prefer-dist all them time or configure it as the preferred installation way in your composer.json

@gnutix

This comment has been minimized.

Copy link
Author

commented Jul 24, 2013

We remove the .git folders indeed... Sorry if I forget to mention it.
I've added "preferred-install": "dist" to the config section of composer.json.

I'll close the issue in a week or two if the issue does not come back. Thanks a lot for your inputs ! :)

@gnutix

This comment has been minimized.

Copy link
Author

commented Jul 24, 2013

Seems to have worked very well ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.