Closed Eduardo-Morales-Alberti closed 1 year ago
Looks related to this change in Monolog: https://github.com/Seldaek/monolog/pull/1753
Weakmap's cannot be serialized. Maybe you can open up an issue in monolog to investigate another approach over using weakmaps?
serialize(new WeakMap())
Exception with message 'Serialization of 'WeakMap' is not allowed'
I opened it https://github.com/Seldaek/monolog/issues/1792 but I am not sure how to fill it.
Why trying to serialize the logger instance though ? I don't think Monolog ever promised that the logger is serializable (many handlers will not be serializable either)
To run processes in parallel, we use amphp/parallel in combination with serializable-closure. This serializable-closure is serializing the context of the closure, which might include the logger.
For example, the git_commit_message
here will have a dependency to gitonomy, which is configured with a logger (monolog).
Therefore, the serializable-closure will try to serialize both gitonomy and monolog into it's context.
It's not like we are actively willing to serialize the logger in there, but it's part of the dependency tree.
Seems to be fixed by @Seldaek on the next release https://github.com/Seldaek/monolog/issues/1792 https://github.com/Seldaek/monolog/milestone/6?closed=1
Cool, seems fixed indeed! Thanks for reporting and the follow up!
My configuration
Steps to reproduce: It happens after update monolog to the last version 2.9.0.
Result: