我参考了[如何配置Monolog来处理电子邮件错误](symfony版本4.4)
发生错误:达到最大函数嵌套级别“ 256”
!! Error {#5035
!! #message: "Maximum function nesting level of '256' reached,
aborting!"
!! #code: 0
!! #file: "C:\work\gitlab\pay\payment- api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php"
!! #line: 3137
!! trace: {
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3137 {
!! ContainerOsYVzcc\srcApp_KernelDevDebugContainer->ContainerOsYVzcc\{closure}
!! ›
!! › return $this->privates['mailer.mailer'] = new
\Symfony\Component\Mailer\Mailer((new \Symfony\Component\Mailer\Transport(new RewindableGenerator(function () {
!! › yield 0 => ($this->privates['mailer.transport_factory.null'] ?? $this->getMailer_TransportFactory_NullService());
!! }
!! C:\work\gitlab\pay\payment-api\vendor\symfony\dependency-injection\Argument\RewindableGenerator.php:35 { …}
!! C:\work\gitlab\pay\payment-api\vendor\symfony\mailer\Transport.php:143 { …}
!! C:\work\gitlab\pay\payment-api\vendor\symfony\mailer\Transport.php:134 { …}
!! C:\work\gitlab\pay\payment-api\vendor\symfony\mailer\Transport.php:86 { …}
!! C:\work\gitlab\pay\payment-api\vendor\symfony\mailer\Transport.php:78 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3141 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3658 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3642 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:1600 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3155 { …}
!! C:\work\gitlab\pay\payment-api\var\cache\dev\ContainerOsYVzcc\srcApp_KernelDevDebugContainer.php:3138 { …}
如何解决?谁可以帮助我
答案 0 :(得分:0)
这是一个 xdebug问题,因为PHP没有最高功能嵌套级别
尝试设置:
xdebug.max_nesting_level=1000
在您的 php.ini 中(或禁用xdebug)