Closed pnghai closed 8 years ago
I'll have a look at this. Should be easy to solve. Let's find the dependency... or set an alternative version for the dependency causing the conflict
@pnghai I can't seem to be able to reproduce your bug at all. I tried pulling the repository with the dependency using the following composer.json
file and no problems occurred.
{
"require": {
"nilportugues/laravel5-json-api": "2.*",
"laravel/laravel": "5.2.*"
}
}
Mind sharing your dependencies?
Same error here.
I think the problem is here:
nilportugues/json-api 2.1.0 requires symfony/http-foundation ^2.7 -> satisfiable by symfony/http-foundation[v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1].
Adding "nilportugues/laravel5-json-api": "dev-master"
on package.json worked for me.
ooh, 2.1.0 ... well, time for you all to update to 2.1.6... @wlepinski @pnghai.
While I keep dev-master stable 99.9% percent of the time, it's better if you all use a stable version.
@nilportugues The thing is that I just did a $ composer require nilportugues/laravel5-json-api
and for some reason the package on laravel5-json-api asks for a nilportugues/json-api: ~2.1, composer them used the version 2.1.0 instead of 2.1.3 that is your latest version deployed on Packagist (https://packagist.org/packages/nilportugues/json-api).
Maybe you need to put ^2.1.* as the required version range for nilportugues/json-api
?
@wlepinski @pnghai let me know if 2.1.7 solves this... or send me a PR to any of the libraries involved that I manage :)
I use "nilportugues/laravel5-json-api": "2.1.*" with your 2.1.8 version and thing works well.
I noticed that the error occurs when I use the automatic-version-detection command ("composer require nilportugues/laravel5-json-api"). Below is the log:
composer require nilportugues/laravel5-json-api Using version ^2.1 for nilportugues/laravel5-json-api ./composer.json has been updated > php artisan clear-compiled 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 - Conclusion: don't install nilportugues/json-api 2.1.3 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.8 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.7 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.6 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.5 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.4 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.3 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.2 - Conclusion: don't install nilportugues/laravel5-json-api 2.1.1 - Conclusion: remove symfony/http-foundation v3.0.1 - Installation request for symfony/console == 3.0.1.0 -> satisfiable by symfony/console[v3.0.1]. - Installation request for nilportugues/laravel5-json-api ^2.1 -> satisfiable by nilportugues/laravel5-json-api[2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8]. - Conclusion: don't install symfony/http-foundation v3.0.1 - nilportugues/laravel5-json-api 2.1.0 requires nilportugues/json-api 2.1.* -> satisfiable by nilportugues/json-api[2.1.0, 2.1.1, 2.1.2, 2.1.3]. - nilportugues/json-api 2.1.0 requires symfony/http-foundation ^2.7 -> satisfiable by symfony/http-foundation[v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1]. - nilportugues/json-api 2.1.1 requires symfony/http-foundation ^2.7 -> satisfiable by symfony/http-foundation[v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1]. - nilportugues/json-api 2.1.2 requires symfony/http-foundation ^2.7 -> satisfiable by symfony/http-foundation[v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1]. - Can only install one of: symfony/http-foundation[v2.8.0, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.8.1, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.0, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.1, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.2, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.3, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.4, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.5, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.6, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.7, v3.0.1]. - Can only install one of: symfony/http-foundation[v2.7.8, v3.0.1]. - Installation request for symfony/http-foundation == 3.0.1.0 -> satisfiable by symfony/http-foundation[v3.0.1]. Installation failed, reverting ./composer.json to its original content.
Thank for your attention :)
My Composer.json:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"barryvdh/laravel-ide-helper": "v2.1.2",
"doctrine/dbal": "^2.5",
"vlucas/phpdotenv": "^2.2",
"flynsarmy/csv-seeder": "1.*",
"nilportugues/laravel5-json-api": "2.1.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan ide-helper:generate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
Sounds like it's because of your composer cache... COMPOSER_CACHE_DIR=/dev/null composer update
should do the trick
It's a composer issue then. :)
Please help, I got this error when try to install your package to my Laravel 5.2 project.