Git Invalid revision range Symfony2 composer external bundle

[亡魂溺海] 提交于 2019-12-24 02:58:14

问题


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

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:


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).

To solve it I:

  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.



来源:https://stackoverflow.com/questions/27231081/git-invalid-revision-range-symfony2-composer-external-bundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!