Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

Entrust::hasRole('admin') causes call_user_func_array() error #456

Open KajuziKay opened 8 years ago

KajuziKay commented 8 years ago

I've been using Entrust 1.5 on Laravel 5.1 and was working well. After installing a package and running composer update, every time I try to use Entrust::hasRole('admin') I get :

call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Cache\FileStore' does not have a method 'tags'

I've attached my composer.json in case you want to try and replicate the issue. call_user_func_array

composer.json.txt

undermink commented 8 years ago

yeah same here so i'll use 1.4 now

KajuziKay commented 8 years ago

You mean Entrust 1.4 works with Laravel 5.1 and 5.2?

undermink commented 8 years ago

Yes indeed. I faced this issue after a composer update which updated entrust from 1.4 to 1.5. After editing my composer.json (changing the version to 1.4 there) and updating again this error was gone again. I am using laravel 5.1. But I just remembered that I had this kind of issue before and I think changing "CACHE_DRIVER=file" to "CACHE_DRIVER=array" fixed it for using version 1.5 :) Like in issue #422

KajuziKay commented 8 years ago

Thanks @undermink I changed cache driver to array and I'm back in business! I don't know why I never found #422 when I was searching for the solution to this