-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
HHVM: Class already declared: PHPUnit_Framework_Error #1684
Comments
Having the same trouble with HHVM 3.6.1 and PHPUnit 4.6.1-4.6.4. PHPUnit 4.5.1 works for me as a work around. https://phar.phpunit.de/phpunit-4.5.1.phar I do wonder if master/nightly HHVM works with PHPUnit 4.6.4 but haven't tried it. |
Got the same error while running HHVM build in JoliCI (PHPUnit 4.6.4):
|
Same issue here.
|
Same issue here, too.
|
Get the same error with HHVM 3.6.1 on Travis CI
|
The PHAR works fine with PHP. If it does not work with HHVM then that would be an HHVM issue and not a PHPUnit issue. |
@sebastianbergmann It works well for me with HHVM on Travis CI yesterday. I don't know if it caused by the changes of my project or others. |
+label: 2015-04 build update issue? |
This was working yesterday, seems to be related to the last Travis CI rollout. |
I've implemented this workaround from @colinodell, and it just uses composer if its HHVM. I think HHVM need to fix this, or Travis, but whatever, this got me green again. |
It looks like this is triggered by:
|
Thanks for looking into this, @fredemmott.
|
@sebastianbergmann the requirement added in #125 seems to rely on the include path being set. What about using absolute paths instead ( |
@stof Good point. Can you send a pull request? |
hmm, actually, it has already been changed in a3dcfcb |
OK, the issue is that HHVM does not resolve paths properly inside phars, so the require_once are considering that they are 2 files: facebook/hhvm#5215. Maybe uding |
…them in phars This avoids loading the file twice on HHVM because it considers the 2 paths to be different even though they reference the same file when normalized. Refs sebastianbergmann#1684
OK, here is a PR |
I just added new php file to my project (~20min ago) (joni2back/php-classic@bd09ad2) after a long time.
|
@joni2back The fix will be in PHPUnit 4.6.6. |
@sebastianbergmann : yep - the pile of requires /should/ be a perfectly fine approach, and that not working is an HHVM bug. It looks like we include phar:// like any other stream, path normalization on streams is generally not a good idea, but we might need to special-case this :( |
I'm trying to get started with testing with HipHopVM, however I have trouble even get it to run:
All the available phpunit versions throw the same error:
Any idea what's wrong?
The text was updated successfully, but these errors were encountered: