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

PHP 5.4 array syntax #900

Closed
augsteyer opened this issue Dec 7, 2017 · 3 comments
Closed

PHP 5.4 array syntax #900

augsteyer opened this issue Dec 7, 2017 · 3 comments

Comments

@augsteyer
Copy link
Contributor

augsteyer commented Dec 7, 2017

Was running the code on PHP5.3 and got an error in my logs:

[Thu Dec 07 05:19:10 2017] [error] [client 127.0.0.1] FastCGI: server "/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Parse error:  syntax error, unexpected '[' in /var/www/mage1810/lib/Module/cloud-integration-magento-oauth2/vendor/bshaffer/oauth2-server-php/src/OAuth2/Server.php on line 91

These are the php5.4 syntax culprits:

/**
     * @var array
     */
    protected $grantTypes = [];

    /**
     * @var array
     */
    protected $responseTypes = [];

Based on the required composer version of php 5.3.9, I am assuming this is a bug.

@svycka
Copy link
Contributor

svycka commented Dec 7, 2017

hmm seems like @bshaffer forgot to remove php 5.3 support in #869 not sure what to do now. removing support now will leave old users with a broken latest version that supports php 5.3.

but @augsteyer maybe time to update your php version? php5.3 is almost 4 years is not supported

@augsteyer
Copy link
Contributor Author

I believe this is the only thing that keeps this from being 5.3 compatible. Easier to switch these two to = array(); and retain 5.3.9 support, no?
Also, when working with 100k+ merchant systems, it's not that easy to tell everyone to upgrade their php. Merchant's are risk aversive bunch and would rather avoid our plugin than upgrade their system.

@bshaffer
Copy link
Owner

bshaffer commented Dec 9, 2017

This has been merged into master. Thanks for the fix!

@bshaffer bshaffer closed this as completed Dec 9, 2017
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