Edit report at https://bugs.php.net/bug.php?id=62189&edit=1
ID: 62189
Comment by: Sjon at hortensius dot net
Reported by: mg at ovos dot at
Summary: Behavior of serialize has changed
Status: Open
Type: Bug
Package: Variables related
Operating System: Win64
PHP Version: 5.4.3
Block user comment: N
Private report: N
New Comment:
Have a look at this example (based on your code):
http://3v4l.org/D7HIa
Before 5.4, the Placeholder instances were actually different objects. This was
fixed in 5.4, therefore the properties correctly reference to the same objects.
Regarding your bug, where objects are NOT properly recreated, I am afraid you
will need to create an actual reproducable testcase before expecting anyone to
take a look at it :)
Previous Comments:
------------------------------------------------------------------------
[2012-06-12 12:45:06] mg at ovos dot at
Feedback -> Open.
------------------------------------------------------------------------
[2012-06-04 14:09:11] mg at ovos dot at
Please have a look at the following scenario:
http://pastebin.com/QRWtX0dM
Of course such double serialization makes no sense, but I found it to be present in Doctrine 1.2
library. Therefore I am wondering if the references should still work in this case like it was in
PHP 5.3.
------------------------------------------------------------------------
[2012-05-30 17:22:12] mg at ovos dot at
It seems that my issue is directly related to fixing a bug in PHP:
https://bugs.php.net/bug.php?id=36424
If this is true, the test case I included does not cover entirely the issue I am having. In my case
unserialize() does not bring back the referenced object, although the test case does.
I had no luck in extracting my scenario into a test case as yet. I am trying to find the difference
between test case and the live case, which is obviosly many times more complex.
------------------------------------------------------------------------
[2012-05-30 13:26:14] mg at ovos dot at
I'm attaching a DIFF with output of the testCase:
http://diffchecker.com/5399UzhN
Left side: PHP 5.3.8
Right side: PHP 5.4.3
------------------------------------------------------------------------
[2012-05-30 13:20:48] mg at ovos dot at
Hello!
I managed to produce a simple testCase, please find it here:
http://pastebin.com/sw1ZwvNv
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62189--
Edit this bug report at https://bugs.php.net/bug.php?id=62189&edit=1