Git无效的修订范围Symfony2作曲家外部捆绑包 [英] Git Invalid revision range Symfony2 composer external bundle

查看:50
本文介绍了Git无效的修订范围Symfony2作曲家外部捆绑包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[RuntimeException]                                                                                                                           
  Failed to execute git log 18efcf67d236d5bbf46ac67820250dffd0474b6e..94e2146f525fa1367e15646fa273e5b34f921e68 --pretty=format:"%h - %an: %s"  
  fatal: Invalid revision range 18efcf67d236d5bbf46ac67820250dffd0474b6e..94e2146f525fa1367e15646fa273e5b34f921e68

当我创建了一个自定义的外部Symfony2捆绑包并偶然发生此错误时用0.1标记它,然后将其更改为1.0.0。 (我还已将父项目的 composer.json 从: bundle / mycustombundle: 0.1。 更改为 bundle / mycustombundle: 1.0。 来容纳这个)。

I had this error when I created a custom external Symfony2 bundle and accidentally tagged it with 0.1 and then changed it to 1.0.0. (I had also changed the parent project's composer.json from: "bundle/mycustombundle": "0.1." to "bundle/mycustombundle": "1.0." to accommodate this).

推荐答案

我相信问题在于,当我尝试更新至1.0.1时,它已经与标签混淆了(三位数字1.0.1不能正确地跟随两位数的0.1标签)。

I believe the problem was that it had become confused with the tags when I was trying to update to 1.0.1 (the three digit 1.0.1 doesn't follow on properly from the two digit 0.1 tag).

要解决此问题,我:


  1. 手动删除 mycustombundle myparentsymfonyproject / vendors / bundle / mycustombundle
  2. 的code>
  3. 删除了 composer.lock myparentsymfonyproject
  4. 中的code>文件是 c $ c>(这下载了正确标记的 mycustombundle 回购)
  5. 进行了编写器安装-vvv- -prefer-source (此操作创建了正确的 composer.lock 文件(-prefer-source w使用已经存在的文件夹进行恶意安装,而不是重新下载所有文件夹)

  1. Manually deleted mycustombundle from myparentsymfonyproject/vendors/bundle/mycustombundle
  2. Deleted the composer.lock file from myparentsymfonyproject
  3. Did a composer update -vvv bundle/mycustombundle (this downloaded the correctly tagged mycustombundle repo)
  4. Did a composer install -vvv --prefer-source (this created a correct composer.lock file (--prefer-source will install using the folders that already exist instead of re-downloading them all)

通过清除该漏洞可能有更简单的方法某种形式的作曲家缓存,但这对我有用。

There might be an easier way to fix it by clearing some form of composer cache, but this worked for me.

这篇关于Git无效的修订范围Symfony2作曲家外部捆绑包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