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

Memcache : syntax error, unexpected '$', expecting variable (T_VARIABLE) #814

Open
Bacteries opened this issue Oct 31, 2018 · 1 comment

Comments

@Bacteries
Copy link

Hi,
I migrated my codebase from php 5.6 to php 7.0 and I encounter an issue with my atoum test for one of my test.
This one depends on memcache. I try to reproduce the error on the helloWorld example by just adding this to it :

$memcache = new \mock\Memcache();

And it crash with this message :

There is 1 error:
=> vendor\project\tests\units\helloWorld::testSay():
==> Error PARSE ERROR in /srv/atoumtest/path/to/project/tests/units/helloWorld.php on unknown line, generated by file phar:///srv/atoumtest/path/to/atoum.phar/1/classes/mock/generator.php(205) : eval()'d code on line 247:
syntax error, unexpected '$', expecting variable (T_VARIABLE)

There is 1 uncompleted method:
=> vendor\project\tests\units\helloWorld::testSay() with exit code 255:

A php -v give me this :

PHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies

And a php path/to/atoum.phar -s

Signature: C23469D0EA872FCF93346CBBB071713C64F897AE

A php -m give me this (memcache is installed) :

[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
libxml
mbstring
mcrypt
memcache
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Am I the only one to see this error with memcache and php7 ?
Thanks

@Grummfy
Copy link
Member

Grummfy commented Oct 31, 2018

Hello,
thanks for the report. Just to be sure, can you tell use the version of atoum you use?
php path/to/atoum.phar -v

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

2 participants