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

Error on HHVM due "configuration" global variable #2109

Closed
aik099 opened this issue Mar 9, 2016 · 4 comments
Closed

Error on HHVM due "configuration" global variable #2109

aik099 opened this issue Mar 9, 2016 · 4 comments
Labels
type/bug Something is broken

Comments

@aik099
Copy link

aik099 commented Mar 9, 2016

PHPUnit creates configuration global variable, which is object of DOMDocument class. When running tests on HHVM and globals are backed up in the process this ends up in following error:

Attempted to serialize unserializable builtin class DOMDocument

See https://travis-ci.org/minkphp/phpunit-mink/jobs/114842726

Proposing to exclude global variable configuration, that PHPUnit creates for internal needs from serialization done in Snapshot class.

Not sure if it matters, but tests, that trigger such behavior are also marked with @runInSeparateProcess annotation.

@sebastianbergmann
Copy link
Owner

The only place I can find where PHPUnit creates a global variable named $configuration is in the template that is used for executing a test in a separate process. That variable is now unset after it has been used, see a093bd8.

Are the tests you mention executed in process isolation? If so, does a093bd8 solve the issue for you?

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Mar 10, 2016
@aik099
Copy link
Author

aik099 commented Mar 10, 2016

Are the tests you mention executed in process isolation?

Exactly. I'm using @runInSeparateProcess annotation.

If so, does a093bd8 solve the issue for you?

Yes, it does. Thank you. Can you please backport this to PHPUnit 4.x release as well, because on Travis CI for HHVM the PHPUnit 4.x version only is installed.

@sebastianbergmann
Copy link
Owner

This will be in the next PHPUnit 4.8 release, yes.

@sebastianbergmann
Copy link
Owner

a093bd8 is in PHPUnit 4.8.24, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants
@sebastianbergmann @aik099 and others