与monolog和swiftmailer

时间:2016-06-02 17:03:29

标签: php symfony swiftmailer monolog

我最近在使用php7和Symfony2.8的ubuntu服务器上遇到以下错误。*:

  

致命错误:无法使用$ this作为参数   第xxx行的app / cache / prod / appProdProjectContainer.php

目标线位于此区块内:

public function __construct(\Swift_Mailer $mailer, $fromEmail, $toEmail, $subject, $contentType = null)
{
    static $reflection;
    if (! $this->valueHolder575050505c85a273560796) {
        $reflection = $reflection ?: new \ReflectionClass('Symfony\\Bundle\\MonologBundle\\SwiftMailer\\MessageFactory');
        $this->valueHolder575050505c85a273560796 = $reflection->newInstanceWithoutConstructor();
    \Closure::bind(function (\Symfony\Bundle\MonologBundle\SwiftMailer\MessageFactory $this) {
        unset($this->mailer, $this->fromEmail, $this->toEmail, $this->subject, $this->contentType);
    }, $this, 'Symfony\\Bundle\\MonologBundle\\SwiftMailer\\MessageFactory')->__invoke($this);
    }
    $this->valueHolder575050505c85a273560796->__construct($mailer, $fromEmail, $toEmail, $subject, $contentType);
}

更具体地说, xxx 行是:  \Closure::bind(function (\Symfony\Bundle\MonologBundle\SwiftMailer\MessageFactory $this) {

我试图更改monolog版本,swiftmailer版本,事件symfony版本但问题仍然存在并阻止我的所有应用程序。我现在已经通过电子邮件禁用了日志,但我想修复它。有任何想法吗 ? 在我的Mac上,一切正常。

0 个答案:

没有答案