-
Notifications
You must be signed in to change notification settings - Fork 1k
syntax error, unexpected token ")" #469
Comments
Have you configured composer to resolve dependencies for PHP 8.0 ? If no, I'm almost sure that Composer installed symfony/http-client 6.1, which requires PHP 8.1 (and uses the first-class callable syntax) |
Oh, i didnt know that, and how should i do that please @stof |
Thanks alot, and what version of http-client should i install please? @stof |
Composer will select the version compatible with the target PHP version (that's why it is important to tell it about the target if the runtime you use is not the target version). |
so i should dump autoload after i add the platform under the config ? |
you need to run |
@stof @BenOussama180 i run the composer update but same issue i m using php 8.0 |
i used spatie crawler which uses goute under the hood and i got no problem with it, i advice u to use it |
This is the Error i get while creating a new instance of the Client :
It works locally, but not in production.
i use php 8.1 locally & 8.0.19 in prod so it should not be a syntax probleme.
when i checked prod's laravel logs it says this :
[2022-06-22 14:22:19] local.ERROR: syntax error, unexpected token ")" {"userId":2,"exception":"[object] (ParseError(code: 0): syntax error, unexpected token ")" at /home/749128.cloudwaysapps.com/maxxhthfnk/public_html/vendor/symfony/http-client/CurlHttpClient.php:68)
The text was updated successfully, but these errors were encountered: