Bug #81667 [Nab]: giacomo.fabbian@gmail.com
Edit report at https://bugs.php.net/bug.php?id=81667&edit=1
ID: 81667
User updated by: giacomo dot fabbian at gmail dot com
Reported by: giacomo dot fabbian at gmail dot com
-Summary: Error on serialization with MongoDB class
+Summary: giacomo.fabbian@gmail.com
Status: Not a bug
Type: Bug
Package: *General Issues
PHP Version: 7.4.26
Block user comment: N
Private report: N
New Comment:
I open an issue here because serialize() function is part of PHP core and the function has to work
with any type of class and with deep nested data.
Previous Comments:
------------------------------------------------------------------------
[2021-11-27 12:49:18] requinix@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2021-11-27 12:29:54] giacomo dot fabbian at gmail dot com
Description:
------------
My application is based on Laravel and MongoDB. Serialization is often used in this framework for
session and emit event. When I try to pass a MongoDB model with nested data with more than 2 level
the serialization() not working. The only workaround that I have found is to cast data into array of
object.
Is there a way to fix this without casting?
Thanks
Actual result:
--------------
I got this exception: Serialization of 'MongoDB\Driver\Manager' is not allowed
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81667&edit=1
Thread (5 messages)