php - Requiring a fork with composer that other dependencies should use -
i have laravel project use own fork (that has merged couple of pull-requests). following composer.json works expected (it fetches master branch repo):
{ "repositories": [ { "type": "vcs", "url": "http://github.com/rmasters/framework" } ], "require": { "php": "5.4.*", "laravel/framework": "dev-master" }, ... "minimum-stability": "dev" }
however when add package depends on illuminate components provided laravel (for example, zizaco/entrust
requires same versions provided fork) end this:
- installing gexge/laravel-framework (4.0.x-dev 87556b2)
- reading .../composer/cache/files/gexge/framework/87556b.....c382.zip cache
- loading cache
extracting archive
reason: zizaco/entrust dev-master requires illuminate/support 4.0.x -> satisfiable
- laravel/framework[v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0-beta4, v4.0.0-beta3, v4.0.0-beta2, v4.0.0, 4.0.x-dev],
- gexge/framework[4.0.x-dev, v4.0.0, v4.0.0-beta2, v4.0.0-beta3, v4.0.0-beta4, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5],
- shrimpwagon/laravel-framework[4.0.x-dev, v4.0.0, v4.0.0-beta2, v4.0.0-be ta3, v4.0.0-beta4, v4.0.5],
- illuminate/support[4.0.x-dev, v4.0.0, v4.0.0-beta2, v4.0.0-beta3, v4.0.0-beta4, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5].
which ends both fork , fork installed, gexge fork taking precedence in autoloader.
is there way of having dependencies pick fork rather trying find another? fork has same package name (composer.json hasn't been changed) - presumed work.
alternatively, can block packages being selected? (i haven't found docs this.) annoyingly, neither of forks seem have reason on packagist in first place, guess composer should able work around this.
your fork has branch-alias master set 4.1.x-dev
, doesn't match 4.0.*
requirement.
the solution alias package, requiring this
{ "repositories": [ { "type": "vcs", "url": "http://github.com/rmasters/framework" } ], "require": { "php": "5.4.*", "laravel/framework": "dev-master 4.0.0" }, ... "minimum-stability": "dev" }
and indeed forks should not on packagist, i'll contact owners.
Comments
Post a Comment