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-memcached 3.1.5+2.2.0-4 generates E_NOTICE errors #1498

Closed
1 task done
NFarrington opened this issue Dec 9, 2020 · 2 comments
Closed
1 task done

php-memcached 3.1.5+2.2.0-4 generates E_NOTICE errors #1498

NFarrington opened this issue Dec 9, 2020 · 2 comments

Comments

@NFarrington
Copy link

NFarrington commented Dec 9, 2020

Frequently asked questions

Describe the bug

Note: I'm don't think anything actually needs to be done here, but I'm opening this issue for the discussion (see the additional context at the bottom), and to help anyone else who may be having the same issue and hunting for the cause.

Since the latest php-memcached 3.1.5 release (3.1.5+2.2.0-4), we have started receiving the following E_NOTICE errors: Declaration of MyNamespace\\MyMemcached::addServers(array $servers) should be compatible with Memcached::addServers($servers). From further investigation, this has likely originated from this commit, which added in some PHP 8.0 patches.

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade from php7.4-memcached_3.1.5+2.2.0-1 to php7.4-memcached_3.1.5+2.2.0-4 (install https://packages.sury.org/php/pool/main/p/php-memcached/php7.4-memcached_3.1.5%2B2.2.0-4%2B0~20201208.25%2Bdebian9~1.gbp9ca7c6_amd64.deb).
  2. Load a class that extends \Memcached and implements the addServers method with a signature of addServers(array $servers).

Expected behavior

No E_NOTICE error occurs.

Distribution (please complete the following information):

  • OS: Debian 9
  • Architecture: amd64
  • Repository: packages.sury.org

Package(s) (please complete the following information):

php7.4-memcached:
  Installed: 3.1.5+2.2.0-4+0~20201208.25+debian9~1.gbp9ca7c6
  Candidate: 3.1.5+2.2.0-4+0~20201208.25+debian9~1.gbp9ca7c6
  Version table:
 *** 3.1.5+2.2.0-4+0~20201208.25+debian9~1.gbp9ca7c6 500
        500 https://packages.sury.org/php stretch/main amd64 Packages
        100 /var/lib/dpkg/status

Additional context

There's already a discussion about the actual E_NOTICE error at php-memcached-dev/php-memcached#464. However, I have a couple of questions specific to these packages:

  • To temporarily fix the issue this caused us, we explored installing an older version of the package, but there don't seem to be any available. Are older versions of these packages available somewhere?
  • I don't know a great deal about Linux packaging, but the upstream change (php-memcached-dev/php-memcached@e8f5377) strikes me as something that will be released in a future php-memcached version (not an extension of 3.1.5). Were these patches only supposed to be applied to the PHP 8 packages to get PHP 8 support working?
@oerdnj
Copy link
Owner

oerdnj commented Dec 9, 2020

To temporarily fix the issue this caused us, we explored installing an older version of the package, but there don't seem to be any available. Are older versions of these packages available somewhere?

No, but you can always fix your code. Or compile the older extension yourself.

There's already a discussion about the actual E_NOTICE error at php-memcached-dev/php-memcached#464.

Not so much of a discussion: php-memcached-dev/php-memcached#464 (comment)

I don't know a great deal about Linux packaging, but the upstream change (php-memcached-dev/php-memcached@e8f5377) strikes me as something that will be released in a future php-memcached version (not an extension of 3.1.5). Were these patches only supposed to be applied to the PHP 8 packages to get PHP 8 support working?

No, not really. That would be true only if the patched extension would be incompatible with the old PHP releases.

@oerdnj oerdnj closed this as completed Dec 9, 2020
@NFarrington
Copy link
Author

Thanks for your comments @oerdnj 🙂

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