-
-
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
syntax error, unexpected '$url' (T_VARIABLE), expecting ')' #39
Comments
Make sure to have PHP 7.4 installed. |
Same issue here using PHP 7.4.1. I don't get why @freekmurze closed it this fast. |
@DLO33 @Globulard I had this issue, too, but when I doublechecked I didn't really have PHP 7.4, check in the context tab by the stack trace, just in case you have multiple php versions |
same issue with 7.4.4. |
If anyone is using Docker, you will need to maker sure that the PHP version in your container is also set to PHP 7.4. The error syntax error you are receiving is actually coming from the container's PHP version and not your local PHP version. If using laradock, this is pretty easy to resolve. First edit your laradock Then run Once that's done, run I hope this helps! |
@mvrska appreciate the reply, finally got around to having a look at this and you were correct. Context was showing an older version of php. Updated Ngix and everything seems to be good now :) |
And this error is showing. |
This is the code |
the issue for me was that I had changed the php version but I had not restarted apache. Thank you for the hint! |
Hello, I've got syntax error after fresh install on laravel app for woocommerce webhook handle. Here is what I get:
And the line is:
Route::macro('webhooks', fn(string $url, string $name = 'default') => Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}"));
The text was updated successfully, but these errors were encountered: