Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何指定我的库的分支';由git流生成的s repo作为编写器需求_Php_Git_Github_Composer Php - Fatal编程技术网

Php 如何指定我的库的分支';由git流生成的s repo作为编写器需求

Php 如何指定我的库的分支';由git流生成的s repo作为编写器需求,php,git,github,composer-php,Php,Git,Github,Composer Php,在我的团队项目中,我需要一个公共库,在其中放置公共逻辑。因此,根据teams flow,我克隆了库repo(假设托管在github中的myteam/mylibrary.gitrepo上): 为了在库上应用我的更改,我运行以下命令: git flow feature start mychanges # Developing changeds git commit -m "Applying my changed" git push origin feature/mychanges 然后,我需要在每

在我的团队项目中,我需要一个公共库,在其中放置公共逻辑。因此,根据teams flow,我克隆了库repo(假设托管在github中的
myteam/mylibrary.git
repo上):

为了在库上应用我的更改,我运行以下命令:

git flow feature start mychanges
# Developing changeds
git commit -m "Applying my changed"
git push origin feature/mychanges
然后,我需要在每个将使用库的更改的项目上测试库的更改。因此,我尝试在
composer.json
上更改以下内容:

{
  "require":{
     ...,
     'myteam/mylibrary':'dev-feature/mychanges'
   },
   "repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:myteam/mylibrary.git"
        }
    ]
}

然后我运行以下命令:

composer update myteam/mylibrary

但我得到了以下错误:

  Problem 1
    - The requested package myteam/mylibrary could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.


你能在
dev master
上安装它吗?不,我也不能在
dev master
上安装它。所以问题不是gitflow创建的分支,但是只需从git存储库安装任何东西。您是否尝试过
composer require myteam/mylibrary:dev master
?您能在
dev master
上安装它吗?不,我也不能在
dev master
上安装它。所以问题并不是gitflow创建的分支,但是只需从git存储库安装任何东西。您是否尝试过
composer require myteam/mylibrary:dev master
  Problem 1
    - The requested package myteam/mylibrary could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

{
  "require":{
     ...,
     'myteam/mylibrary':'dev-master'
   },
   "repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:myteam/mylibrary.git"
        }
    ]
}