Yesterday, using 5.3. Version of the Laravel framework to develop the company's new project, found that the cache and session set up for Redis, performed a first visit.
Laravel Version number
Simply configure the controller routing,
Route::get (' Home ', ' [email protected] ');
Route::get ('/', ' [email protected] ');
How to configure the controller will not elaborate.
Say the point of the problem (knock on the blackboard!!!!! ):
Access Error!!!
I can't find a class: Can't find class ' predis\client ' not found
Check the source code, found that a vendor/directory less a package Predis,
execute: Composer require Predis/predis install this package just fine .
Note: Version <5.3 can successfully resolve the issue. >5.3, Failure!
The console error message is as follows:
Updating dependencies (including Require-dev)
Failed to decode Response:zlib_decode (): Data error
Retrying with degraded mode, check Https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
Your requirements could not being resolved to an installable set of packages.
Problem 1
-The requested package Laravel/passport (locked at v1.0.0, required as 1.0.8) are satisfiable by laravel/passport[v1.0.0] But these conf
Lict with your requirements or minimum-stability.
Problem 2
-Installation request for Laravel/passport 1.0.8, satisfiable by laravel/passport[v1.0.8].
-Laravel/passport v1.0.8 requires Symfony/psr-http-message-bridge ^0.3.0-satisfiable by symfony/ psr-http-message-bridge[v0.3] but th
ESE conflict with your requirements or minimum-stability.
Installation failed, reverting/composer.json to its original content.
"updated dependencies (including need for development)"
Unable to decode response: Zlib_decode (): Data error
Retry with degraded mode, check https://Getcomposer. ORG/File/item/troubleshooting. MD #降级模式的更多信息
Your request cannot be resolved, the installation of the package is set.
Question 1
-Requested package Laravel/passport (locked in V1.0.0, required via Laravel 1.0.8)/Passport [V1.0.0] but these configurations can meet
Conflict with your requirements or minimum stability.
Question 2
Installation Requirements Laravel/Passport 1.0.8-Meet by Laravel/Passport [┊].
-Laravel/Passport/PSR Symfony┊ requires HTTP message bridge ^ 0.3.0┊-> satisfies by SYMFONY/PSR HTTP message bridge [V0.3] but
These conflicts are related to your requirements or minimum stability.
The installation failed to revert to the original content. /Composer.json. 】
WORKAROUND: [] in brackets is optional
Modify Project Conposer.json file + Delete Conposer.lock +[execute composer ClearCache] + [execute composer UPDATE] + execution: Composer require Predis/predis
This error, I debug for a long time, the internet did not find a solution, so spend a lot of time to solve, specific what reason, I can not talk nonsense.
Summarize the cause of the error:
- Use Redis to get an error, and if you don't use a system-provided Redis method in your project, you won't encounter it.
- Version issue, as long as the Laravel 5.3.* has this problem, because the previous version can be directly executed composer require Predis/predis resolution.
- Predis official website maintenance did not update the new Laravel request package Laravel/passport (locked in V1.0.0, need to Laravel 1.0.8)/passport [V1.0.0]
- Still think, I hope you know the supplement,,,,,
Let's do it first, hoping to help the same kind of problem.
Original blog, reproduced please specify the source!!! Thank you
====ming
About Laravel 5.3 Using the Redis cache there is no problem finding the class ' predis\client ' not found