Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

HHVM compatibility #32

Open
h4cc opened this issue Aug 30, 2014 · 12 comments
Open

HHVM compatibility #32

h4cc opened this issue Aug 30, 2014 · 12 comments
Assignees

Comments

@h4cc
Copy link
Contributor

h4cc commented Aug 30, 2014

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
Copy link
Contributor

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
Copy link
Contributor Author

h4cc commented Sep 8, 2014

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

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

@mevdschee
Copy link
Contributor

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

@mevdschee
Copy link
Contributor

Please send me your feedback..

@mevdschee mevdschee added the bug label Sep 8, 2014
@mevdschee
Copy link
Contributor

check out: v1.2.14

@h4cc
Copy link
Contributor Author

h4cc commented Sep 9, 2014

Okay, some feedback:

  • This bundles needs tests that are run automatically. Travis is a very good choice here.
    • UnitTests can be done with PHPUnit very well, that should be done for all the production relevant things in this bundle.
    • FunctionalTests can also be run on travis, even to multiple ext-memcached and PHP versions. That should also be done more.
  • Please dont recreate a autoloader as did in Tests/bootstrap.php, composer can do this for you.
  • I can test your changes regarding hhvm before you release it, so it might not break somewhones production unnecesarily.

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
Copy link
Contributor Author

h4cc commented Sep 9, 2014

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

@mevdschee mevdschee self-assigned this Jun 29, 2015
@mevdschee mevdschee added enhancement and removed bug labels Jul 3, 2015
@mevdschee
Copy link
Contributor

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

@mevdschee
Copy link
Contributor

Can you take a look as well?

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

@h4cc
Copy link
Contributor Author

h4cc commented Jul 12, 2015

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
Copy link
Contributor

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

@jessegreathouse
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants