-
Notifications
You must be signed in to change notification settings - Fork 117
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 trying to mock Memcache on PHP 7.1 #259
Comments
Adding: protected function getParameterName(ReflectionParameter $param) {
$name = $param->getName();
if (!empty($name)) return $name;
return "param".$param->getPosition();
} to MockClass.php and then calling it from the two places that use the parameter name seems to resolve my issues. Just figuring out how to put together tests etc so I can submit a sensible PR. |
Checking out v2.3.2 and running phpunit gets to a memcache test and then crashes:
... so there's a reasonable chance this is something fairly unique in my environment. |
@mlively Could I get any feedback on whether there's something I can improve in the PR to progress this faster? |
Just running:
With Memcache installed results in:
Here's the class definition that's trying to eval:
classDef.php.txt
The problem seems to be that it's failing to extract the parameter names for the get method and so the signature is not valid php:
This works fine under PHP 5.4 & 5.6, it's only failing for me under PHP 7.1 - using Phake v2.3.2 across all 3.
The text was updated successfully, but these errors were encountered: