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

Syntax Error with php 5.4 #41

Closed
floplus opened this issue Oct 19, 2016 · 6 comments
Closed

Syntax Error with php 5.4 #41

floplus opened this issue Oct 19, 2016 · 6 comments

Comments

@floplus
Copy link

floplus commented Oct 19, 2016

Hi,

despite of saying that it requires PHP 5.3 it does not work with PHP 5.4, PHP 5.5 is okay.
Perhaps this should be updated in the Readme and on the website. Or is there a version that does still work with PHP 5.4/5.3?

$ php -v
PHP 5.4.36 (cli) (built: Dec 20 2014 14:09:43)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
$ php cachetool.phar opcache:status
PHP Parse error:  syntax error, unexpected '{' in phar:///var/www/cachetool.phar/vendor/symfony/dependency-injection/Container.php on line 280
@szepeviktor
Copy link
Contributor

@szepeviktor
Copy link
Contributor

finally may be not part of your PHP version:
https://github.com/symfony/dependency-injection/blob/4b9645f5870e0b4ab35cc5b528422049946e8bec/Container.php#L280

symfony/dependency-injection is also for >=5.5.9

@szepeviktor
Copy link
Contributor

You may try issuing composer install, hacking a bit with the code and rebuilding the phar.

@rndmh3ro
Copy link

I've got the same problem using php:

PHP 7.0.14 (cli) (built: Dec 22 2016 14:17:52) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

and downloading the cachetool-binary from github like mentioned in the docs.

[root@server]# /usr/local/bin/cachetool opcache:reset
PHP Parse error:  syntax error, unexpected '{' in phar:///usr/local/bin/cachetool/vendor/symfony/dependency-injection/Container.php on line 280

@mablae
Copy link

mablae commented Feb 22, 2017

@rndmh3ro Looks like an unrelated issue. I would open a new issue for that.

@gordalina
Copy link
Owner

To use with php5.4 you need to use cachetool 1.x

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

5 participants