Skip to content

must be compatible with MagentoFrameworkLoggerHandlerBase:

I am upgrading to 2.4.5

I am getting this error all through out Magento including the command line, which is being caused by the Manadev extension, do you know what this may be?

PHP Fatal error:  Declaration of ManadevCoreLoggerHandlersDefaultHandler::write(array $record) must be compatible with MagentoFrameworkLoggerHandlerBase::write(array $record): void in app/code/Manadev/Core/LoggerHandlers/DefaultHandler.php on line 52

DefaultHandler.php write function –>

    public function write(array $record) {
        if (isset($record['file'])) {
            $url = empty($record['file'])
                ? BP . '/var/log/mana.log'
                : BP . '/var/log/mana/' . $record['file'] . '.log';

            unset($record['file']);
        }
        else {
            $url = BP . '/var/log/mana.log';
        }

        if ($this->url != $url) {
            $this->close();
            $this->url = $url;
        }

        parent::write($record);
    }

Thank you