-
Notifications
You must be signed in to change notification settings - Fork 40
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 '?', expecting variable (T_VARIABLE) #53
Comments
I am also seeing this on a codebase which has been using this library for a while. Just introduced. |
I think related to this commit... b6fed0c |
Thanks, @richmartell for your response, please let me know if you get any solution on this in future |
@richmartell you are right its came with this line,
new released has been deployed 8 days ago, since the error came., i remove latest version and using "langleyfoxall/xero-laravel": "v3.1.1", its working fine till now, i am still doing other setup, lets see how its goes |
#54 |
Same issue here! |
the same issue here :( with last version :( |
For php 7.4 remove "string?" from line 133 on OAuth2.php in refreshAccessToken() method, that should fix this error. Go to src>OAuth2.php and remove "string?" from refreshAccessToken() |
This is also an issue for PHP8 in 3.1.2 |
Also getting this, that fix (#58) seems to have solved it, and has been merged into master. Can a new release be created to deploy this fix? |
go to : vendor\langleyfoxall\xero-laravel\src\OAuth2.php
|
I have experienced this issue and it looks like this is a basic syntax error. This is not valid PHP as the ? is on the wrong side of the string declaration:
I'm assuming whoever wrote this is trying to indicate that $grantType is nullable. This should be represented as follows:
Applying this change locally has resolved the error for me and retains the nullable state of $grantType. |
Hello. Just noticed this myself. It looks like @shirish71 had already done a great job of fixing this, but it was never included in a release! v3.1.3 should fix this, please let us know if it does not! |
while I am want to call the function below, getting the error
syntax error, unexpected '?', expecting variable (T_VARIABLE)
, using PHP version PHP 7.4.27public function redirectUserToXero() { return $this->getOAuth2()->getAuthorizationRedirect(); }
The text was updated successfully, but these errors were encountered: