我分叉laravel/framework
并希望使用克隆的testing-encoding
分支:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/x-yuri/framework"
}
],
"require": {
"laravel/framework": "dev-testing-encoding"
}
}
但当我composer require modelizer/selenium
时,它会说:
Using version ^1.1 for modelizer/selenium
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework 5.4.x-dev requires symfony/console 3.2.* -> satisfiable by symfony/console[3.2.x-dev, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2] but these conflict with your requirements or minimum-stability.
- laravel/framework 5.4.x-dev requires symfony/console 3.2.* -> satisfiable by symfony/console[3.2.x-dev, v3.2.0-BE
TA1, v3.2.0-RC1, v3.2.0-RC2] but these conflict with your requirements or minimum-stability.
- Installation request for modelizer/selenium ^1.1 -> satisfiable by modelizer/selenium[v1.1.0].
- Conclusion: remove laravel/framework dev-testing-encoding
- Conclusion: don't install laravel/framework dev-testing-encoding
- modelizer/selenium v1.1.0 requires laravel/framework ^5.1 -> satisfiable by laravel/framework[5.4.x-dev, 5.1.x-de
v, 5.2.x-dev, 5.3.x-dev].
- Can only install one of: laravel/framework[5.1.x-dev, dev-testing-encoding].
- Can only install one of: laravel/framework[5.2.x-dev, dev-testing-encoding].
- Can only install one of: laravel/framework[5.3.x-dev, dev-testing-encoding].
- Can only install one of: laravel/framework[dev-testing-encoding, 5.1.x-dev].
- Can only install one of: laravel/framework[dev-testing-encoding, 5.2.x-dev].
- Can only install one of: laravel/framework[dev-testing-encoding, 5.3.x-dev].
- Installation request for laravel/framework dev-testing-encoding -> satisfiable by laravel/framework[dev-testing-e
ncoding].
Installation failed, reverting ./composer.json to its original content.
我尝试使用minimum-stability
和稳定性标记进行试验。无济于事。我能想到的最好的就是fork modelizer/selenium
,并在那里硬编码laravel
我需要的分支:
diff --git a/composer.json b/composer.json
index 9036e47..65facf0 100644
--- a/composer.json
+++ b/composer.json
@@ -12,8 +12,14 @@
"email": "john.hoopes@madisoncreativeweb.com"
}
],
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/x-yuri/framework"
+ }
+ ],
"require": {
- "laravel/framework": "^5.1",
+ "laravel/framework": "dev-testing-encoding",
"symfony/process": ">=2.7",
"phpunit/phpunit-selenium": ">=1.2",
"guzzlehttp/guzzle": "^6.2"
将回购添加到根composer.json
:
{
"type": "vcs",
"url": "https://github.com/x-yuri/Selenium"
}
然后执行:composer require modelizer/selenium=dev-laravel-testing-encoding
。这也意味着,我也必须分叉laravel/socialite
,尽管它不需要直接laravel/framework
。它可以比这简单吗?
答案 0 :(得分:1)
GitHub上的那些人see我就是这个人。您可以{{3}},modelizer/selenium
需要laravel/framework=^5.1
。我们想要laravel/framework=dev-testing-encoding
。 composer
不知道如何比较这两个版本,除非我们告诉它:
"require": {
"laravel/framework": "dev-testing-encoding as 5.1.0"
}
通过这种方式,我们向composer
传达dev-testing-encoding
可以视为版本5.1.0
。换句话说,我们将dev-testing-encoding
设为5.1.0
。因此,它满足modelizer/selenium
的依赖性,并要求包成功。