EasyCorp/easy-log-handler

PHP Fatal Error in 1.0.4: Uncaught Exception: Serialization of 'Closure' is not allowed

merk opened this issue · 1 comments

merk commented

Since upgrading to 1.0.4 while using this handler, I receive a fatal error about serialization of closures when running tests. Rolling back to 1.0.3 removes this fatal error.

Exception: Serialization of 'Closure' is not allowed in /Users/tim/Sites/invocation/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 173

Call Stack:
    0.0002     395520   1. {main}() /Users/tim/Sites/invocation/vendor/phpunit/phpunit/phpunit:0
    0.0168    1478592   2. PHPUnit\TextUI\Command::main() /Users/tim/Sites/invocation/vendor/phpunit/phpunit/phpunit:53
    0.0168    1478704   3. PHPUnit\TextUI\Command->run() /Users/tim/Sites/invocation/vendor/phpunit/phpunit/src/TextUI/Command.php:148
    0.0383    3363632   4. PHPUnit\TextUI\TestRunner->doRun() /Users/tim/Sites/invocation/vendor/phpunit/phpunit/src/TextUI/Command.php:195
   11.2136   77690776   5. Monolog\Handler\BufferHandler->close() /Users/tim/Sites/invocation/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php:0
   11.2136   77690776   6. Monolog\Handler\BufferHandler->flush() /Users/tim/Sites/invocation/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php:106
   11.2136   77690776   7. EasyCorp\EasyLog\EasyLogHandler->handleBatch() /Users/tim/Sites/invocation/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php:90
   11.2136   77690776   8. EasyCorp\EasyLog\EasyLogFormatter->formatBatch() /Users/tim/Sites/invocation/vendor/easycorp/easy-log-handler/src/EasyLogHandler.php:38
   11.3118   78437600   9. EasyCorp\EasyLog\EasyLogFormatter->formatRecord() /Users/tim/Sites/invocation/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php:84
   11.3118   78438304  10. EasyCorp\EasyLog\EasyLogFormatter->formatContext() /Users/tim/Sites/invocation/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php:483
   11.3118   78438704  11. Symfony\Component\Yaml\Yaml::dump() /Users/tim/Sites/invocation/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php:368
   11.3119   78438760  12. Symfony\Component\Yaml\Dumper->dump() /Users/tim/Sites/invocation/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php:120
   11.3119   78438800  13. Symfony\Component\Yaml\Dumper->dump() /Users/tim/Sites/invocation/vendor/symfony/symfony/src/Symfony/Component/Yaml/Dumper.php:120
   11.3119   78438800  14. Symfony\Component\Yaml\Inline::dump() /Users/tim/Sites/invocation/vendor/symfony/symfony/src/Symfony/Component/Yaml/Dumper.php:93
   11.3119   78438800  15. serialize() /Users/tim/Sites/invocation/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php:173

Problem is can be reproduced now with no-exception objects in context
#21