Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

PHP 7 compatibility #53

Open mevdschee opened 9 years ago

mevdschee commented 9 years ago

Does anyone understand why memcache.so is not available for PHP 7 on Travis?

https://travis-ci.org/LeaseWeb/LswMemcacheBundle/builds/69521319

Thanks!

hanikesn commented 9 years ago

Apparently the memcache extension has not been ported to PHP 7, yet. I'm currently trying to get our code base to run with PHP 7 and this whole memcache/memcahed mess is quite hard to handle.

jimaek commented 8 years ago

@mevdschee It doesnt look like the memcache extension is going to be updated. Someone made a fork with PHP7 support https://github.com/websupport-sk/pecl-memcache (didnt test it)

But most switched to memcached that supports PHP7 as far as I know. Any plans to switch to the other better supported extension?

mevdschee commented 8 years ago

Version 2 is already switched to memcached. (edit: I'm wrong, it is switched from memcached to memcache)

jimaek commented 8 years ago

From the readme: "NB: This bundle no longer uses the PHP "memcached" extension that uses "libmemcached", see "Considerations". "

Version 2 switched away from the PHP7 supported extension to the currently broken one.

mevdschee commented 8 years ago

Ah.. sorry, even I was confused (one letter, but such a big difference). PSR compliant PHP projects can better avoid memcached, due to the problems that project has with inheritance of it's base class. See: #21

Let's hope that @szabolcsbalogh succeeds :+1:

hanikesn commented 8 years ago

@jimaek I'm kinda mainting a memcached compatible version: https://github.com/hanikesn/memcached-bundle/commits/memcached-compat The problem is that for newer memcached versions, it's not extending \Memcached anymore. There are workaround for DoctrineCache in there, but if you have custom code you need to change that to use \MemcachedInterface.

mevdschee commented 8 years ago

Good work @hanikesn !

jimaek commented 8 years ago

@mevdschee Ok, so I guess this module wont get PHP7 support until that extension gets updated? I dont think this will happen any time soon if at all. Maybe you could link people to the fork https://github.com/websupport-sk/pecl-memcache to at least have the option to compile it themselves if they want to

mevdschee commented 8 years ago

I added a link to the readme. Let's hope he does a PR and it gets merged.