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

Strict standards: Declaration of Double\... should be compatible with ... #310

Open
DavidGarciaCat opened this issue Jan 4, 2017 · 5 comments

Comments

@DavidGarciaCat
Copy link

DavidGarciaCat commented Jan 4, 2017

Based on my previous issue, reported here phpspec/phpspec#1053, looks like the Memcached mock for getByKey (and other methods) does not match the signature of the parent class.

PHP Strict standards:  Declaration of Double\Memcached\P8::getByKey() should be compatible with Memcached::getByKey($server_key, $key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) in .../vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(49) : eval()'d code on line 2

My local environment is built with these specs:

  • macOS Sierra
  • PHP 5.5 (and extensions) via Homebrew

PHP version:

$ php -v
PHP 5.5.38 (cli) (built: Oct  1 2016 23:03:00)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
    with blackfire v1.14.1~mac-x64-non_zts55, https://blackfire.io, by Blackfireio Inc.

Installed PHP Spec version:

$ composer show phpspec/phpspec*
phpspec/phpspec 2.4.1 Specification-oriented BDD framework for PHP 5.3+

Installed Prophecy version:

$ composer show *prophecy*
phpspec/prophecy v1.4.1 Highly opinionated mocking framework for PHP 5.3+

Memcached version

$ memcached -V
memcached 1.4.33

Hope it helps to find the problem!

Regards,

@stof
Copy link
Member

stof commented Jan 4, 2017

OK, please first updated Prophecy to 1.6.2. The 1.4.1 version is really old, and I won't provide debugging for it (we already fixed many things since then)

@stof
Copy link
Member

stof commented Jan 4, 2017

please give the version of the PHP memcached extension, not of the memcached server (we don't care about it here as it does not provide PHP code). You can have this version in phpinfo(), and also in composer show -p if the extension exposes it properly

@DavidGarciaCat
Copy link
Author

DavidGarciaCat commented Jan 4, 2017

Hello @stof

I updated prophecy, as requested. However the error is still there.

$ composer update phpspec/prophecy

$ composer show *prophecy*
phpspec/prophecy v1.6.2 Highly opinionated mocking framework for PHP 5.3+

About the PHP Memcached version, these are the details (this is the latest version I can install via Homebrew - I checked yesterday if there were packages to upgrade):

$ composer show -p | grep memcached
ext-memcached       2.2.0     The memcached PHP extension

screen shot 2017-01-04 at 10 40 22

Hope this helps,

@jakzal
Copy link
Member

jakzal commented Jan 21, 2017

This is probably caused by php-memcached-dev/php-memcached#126 and https://bugs.php.net/bug.php?id=66331

@DavidGarciaCat
Copy link
Author

Thanks for those links @jakzal

This should confirm the outputs that I am getting, indeed. Also, after a quick read, looks like there are no upcoming plans to fix it from Memcached side due those outputs are not breaking the system. That's sad...

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