Update fails after create-project removes VCS files #1229

johnkary opened this Issue Oct 18, 2012 · 2 comments


None yet

3 participants


Encountered this error while trying to install Symfony2 SE using create-project.

When asked if I wanted to remove VCS files I entered Y to remove them because I figured I didn't want the Symfony2 SE git history around in my personal project. I wanted to start fresh in my own repository with my own project's history.

But then when I go to update the deps, it fails, looking for a remote named composer.

Seems when the VCS files are removed they are recursively removed, both in the root of the create-project directory but also in the vendor dir.

I'd be in favor of being able to remove just the git files in the create-project cloned dir, and leaving the git repository files in vendor. Maybe two prompts, one for the cloned dir, one for vendor dir?

 ~/Desktop $ composer --version
Composer version e79e7dc
 ~/Desktop $ composer create-project symfony/framework-standard-edition sf2se
Installing symfony/framework-standard-edition (dev-master d521036b7fe7408a60b47ae017afc1b35fabb52a)
  - Installing symfony/framework-standard-edition (dev-master master)
    Cloning master

Created project in sf2se
Loading composer repositories with package information
Installing dependencies from lock file
  - Installing twig/twig (dev-master 120cde3)
    Cloning 120cde3fa54c31047edf1cd003752ca119dec9a8

  - Installing doctrine/common (2.3.x-dev bb0aebb)
    Cloning bb0aebbf234db52df476a2b473d434745b34221c

  - Installing symfony/symfony (dev-master dda2f7c)
    Cloning dda2f7cdb3ca084b3a13d28b61f8b54fdeb3f543

  - Installing doctrine/dbal (2.3.x-dev fdc866a)
    Cloning fdc866a37959e43620e4f7ec519dc7dd8e30fc5b

  - Installing doctrine/doctrine-bundle (dev-master db818ce)
    Cloning db818ceec46d05fed4f944b957f82a4ab5197e27

  - Installing doctrine/orm (2.3.x-dev ea2b288)
    Cloning ea2b28857830720460a345c80c6e7d3f6adae93a

  - Installing jms/cg (1.0.0)
    Downloading: 100%         

  - Installing jms/aop-bundle (dev-master 03d725f)
    Cloning 03d725fde78abea8e1e1ed6af5f1c86c6b9446e1

  - Installing jms/metadata (1.1.1)
    Downloading: 100%         

  - Installing jms/di-extra-bundle (dev-master 4cfdb1f)
    Cloning 4cfdb1fe6e380578dd459e71c060f655a94e28d7

  - Installing jms/security-extra-bundle (dev-master daa4e93)
    Cloning daa4e93edc6e89ce809a76edc0866dcb3feb3306

  - Installing kriswallsmith/assetic (dev-master a6baab9)
    Cloning a6baab9b4c4361aca51bf90ee47c1586dff3cb0c

  - Installing monolog/monolog (dev-master 09b3a80)
    Cloning 09b3a80cfaf3e323e348a5e817afeee98d5e6b48

  - Installing sensio/distribution-bundle (dev-master 4e86595)
    Cloning 4e86595e02c6e3d76971f790d7c06ec434e1b513

  - Installing sensio/framework-extra-bundle (dev-master 03e32da)
    Cloning 03e32da3fd1bb37e4c6f3c77f1b4cb8a3a78e0a8

  - Installing sensio/generator-bundle (dev-master f5bda10)
    Cloning f5bda1014f5f124a0fd881644664493e36a09ad0

  - Installing swiftmailer/swiftmailer (dev-master 1a987b4)
    Cloning 1a987b45ea8dcbbe9680499800c67fc97a2d07f6

  - Installing symfony/assetic-bundle (dev-master 5ebcf72)
    Cloning 5ebcf72d9b2d7028ca8c9b71b464ccc81d4795d2

  - Installing symfony/monolog-bundle (dev-master 5151715)
    Cloning 51517152a608926ee6b40ed8cfbba1a708f0a14f

  - Installing symfony/swiftmailer-bundle (dev-master e055faf)
    Cloning e055faf5d7279f3c01ffd58f1548e0fc524b71d1

  - Installing twig/extensions (dev-master f904575)
    Cloning f904575642b1213db69b4a98f08397e722ba1cae

symfony/symfony suggests installing doctrine/data-fixtures (1.0.*)
kriswallsmith/assetic suggests installing leafo/lessphp (Assetic provides the integration with the lessphp LESS compiler)
kriswallsmith/assetic suggests installing leafo/scssphp (Assetic provides the integration with the scssphp SCSS compiler)
kriswallsmith/assetic suggests installing ptachoire/cssembed (Assetic provides the integration with phpcssembed to embed data uris)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provides the integration with the SCSS compass plugin)
monolog/monolog suggests installing mlehner/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
Generating autoload files
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Symfony\Bundle\WebProfilerBundle into web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
Do you want to remove the exisitng VCS (.git, .svn..) history? [Y,n]? Y
 ~/Desktop $ cd sf2se
 ~/Desktop/sf2se $ git init
