Skip to content

feat: register webhooks route macro in ServiceProvider::register()#237

Merged
freekmurze merged 1 commit into
spatie:mainfrom
misaf:patch-1
Jun 27, 2025
Merged

feat: register webhooks route macro in ServiceProvider::register()#237
freekmurze merged 1 commit into
spatie:mainfrom
misaf:patch-1

Conversation

@misaf
Copy link
Copy Markdown
Contributor

@misaf misaf commented Jun 27, 2025

Problem

When Route::macro('webhooks', …) was declared in boot(), any other package that loads its routes in its own boot() could execute before WebhookClientServiceProvider finished booting.

In that situation a route file such as

// routes/api.php inside OtherPackage
Route::webhooks('stripe');

blew up with “Call to undefined method Illuminate\Routing\Router::webhooks”.

@freekmurze freekmurze merged commit a685388 into spatie:main Jun 27, 2025
4 of 8 checks passed
@freekmurze
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants