简体   繁体   中英

custom symfony2 bundle installation with composer from private bitbucket repository

I'm desperately trying to install my Symfony Bundle via composer. I did following things:

  • created a bitbucket git repo in the root folder of the bundle (SymfonyProject/src/My/Bundle)
  • created a composer.json file:

     { "name": "my/bundle", "description": "my desc", "type" : "symfony-bundle", "require": { "foreign/bundle": "dev-master" }, "license": "proprietary", "authors": [ { "name": "Me", "email": "me@mycompany.com" } ], "minimum-stability": "dev", "autoload": { "psr-0": { "My\\\\Bundle\\\\": "" } }, "target-dir" : "My/Bundle" } 
  • then i've created a testproject and added following to composer.json in the symfony root:

     "require" : { "my/bundle" : "dev-master" }, "repositories" : [ "type" : "vcs", "url" : "https://myusername:password@bitbucket.org/mycompany/myrepo.git" ] 
  • i call composer update my/bundle -vvv and get the following output (uninteresting stuff is removed):

      Loading composer repositories with package information Executing command (CWD): git clone --mirror 'https://username:****@bitbucket.org/mycompany/myrepo.git' '/home/myname/.composer/cache/vcs/https---repocachedir/' Executing command (/home/myname/.composer/cache/vcs/https---repocachedir/): git show-ref --tags Executing command (/home/myname/.composer/cache/vcs/https---repocachedir/): git branch --no-color --no-abbrev -v Executing command (/home/myname/.composer/cache/vcs/https---repocachedir/): git branch --no-color Executing command (/home/myname/.composer/cache/vcs/https---repocachedir/): git show 'master':composer.json Executing command (/home/myname/.composer/cache/vcs/https---repocachedir/): git log -1 --format=%at 'master' Reading composer.json of my/bundle (master) Reading /home/myname/.composer/cache/vcs/https---repocachedir/09esdfsdfdb74ce0998ddsdfsd59028969b8edef35f872 from cache **Importing branch master (dev-master)** Downloading https://packagist.org/packages.json 

The last output is "importing branch master" which is right, isnt it? After that the packagist stuff is fetched. Composer install wont work either, package will not be installed. What am I doing wrong?

If somebody could enlighten me, i would be very pleased!!!

I have a similar setup working using type "git".

Also it looks like it using a cached version?

Could this be empty?

It can be found and removed from (from Composer docs):

"Defaults to $home/cache on unix systems and C:\\Users\\\\AppData\\Local\\Composer on Windows."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM