Skip to content
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

PHP5.3 Parse error: syntax error, unexpected '[', expecting ')' in ./class.phpmaileroauthgoogle.php on line 54 #664

Closed
ildar-aim opened this issue Mar 23, 2016 · 8 comments

Comments

@ildar-aim
Copy link

I suppose the files should be compatible with PHP5.3

aim-server[~/tmp/PHPMailer]$  /opt/phpfarm/inst/php-5.3.29/bin/php -l class.phpmaileroauthgoogle.php
PHP Parse error:  syntax error, unexpected '[', expecting ')' in class.phpmaileroauthgoogle.php on line 54

Parse error: syntax error, unexpected '[', expecting ')' in class.phpmaileroauthgoogle.php on line 54

Errors parsing class.phpmaileroauthgoogle.php
aim-server[~/tmp/PHPMailer]$  /opt/phpfarm/inst/php-5.3.29/bin/php -l get_oauth_token.php           
PHP Parse error:  syntax error, unexpected T_USE, expecting T_FUNCTION in get_oauth_token.php on line 37

Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in get_oauth_token.php on line 37

Errors parsing get_oauth_token.php
aim-server[~/tmp/PHPMailer]$ /opt/phpfarm/inst/php-5.3.29/bin/php -v
PHP 5.3.29 (cli) (built: Oct  8 2014 11:38:06) (DEBUG)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
aim-server[~/tmp/PHPMailer]$ 
@SDKiller
Copy link
Contributor

@SDKiller
Copy link
Contributor

@ildar-aim
Copy link
Author

According to https://github.com/PHPMailer/PHPMailer/blob/master/README.md
Class Features: Compatible with PHP 5.0 and later

@SDKiller
Copy link
Contributor

https://github.com/PHPMailer/PHPMailer/blob/master/README.md#installation--loading

If you want to use Google's XOAUTH2 authentication mechanism, you need to be running at least PHP 5.4, and load the dependencies listed in composer.json.

@ildar-aim
Copy link
Author

Thank you for your clarification

@Synchro
Copy link
Member

Synchro commented Mar 23, 2016

Thanks @SDKiller

@SDKiller
Copy link
Contributor

Seems they released stable already with 5.5 requirements - change was introduced in thephpleague/oauth2-client@e84bf29

Makes sense to rename 5.4 branch to 5.5 branch ;)

@Synchro
Copy link
Member

Synchro commented Mar 23, 2016

At the slow rate of progress on the xoauth branch (help wanted!), it will probably be up to 5.6 by the time it's released! :)

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

No branches or pull requests

3 participants