You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two or more routes use the same configuration name then route caching fails. According to this section of the README, multiple routes should be acceptable for a single webhook configuration. Looking in Spatie\WebhookClient\WebhookClientServiceProvider, it appears that the route macro simply appends the configuration name to magic string. This leads to non-unique names for routes which are a problem when routes are serialized during caching.
Steps To Reproduce
Add Route::webhooks('receiving-url-for-app-1', 'default', 'get') to your routes file
Add Route::webhooks('receiving-url-for-app-1', 'default', 'post') to your routes file
Run php artisan route:cache or php artisan optimize to cache the routes.
See that a LogicException is thrown when serialization is attempted.
Screenshots
The text was updated successfully, but these errors were encountered:
Description
If two or more routes use the same configuration name then route caching fails. According to this section of the README, multiple routes should be acceptable for a single webhook configuration. Looking in
Spatie\WebhookClient\WebhookClientServiceProvider
, it appears that the route macro simply appends the configuration name to magic string. This leads to non-unique names for routes which are a problem when routes are serialized during caching.Steps To Reproduce
Route::webhooks('receiving-url-for-app-1', 'default', 'get')
to your routes fileRoute::webhooks('receiving-url-for-app-1', 'default', 'post')
to your routes filephp artisan route:cache
orphp artisan optimize
to cache the routes.LogicException
is thrown when serialization is attempted.Screenshots
The text was updated successfully, but these errors were encountered: