-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add config option to enable/disable unique token #212
Conversation
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.
Once the dot prefix is added to the token string then I think this should be gtg.
/* | ||
* Should a unique token be added to the route name | ||
*/ | ||
'add_unique_token_to_route_name' => false, |
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.
@it-can Just personal preference but I would probably simplify this to 'tokenize_route_name'
.
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.
i think @freekmurze should decide on this one
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.
Although tokenize_route_name
would be good I thinkadd_unique_token_to_route_name
is more clear / human.
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.
Can we default the new config variable to true?
|
||
$configName = Str::before($routeNameSuffix, '.'); | ||
if (config('webhook-client.add_unique_token_to_route_name', false)) { |
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.
@it-can I think this should probably default to true since the shared route names already break route caching and there is a documented feature that causes that scenario. I can definitely see the benefit of calling the routes by name but route naming is more of an underlying structure of the package and not a documented feature.
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.
@freekmurze can decide on this one too...
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.
I think it should be set to false
for now, so we don't break stuff for existing users.
For a next major version, I'll consider setting it to true
by default.
Thanks! |
Fix for #210