New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception due to closure in config when using artisan config:cache #147
Comments
If you are not customizing the providers then you can simply pass a class path as a string and laravel's iOC will build the instance |
Going to look at adding closure serialization via |
Switching to using string namespace paths for now. I think this may be resolved on the Laravel side. |
I'm having this error. Ways to fix ? |
@hilnius you just need to replace your config/jwt.php with what is in the develop branch here https://github.com/tymondesigns/jwt-auth/blob/develop/config/config.php#L113-L148 and that fixes the issue. Edit: you'll need to export the jwt config first if you habvn't done it yet using |
Graham mentioned that they will not fix it |
@mofodojodino 's answer actually fixed it. |
When caching the laravel config via artisan cache:config command I am getting errors due to laravel not supporting closures in the config cache.
config/jwt.php is the standard one in the documentation and fails on the lines https://github.com/tymondesigns/jwt-auth/blob/laravel-5/src/config/config.php#L149-L151 and https://github.com/tymondesigns/jwt-auth/blob/laravel-5/src/config/config.php#L162-L164
Using Laravel 5.1 - not sure if the same issue exists in Laravel 5.0.
It seems that this is an issue with other projects that use this technique for the config - efficiently/authority-controller#27
Is there an updated config that you suggest which doesn't use closures in the config?
Thanks
The text was updated successfully, but these errors were encountered: