Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

syntax error vendor/spatie/laravel-webhook-client/src/WebhookClientServiceProvider.php:28 #157

Closed
jbov opened this issue Oct 7, 2022 · 0 comments

Comments

@jbov
Copy link

jbov commented Oct 7, 2022

I now receive this error on my local version after composer global update. Nothing changed in my code and everything worked properly before the composer update.

This is line 28:
Route::macro('webhooks', fn (string $url, string $name = 'default') => Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}"));

this is a laravel 6 project.

I get this error in artisan:

Symfony\Component\Debug\Exception\FatalThrowableError : syntax error

at /Users/.../Sites/ws/vendor/spatie/laravel-webhook-client/src/WebhookClientServiceProvider.php:28
24| DIR.'/../database/migrations/create_webhook_calls_table.php.stub' => database_path("migrations/{$timestamp}_create_webhook_calls_table.php"),
25| ], 'migrations');
26| }
27|

28| Route::macro('webhooks', fn (string $url, string $name = 'default') => Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}"));
29|
30| $this->app->singleton(WebhookConfigRepository::class, function () {
31| $configRepository = new WebhookConfigRepository();
32|

Exception trace:

1 Composer\Autoload\includeFile("/Users/..../Sites/ws/vendor/composer/../spatie/laravel-webhook-client/src/WebhookClientServiceProvider.php")
/Users/..../Sites/ws/vendor/composer/ClassLoader.php:322

2 Composer\Autoload\ClassLoader::loadClass("Spatie\WebhookClient\WebhookClientServiceProvider")
[internal]:0

Any clue as to how to fix this issue? Thank you. - Jon

@spatie spatie locked and limited conversation to collaborators Oct 7, 2022
@freekmurze freekmurze converted this issue into discussion #158 Oct 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant