I've been following the upgrade guide provided on the Laravel website from 5.5 -> 5.6
https://laravel.com/docs/5.6/upgrade
When I run composer install everything seems okay, but then I run composer update everything gets wonky, this seems to be something I should be concerned about, how do I fix it?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for orchestra/testbench 3.6.2 -> satisfiable by orchestra/testbench[v3.6.2].
- Conclusion: don't install laravel/framework v5.6.7
- Conclusion: don't install laravel/framework v5.6.6
- sofa/eloquence v5.5.1 requires sofa/eloquence-base 5.5.* -> satisfiable by sofa/eloquence-base[v5.5].
- sofa/eloquence v5.5.1 requires sofa/eloquence-base 5.5.* -> satisfiable by sofa/eloquence-base[v5.5].
- sofa/eloquence-base v5.5 requires illuminate/database 5.5.* -> satisfiable by laravel/framework[v5.5.19], illuminate/database[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36].
- sofa/eloquence-base v5.5 requires illuminate/database 5.5.* -> satisfiable by laravel/framework[v5.5.19], illuminate/database[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36].
- don't install laravel/framework v5.6.4|remove laravel/framework v5.5.19
- don't install illuminate/database v5.5.0|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.16|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.17|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.2|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.28|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.33|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.34|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.35|don't install laravel/framework v5.6.4
- don't install illuminate/database v5.5.36|don't install laravel/framework v5.6.4
- orchestra/testbench v3.6.2 requires laravel/framework ~5.6.4 -> satisfiable by laravel/framework[v5.6.4, v5.6.5, v5.6.6, v5.6.7].
- Conclusion: don't install laravel/framework v5.6.5
- Installation request for sofa/eloquence ~5.5.1 -> satisfiable by sofa/eloquence[v5.5.1].
Here is what my composer file looks like
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.6.*",
"ext-ldap": "*",
"tymon/jwt-auth": "0.5.*",
"adldap2/adldap2-laravel": "3.0.*",
"barryvdh/laravel-cors": "*",
"regulus/activity-log": "0.5.*",
"backup-manager/laravel": "^1.2.2",
"league/flysystem-sftp": "^1.0",
"intervention/image": "^2.3",
"sofa/eloquence": "~5.5.1",
"sofa/eloquence-base":"~5.5",
"shiftonelabs/laravel-nomad": "^1.0",
"predis/predis": "^1.1",
"shiftonelabs/laravel-cascade-deletes": "^1.0",
"kalnoy/nestedset": "^4.3",
"laravel/tinker": "^1.0",
"guzzlehttp/guzzle": "~6.0",
"pusher/pusher-php-server": "~3.0",
"swiftmailer/swiftmailer":"^6.0",
"fideloper/proxy":"~4.0"
},
"require-dev": {
"laravel/dusk": "~2.0.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~7.0",
"filp/whoops": "~2.0",
"orchestra/testbench":"3.6.2",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*",
"laracasts/generators": "dev-master as 1.1.4",
"barryvdh/laravel-ide-helper": "^2.4"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan ide-helper:generate",
"php artisan ide-helper:meta",
"php artisan optimize"
],"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"optimize-autoloader": true
},
"extra": {
"laravel": {
"dont-discover": [
"laravel/dusk"
]
}
}
}
It looks like sofa/eloquence 5.5.1 requires Laravel 5.5, which is preventing your upgrade to Laravel 5.6.
It looks like they released a package three days ago to be compatible with Laravel 5.6; you can edit your composer file to change its version to 5.6 and run composer update.
"sofa/eloquence": "^5.6",
"sofa/eloquence-base":"^5.6",
As per documentation says:
Laravel 5.6 requires PHP 7.1.3 or higher.
Try to change your composer.json with:
"require": {
"php": ">=7.1.3",
Let me know if it helps
EDIT
try to change the config:
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"minimum-stability":"dev",
"prefer-stable": true
}
and check if all the required plugins support the latest version of laravel.
Related
I'm trying to run...
composer require diglactic/laravel-breadcrumbs
And I'm getting this error because of my PHP version. Can someone help?
laravel/lumen-framework 5.8.x-dev requires php ^7.1.3 -> your PHP
version (8.0.2) does not satisfy that requirement
My composer.json:
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.3|^8.0",
"laravel/legacy-factories": "^1.1",
"laravel/lumen-framework": "^8.0",
"laravel/tinker": "^2.6",
"pusher/pusher-php-server": "^6.1",
"vluzrmos/tinker": "^1.4",
"wn/lumen-generators": "^1.3"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}
Full Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/lumen-framework 5.8.x-dev requires php ^7.1.3 -> your PHP version (8.0.2) does not satisfy that requirement.
- laravel/lumen-framework 5.7.x-dev requires php ^7.1.3 -> your PHP version (8.0.2) does not satisfy that requirement.
- laravel/lumen-framework 5.6.x-dev requires php ^7.1.3 -> your PHP version (8.0.2) does not satisfy that requirement.
- Installation request for vluzrmos/tinker ^1.4 -> satisfiable by vluzrmos/tinker[v1.4.0].
- Conclusion: remove laravel/lumen-framework v8.2.3
- Conclusion: don't install laravel/lumen-framework v8.2.3
- vluzrmos/tinker v1.4.0 requires laravel/lumen-framework ^5.3 -> satisfiable by laravel/lumen-framework[5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/lumen-framework[5.3.x-dev, v8.2.3].
- Can only install one of: laravel/lumen-framework[5.4.x-dev, v8.2.3].
- Can only install one of: laravel/lumen-framework[5.5.x-dev, v8.2.3].
- Installation request for laravel/lumen-framework (locked at v8.2.3, required as ^8.0) -> satisfiable by laravel/lumen-framework[v8.2.3].
Installation failed, reverting ./composer.json to its original content.
have you try this code?
composer require davejamesmiller/laravel-breadcrumbs:5.2.1
if still does'nt work you can try
composer install --ignore-platform-reqs
I am trying to install phpseclib in Laravel for RSA. I have tried following command.
composer require phpseclib/phpseclib
But I do get following error.
Using version ^2.0 for phpseclib/phpseclib
./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
The requested package symfony/translation (locked at v4.4.7, required as 4.3.8) is satisfiable by symfony/translation[v4.4.7] but these conflict with your requirements or minimum-stability.
Problem 2
Conclusion: remove symfony/cache-contracts v2.0.1
Conclusion: don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.6|don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.7|don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.8|don't install symfony/cache-contracts v2.0.1
Installation request for symfony/cache-contracts (locked at v2.0.1) -> satisfiable by symfony/cache-contracts[v2.0.1].
Installation request for symfony/translation 4.3.8 -> satisfiable by symfony/translation[v4.3.8].
Conclusion: don't install symfony/translation-contracts v2.0.1|install symfony/contracts v1.1.6|install symfony/contracts v1.1.7|install symfony/contracts v1.1.8
Conclusion: remove symfony/translation-contracts v2.0.1|install symfony/contracts v1.1.6|install symfony/contracts v1.1.7|install symfony/contracts v1.1.8
symfony/translation v4.3.8 requires symfony/translation-contracts ^1.1.6 -> satisfiable by symfony/contracts[v1.1.6, v1.1.7, v1.1.8], symfony/translation-contracts[v1.1.6, v1.1.7, v1.1.9].
Can only install one of: symfony/translation-contracts[v1.1.6, v2.0.1].
Can only install one of: symfony/translation-contracts[v1.1.7, v2.0.1].
Can only install one of: symfony/translation-contracts[v1.1.9, v2.0.1].
Installation request for symfony/translation-contracts (locked at v2.0.1) -> satisfiable by symfony/translation-contracts[v2.0.1].
Installation failed, reverting ./composer.json to its original content.
Given below is the content of composer.json file.
"name": "laravel/laravel",
"type": "project",
"version": "v1.2.0",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"ext-json": "*",
"berkayk/onesignal-laravel": "^1.0",
"doctrine/dbal": "~2.3",
"egulias/email-validator": "^2.1",
"fideloper/proxy": "^4.0",
"infyomlabs/coreui-templates": "6.0.x-dev",
"infyomlabs/laravel-generator": "6.0.x-dev",
"intervention/image": "^2.5",
"laminas/laminas-diactoros": "^2.2",
"laravel/framework": "^6.0",
"laravel/passport": "^7.5",
"laravel/socialite": "^4.3",
"laravel/telescope": "^2.1",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^6.0",
"league/flysystem-aws-s3-v3": "^1.0",
"phpseclib/phpseclib": "^2.0",
"pusher/pusher-php-server": "~4.0",
"spatie/laravel-analytics": "^3.9",
"spatie/laravel-permission": "^3.2",
"symfony/translation": "4.3.8",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"barryvdh/laravel-ide-helper": "^2.6",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": ["app/helpers.php"],
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
I have tried for couple of hours to search solution on google and stack overflow but didn't get any success.
Are you sure the given error message is related to phpseclib/phpseclib? That package does not use any Symfony dependencies. And, according to the dependency list of laravel/passport, that library is already installed.
I would assume that you have installed another package in the meantime by adding it to composer.json manually. What happens if you call composer install - does it inform you that the installation is not possible, or that the lock file is out of sync?
You could resolve this by removing symfony/translation from your composer.json, run composer update, and try to reinstall this package afterwards. Because somehow symfony/translation-contracts got installed in v2.0.1 (which is only compatible with Symfony 4.4 or later), while your configuration explicitly tries to load symfony/translation from Symfony 4.3
When i am trying to install this package iatstuti/laravel-cascade-soft-deletes via the command
composer require iatstuti/laravel-cascade-soft-deletes . It is giving me this error
Problem 1
- Installation request for iatstuti/laravel-cascade-soft-deletes ^2.0 -> satisfiable by iatstuti/laravel-cascade-soft-deletes[2.0.0].
- Conclusion: remove laravel/framework v5.8.35
- Conclusion: don't install laravel/framework v5.8.35
- iatstuti/laravel-cascade-soft-deletes 2.0.0 requires illuminate/events ^6.0 -> satisfiable by illuminate/events[v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4].
- don't install illuminate/events v6.0.0|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.1|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.2|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.3|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.4|don't install laravel/framework v5.8.35
- Installation request for laravel/framework (locked at v5.8.35, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.35].
can somebody please help me, what to do now? i am stuck, find solutions on net but nothing is working.
I want this package to use softdelete functionality on parent child concept in laravel.
Here is my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"brian2694/laravel-toastr": "*",
"doctrine/dbal": "*",
"fideloper/proxy": "*",
"guzzlehttp/guzzle": "*",
"laravel/framework": "5.8.*",
"laravel/tinker": "*",
"laravelcollective/html": "*",
"maatwebsite/excel": "*",
"spatie/laravel-permission": "*",
"thestringler-laravel/manipulator": "*",
"barryvdh/laravel-cors": "*"
},
"require-dev": {
"filp/whoops": "*",
"fzaninotto/faker": "*",
"mockery/mockery": "*",
"phpunit/phpunit": "*",
"symfony/css-selector": "*",
"symfony/dom-crawler": "*"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories",
"app/Models"
],
"files": [
"app/Http/Helper/helper.php",
"app/Http/Helper/logActivities.php"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
The latest version of this package (2.0.0) is a Laravel 6 package. Version 1.5.0 seems to be the Laravel 5 package you want. Since you didn't specify a version to install, composer uses the latest version.
Install 1.5.0 via composer using
composer require iatstuti/laravel-cascade-soft-deletes "1.5.0"
When I do composer require laravel/passport, I get
Using version ^5.0 for laravel/passport ./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
- Installation request for laravel/passport ^5.0 -> satisfiable by laravel/passport[v5.0.0].
- Conclusion: remove laravel/framework v5.5.34
- Conclusion: don't install laravel/framework v5.5.34
- laravel/passport v5.0.0 requires illuminate/encryption ~5.6 -> satisfiable by illuminate/encryption[v5.6.0, v5.6.1, v5.6.2, v5.6.3].
- don't install illuminate/encryption v5.6.0|don't install laravel/framework v5.5.34
- don't install illuminate/encryption v5.6.1|don't install laravel/framework v5.5.34
- don't install illuminate/encryption v5.6.2|don't install laravel/framework v5.5.34
- don't install illuminate/encryption v5.6.3|don't install laravel/framework v5.5.34
- Installation request for laravel/framework (locked at v5.5.34, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.34].
Installation failed, reverting ./composer.json to its original
content.
I think this means that my version of illuminate/encryption is not compatible with this version of laravel/passport
Is that correct? What is the best way to resolve this? I can't even figure out how to see what version of illuminate/encryption I have. It doesn't show up in composer show.
Here is my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"tymon/jwt-auth": "dev-develop"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
Passport 5.0 depends on version 5.6 of the Illuminate packages. I can see you have Laravel 5.5 installed, so either upgrade Laravel to 5.6, or use the 4.0 branch of Passport.
The "require" section of composer.json in the Passport repository has it all specified:
"require": {
"php": ">=7.0",
"firebase/php-jwt": "~3.0|~4.0|~5.0",
"guzzlehttp/guzzle": "~6.0",
"illuminate/auth": "~5.6",
"illuminate/console": "~5.6",
"illuminate/container": "~5.6",
"illuminate/contracts": "~5.6",
"illuminate/database": "~5.6",
"illuminate/encryption": "~5.6",
"illuminate/http": "~5.6",
"illuminate/support": "~5.6",
"league/oauth2-server": "^6.0",
"phpseclib/phpseclib": "^2.0",
"symfony/psr-http-message-bridge": "~1.0",
"zendframework/zend-diactoros": "~1.0"
},
The Illuminate version numbers line up with the frameworks, so Laravel 5.6 would use Illuminate 5.6, 5.5 would use Illuminate 5.5, etc.
See: Upgrade Guide - Upgrading To 5.6.0 From 5.5.
I had the same issue I am using Laravel Framework 5.4
It got solved by using lower version of passport
composer require laravel/passport "4.0.3"
I just removed my installed laravel folder in which I installed Dingo and JWT easily. Laravel version was 5.2.x.
Now, whenever I try to reinstall Dingo API it gives me error. Here is the list of commands I used:
Steps to Install
Install Laravel: composer create-project laravel/laravel citycare 5.2.*. (I have also tried with 5.1.*)
Install Dingo: composer require dingo/api:1.0.x#dev.
Here is the error
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./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
- Conclusion: don't install dingo/api 1.0.x-dev
- Conclusion: don't install dingo/api v1.0.0-beta3
- Conclusion: remove laravel/framework v5.2.38
- Installation request for phpdocumentor/reflection-docblock == 3.1.0.0 -> satisfiable by phpdocumentor/reflection-docblock[3.1.0].
- Conclusion: don't install laravel/framework v5.2.38
- dingo/api v1.0.0-beta1 requires illuminate/support 5.1.* -> satisfiable by illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.6, v5.1.8].
- dingo/api v1.0.0-beta2 requires illuminate/support 5.1.* -> satisfiable by illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.6, v5.1.8].
- don't install illuminate/support v5.1.1|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.13|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.16|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.2|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.20|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.22|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.25|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.28|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.30|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.31|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.6|don't install laravel/framework v5.2.38
- don't install illuminate/support v5.1.8|don't install laravel/framework v5.2.38
- Installation request for laravel/framework == 5.2.38.0 -> satisfiable by laravel/framework[v5.2.38].
- Installation request for dingo/api 1.0.x#dev -> satisfiable by dingo/api[1.0.x-dev, v1.0.0-beta1, v1.0.0-beta2, v1.0.0-beta3].
Installation failed, reverting ./composer.json to its original content.
Andrey B, I tried that but that doesn't worked for me. Apparently, I decided to go ahead and try some more things in order to make it work. And here is the solution that I found:
I added "phpdocumentor/reflection": "3.x#dev" under "require": { } in composer.json and ran a composer update.
After this, composer require ran successfully.
I am still unable to find what caused this problem. I guess, last time I installed, the composer.json already had phpdocumentor inside it.
Have a look at my new composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"phpdocumentor/reflection": "3.x#dev",
"dingo/api": "1.0.x#dev",
"zizaco/entrust": "5.2.x-dev"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"laracasts/generators": "^1.1"
},
"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": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
And also note I am using Laravel 5.1.x.
I've just experienced the same issue. Installing via composer require command failed, but editing composer.json file and then running composer update worked just fine.
Solved:
Add "phpdocumentor/reflection": "3.x#dev" under "require": in composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"phpdocumentor/reflection": "3.x#dev"
},
$ composer update
$ composer require dingo/api:1.0.x#dev
after successful command this will add "dingo/api": "1.0.x#dev" under "require":.
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"phpdocumentor/reflection": "3.x#dev",
"dingo/api": "1.0.x#dev"
}
I'm working with laravel 5.4, I faced same issue while I tried to import through terminal using this command.
"composer require dingo/api:1.0.x#dev"..... but after that I just updated my composer.json file and it was like this
"require": {
"php": ">=5.6.4",
"dingo/api": "1.0.*#dev",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"intervention/image": "dev-master"
}
Afterward I run "composer update" command and package imported successfully
helping link: https://github.com/dingo/api/wiki/Installation
You can use this for Dingo Installation
"require": {
"dingo/api": "2.0.0-alpha1"
}
This approach works for me:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"phpdocumentor/reflection": "3.x#dev",
"dingo/api": "1.0.x#dev"
},
composer update
composer require dingo/api:1.0.x#dev