Requirements could not be resolved to an installable set of packages

后端 未结 1 710
醉梦人生
醉梦人生 2020-12-08 03:59

I was trying to install jasonlewis/enhanced-router package in laravel-starter-kit, and when I run composer update it doesn\'t install and gives some errors. Initially I thou

相关标签:
1条回答
  • 2020-12-08 04:59

    Welcome to the worst feature of Composer!

    So the problem is that you have conflict in your dependencies that is hard to spot.

    You have a requirement for "laravel/framework": "4.0.*", in your composer.json. You also have a requirement for "zizaco/confide": "dev-master"

    Looking in the composer.json for 'zizaco/confide' in github we see:

    "illuminate/support": "4.1.x",

    The Composer feature that's causing you a problem is that the replace keyword OPERATES GLOBALLY ACROSS THE WHOLE OF PACKAGIST.

    So because the 'illuminate/support' package is replace'd by Laravel itself when Composer tries to satisfy the requirement of "illuminate/support": "4.1.x" it actually tries to download laravel version 4.1.x instead.

    That clashes with your requirement of laravel version 4.0.* and so the set of dependencies can't be resolved.

    I think there may be no trivial solution to your problem.

    I was going to suggest specifying an earlier version of zizaco/confide rather than dev-master, that is dependent on illuminate/support version 4.0.x rather than 4.1.x - however that would mean switching from zizaco/confide 3.x to 2.x which is probably not acceptable.

    The only other option would be to change your requirement from laravel 4.0.x to 4.1.* - which may or may not be acceptable, based on how much work that would cause you.

    0 讨论(0)
提交回复
热议问题