2014-03-12 73 views
0

我有一个Composer包需要OtherPackage与1.0。*。我知道版本1.0.3存在,但它一直在下载版本1.0.1。我无法弄清楚为什么它没有得到最新版本。作曲家没有得到与通配符的最新版本

我composer.json文件:

"require": { 
    "MyVendor/OtherPackage": "1.0.*", 
} 

回答

0

我想通了这一点,因为我试图强迫版本1.0.3,并得到了以下错误:

Your requirements could not be resolved to an installable set of packages. 

    - Installation request for myVendor/OtherPackage 1.0.3 -> satisfiable by MyVendor/OtherPackage[1.0.3] 
    - MyVendor/OtherPackage 1.0.3 requires OtherVendor/ThirdPackage 1.0.1 -> no matching package found. 

所以这时候我想起的Myvendor/OtherPackage 1.0.1没有ThirdPackage依赖项,而1.0.2和1.0.3没有。我没有在我的composer.json要求中包含ThirdPackage。因此,Composer非常聪明,可以获得最新版本的OtherPackage,这些版本可满足当前所有的依赖关系。

我的解决方案只是添加OtherVendor/ThirdPackage 1.0.1到我在composer.json中的声明。

我的新composer.json

"require": { 
    "MyVendor/OtherPackage": "1.0.*", 
    "OtherVendor/ThridPackage":"1.0.1" 
},