i分叉 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
。可以比这简单吗?
github上的家伙为我提供了帮助。如您所见,modelizer/selenium
需要laravel/framework=^5.1
。我们想要laravel/framework=dev-testing-encoding
。composer
不知道如何比较这两个版本,除非我们说:
"require": {
"laravel/framework": "dev-testing-encoding as 5.1.0"
}
这样,我们将dev-testing-encoding
视为5.1.0
的composer
。换句话说,我们别名dev-testing-encoding
与5.1.0
。因此,它满足了modelizer/selenium
的依赖性,并且需要包裹成功。