-
-
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
Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' #254
Comments
I have had a similar problem within the context of magento, did you find a fix for this? |
Yes disable the process isolation with --process-isolation=false if you are running in the command line or in your phpunit.xml: <phpunit processIsolation="false" .................. There is one drawback though if you disable process isolation you won't get a full report if there is a fatal error. hope it helps |
+1 is there any progress on this? |
I just hit this issue. +1 |
Got the same issue. +1 |
There is nothing we can do about this. Objects that cannot be serialized cannot be serialized. Serialization is required for the backup and restoration of global variables (which can be turned off) as well as for process isolation. Both features should not be needed for testing clean code. |
Since I migrated from php5.3. I have this issue really often when running unit tests.
RuntimeException: Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in - on line 32
Exception: Serialization of 'SimpleXMLElement' is not allowed in - on line 32
Call Stack:
0.0038 410996 1. {main}() -:0
0.0604 3407540 2. __phpunit_run_isolated_test() -:195
0.0721 3698952 3. serialize() -:32
The actual faulty code in this error is:
echo $someArray['KEY_THAT_DONT_EXIST'];
Wich is in fact a real bug in the Application.
Since i'm not dealing with any SimpleXmlElement in the testes class it makes it really hard to find the real issue since I receive this generic error message a lot. I didn't had the issue on php 5.2.17 now i'm on php 5.3.5.
I tested with both OSX and Unbuntu and still get the same result on both OS.
Thanks for your help.
The text was updated successfully, but these errors were encountered: