-
Notifications
You must be signed in to change notification settings - Fork 129
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
Serialization error #1
Comments
Attaching your pic for not to lose it. |
Just remembered. I met this issue before and fixed it in Codeception. <?php
if (!$value instanceof Closure) {
$backup[$name] = serialize($value);
}
?> It's I assume that if value is an object itself, or array with closure, this check passes, yet serialization fails. |
So you can fix it by disabling backup globals.
I'm not sure this parameter was really valuable and which of vendor classes store closures in static properties. |
Yeah, I tried that at one point. But now I get: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /Users/Jeffrey/Desktop/aspect/vendor/lisachenko/go-aop-php/src/Go/Aop/Framework/ClosureStaticMethodInvocation.php on line 79 |
@JeffreyWay AspectMock mocks itself ) so there is a recursion. @DavertMik this is related to the |
My bootstrap is using
|
excludePaths did the trick for me! Thanks. :) |
@lisachenko |
@DavertMik it's ok to have files in the cache. |
I'm trying to test this out, but get "Exception: Serialization of 'Closure' is not allowed" every time I run phpunit. PHPUnit has issues with serializing closures, but I'm not sure why that would affect my machine and not yours.
Here is my source code. I'm not even using any of the functionality yet. Just trying to get the tests to run. See anything glaringly wrong?
https://github.com/JeffreyWay/Temporary-Bug
I'm using PHPUnit 3.7.19 and PHP 5.4.1.
The text was updated successfully, but these errors were encountered: