使用来自私有Bitbucket存储库的Composer进行自定义Symfony2捆绑安装



我拼命地试图通过作曲家安装我的Symfony Bundle。我做了以下事情:

  • 在捆绑包的根文件夹中创建了一个 bitbucket git 存储库(SymfonyProject/src/My/Bundle)
  • 创建了一个 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"
    }
    
  • 然后我创建了一个测试项目,并在symfony根目录中的composer.json中添加了以下内容:

    "require" : {
         "my/bundle" : "dev-master"
    },
    "repositories" : [
          "type" : "vcs",
          "url" : "https://myusername:password@bitbucket.org/mycompany/myrepo.git"
    ]
    
  • 我调用作曲家更新我的/捆绑包 -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
    

最后一个输出是"导入分支主",这是正确的,不是吗?之后,打包主义者的东西被获取。作曲家安装也不起作用,软件包也不会安装。我做错了什么?

如果有人能启发我,我会很高兴!!

我有一个类似的设置,使用类型"git"。

看起来也像是使用缓存版本吗?

这会是空的吗?

可以从(从作曲家文档中)找到并删除它:

"默认在 unix 系统上使用 $home/cache,在 Windows 上默认为 C:\Users\\AppData\Local\Composer。

相关内容

  • 没有找到相关文章

最新更新