Leaseweb / LswMemcacheBundle

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

HHVM compatibility #32

Open h4cc opened 10 years ago

h4cc commented 10 years ago

Hi there,

the current version of this Bundle 1.2.13 is not useable with HHVM in stable version 3.2.0.

The problem is, that the memcached extension is using the version string 2.2.0b1 instead of just 2.2.0. Is there a way to make this work? Maybe we could integrate tests running on travis against hhvm and hhvm-nightly to support them.

Version output:

# hhvm --version
HipHop VM 3.2.0 (rel)
Compiler: tags/HHVM-3.2.0-0-g01228273b8cf709aacbd3df1c51b1e690ecebac8
Repo schema: c52ba40f4a246d35a88f1dfc1daf959851ced8aa
# hhvm memcached_version.php 
string(7) "2.2.0b1"
mevdschee commented 10 years ago

Hi Julius, thank you for this report. I do not have a testing setup at the moment ready to test this combination. Can you do a PR with the change needed to support this version and/or integrate tests? I will merge it.

h4cc commented 10 years ago

@mevdschee Look what i did to your tests and travis :)

https://travis-ci.org/h4cc/LswMemcacheBundle

mevdschee commented 10 years ago

Hey that looks very good.. look what I did to the master branch!

mevdschee commented 10 years ago

Please send me your feedback..

mevdschee commented 10 years ago

check out: v1.2.14

h4cc commented 10 years ago

Okay, some feedback:

As far as i can see, the folder Cache/ contains code that might be suited in a own library. But thats another idea.

I am going to rebase to your changes and work out some more tests. Then we can have a look, how to get ext-memcached v2.2.0 or hhvm 3.2.0 to run.

h4cc commented 10 years ago

Thanks for the merge. Travis needs to be connected to the repo to work.

mevdschee commented 9 years ago

I connected Travis and see that HHVM is not working yet. I'll try to make it work

mevdschee commented 9 years ago

Can you take a look as well?

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

h4cc commented 9 years ago

The missing Class \MemcachePool seems to be a implementation detail of PHP. Its not document, but it exists as a base class. HHVM did not implement that base class and going directly with \Memcache.

mevdschee commented 9 years ago

Is there a workaround somehow? I tried to define the MemcachePool class in hhvm, but I failed.

jessegreathouse commented 9 years ago

It seems like there needs to be an adapter layer for compatibility with different architectures (hhvm vs php) which is unfortunate. Not sure how realistic it is to expect something like that. I like using this bundle, but I must make a decision to use something else if I use HHVM for the project.