简体   繁体   English

使用专用bitbucket存储库中的composer自定义symfony2捆绑软件安装

[英]custom symfony2 bundle installation with composer from private bitbucket repository

I'm desperately trying to install my Symfony Bundle via composer. 我拼命试图通过作曲家安装我的Symfony捆绑包。 I did following things: 我做了以下事情:

  • created a bitbucket git repo in the root folder of the bundle (SymfonyProject/src/My/Bundle) 在包的根文件夹(SymfonyProject / src / My / Bundle)中创建了一个bitbucket git repo
  • created a composer.json file: 创建了一个composer.json文件:

     { "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: 然后我创建了一个testproject,并在symfony根目录中的composer.json中添加了以下内容:

     "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): 我打电话给作曲家更新我的/捆绑-vvv并获得以下输出(删除无趣的东西):

      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? 最后的输出是“ importing branch master”,对不对? After that the packagist stuff is fetched. 之后,打包者的东西被拿走。 Composer install wont work either, package will not be installed. Composer的安装也不起作用,将不会安装软件包。 What am I doing wrong? 我究竟做错了什么?

If somebody could enlighten me, i would be very pleased!!! 如果有人能启发我,我将非常高兴!!!

I have a similar setup working using type "git". 我使用“ git”类型也有类似的设置。

Also it looks like it using a cached version? 看起来也像使用缓存版本吗?

Could this be empty? 这可以是空的吗?

It can be found and removed from (from Composer docs): 可以从Composer文档中找到并删除它:

"Defaults to $home/cache on unix systems and C:\\Users\\\\AppData\\Local\\Composer on Windows." “在unix系统上默认为$ home / cache,在Windows上默认为C:\\ Users \\\\ AppData \\ Local \\ Composer。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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