-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Fixing config syntax #207
Fixing config syntax #207
Conversation
Current syntax isn't compatible with Laravel config functions.
I would say yes and no to this change for the following reasons:
You can ofcourse still override it from your own But if we go through with this change I have 2 requests (still like the config to be ease to use too):
Happy to add the above if you don't have the time just let me know. |
@stayallive I'd be interested in having you do the tests. I'm not super familiar with writing tests and would appreciate seeing them written by someone that knows what they are doing. I wasn't sure how to make it backwards compatible other than checking two different keys (old key with dot syntax and new key with array). |
So I won't claim I'm an expert on Laravel package testing but I think I came up with a good way to test this. Let me know what you think. The funny thing is because it's not a runtime configuration property it made it a bit harder to test directly and had to add some scaffolding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This wasn't following Laravel syntax making it impossible to overload.
This is the normal way to overload a config param in Laravel
this uses dot syntax.
The problem is that the config/sentry.php file uses
breadcrumbs.sql_bindings
which won't be overwrite-able with Laravel.will generate
The config param wasn't overwritten because
config()
can't accept a config param with a.
in the name, it will map that to a multi-dimensional array.