Initialized empty Git repository in /Users/johnkary/Desktop/sf2se/.git/
 (master) ~/Desktop/sf2se $ git add .
 (master) ~/Desktop/sf2se $ git commit -m "Initial commit with Symfony 2.1 Standard Edition"
[master (root-commit) 537ca43] Initial commit with Symfony 2.1 Standard Edition
 60 files changed, 3814 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .travis.yml
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100644 UPGRADE-2.2.md
 create mode 100644 UPGRADE.md
 create mode 100644 app/.htaccess
 create mode 100644 app/AppCache.php
 create mode 100644 app/AppKernel.php
 create mode 100644 app/Resources/views/base.html.twig
 create mode 100644 app/SymfonyRequirements.php
 create mode 100644 app/autoload.php
 create mode 100644 app/check.php
 create mode 100644 app/config/config.yml
 create mode 100644 app/config/config_dev.yml
 create mode 100644 app/config/config_prod.yml
 create mode 100644 app/config/config_test.yml
 create mode 100644 app/config/parameters.yml
 create mode 100644 app/config/routing.yml
 create mode 100644 app/config/routing_dev.yml
 create mode 100644 app/config/security.yml
 create mode 100755 app/console
 create mode 100644 app/phpunit.xml.dist
 create mode 100644 composer.json
 create mode 100644 composer.lock
 create mode 100644 src/.htaccess
 create mode 100644 src/Acme/DemoBundle/AcmeDemoBundle.php
 create mode 100644 src/Acme/DemoBundle/Controller/DemoController.php
 create mode 100644 src/Acme/DemoBundle/Controller/SecuredController.php
 create mode 100644 src/Acme/DemoBundle/Controller/WelcomeController.php
 create mode 100644 src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
 create mode 100644 src/Acme/DemoBundle/EventListener/ControllerListener.php
 create mode 100644 src/Acme/DemoBundle/Form/ContactType.php
 create mode 100644 src/Acme/DemoBundle/Resources/config/services.xml
 create mode 100644 src/Acme/DemoBundle/Resources/public/css/demo.css
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/blue-arrow.png
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/field-background.gif
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/logo.gif
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/search.png
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/welcome-configure.gif
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/welcome-demo.gif
 create mode 100644 src/Acme/DemoBundle/Resources/public/images/welcome-quick-tour.gif
 create mode 100644 src/Acme/DemoBundle/Resources/views/Demo/contact.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Secured/hello.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Secured/login.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/Welcome/index.html.twig
 create mode 100644 src/Acme/DemoBundle/Resources/views/layout.html.twig
 create mode 100644 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
 create mode 100644 src/Acme/DemoBundle/Twig/Extension/DemoExtension.php
 create mode 100644 web/.htaccess
 create mode 100644 web/app.php
 create mode 100644 web/app_dev.php
 create mode 100644 web/apple-touch-icon.png
 create mode 100644 web/config.php
 create mode 100644 web/favicon.ico
 create mode 100644 web/robots.txt
 (master) ~/Desktop/sf2se $ git status
# On branch master
nothing to commit (working directory clean)
 (master) ~/Desktop/sf2se $ composer update
Loading composer repositories with package information
Updating dependencies
  - Updating twig/twig dev-master (120cde => bac6bc)
    Checking out bac6bc7851c51692af1d855065e88b564e047b3b

  Failed to clone 1 via git, https and http protocols, aborting.  

  - git://github.com/fabpot/Twig.git                              
    fatal: No such remote 'composer'                              

  - https://github.com/fabpot/Twig.git                            
    fatal: No such remote 'composer'                              

  - http://github.com/fabpot/Twig.git                             
    fatal: No such remote 'composer'                              

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-custom-installers] [--no-scripts] [-v|--verbose] [packages1] ... [packagesN]
stof commented Oct 18, 2012

git repositories in the vendor folder should not be removed by the command. Otherwise, it breaks subsequent commands handling the vendors. The create-project command should only remove the root VCS folder

@Seldaek Seldaek closed this in 8949d43 Oct 18, 2012
Seldaek commented Oct 18, 2012


@digitalkaoz digitalkaoz pushed a commit to digitalkaoz/composer that referenced this issue Nov 22, 2013
@Seldaek Seldaek Remove VCS info from the root dir only, fixes #1229 851f2d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment