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
[L5.1] config stops config:cache working #466
Comments
This is an issue in a few libraries now (including my own) tymondesigns/jwt-auth#147 |
looks like there is a fix here: efficiently/authority-controller#27 (comment) will try it when i get home and report back |
Yep |
I'll look into simplifying the configuration as much as I can. I'm afraid it may mean configuring it in other places though, which is probably less than ideal. |
i had a look locally, it worked without issue, so i created a pull request |
I've not used the serializer for config caching so can't give you any advice here. I still need to look more into this issue. I guess for now if this isn't work don't cache your config. That or do your API related config in a bootstrapping file as everything can be configured on runtime. Here's how you'd do authentication. app('Dingo\Api\Auth\Auth')->extend('jwt', function ($app) {
return new Dingo\Api\Auth\Provider\JWT($app['Tymon\JWTAuth\JWTAuth']);
}); The wiki covers the others. |
Laravel doesn't use closures in config anymore. you will need to pass a string. Any update on this ? |
Hm, I'll see what changes I can make. I guess most of the more complex keys can be pulled out and simply be set from a provider. |
I've gone ahead and removed the ability to use closures and callables in a config file. Docs have been updated to demonstrate the alternative ways of configuring more complex aspects of the package. |
the api config currently has this:
the closure there will break the
config:cache
from working, is there anyway you can rework the code to avoid the closure being needed, was thinking something like:then the
config:cache
will work and and we can still use the speed boost :DThe text was updated successfully, but these errors were encountered: