Skip to content

Commit

Permalink
php 8.4 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 28, 2024
1 parent 2eaa9f5 commit 2f377b3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Compat/Logger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace ErrorHeroModule\Compat;

final class Logger extends \Laminas\Log\Logger
{
public static $errorPriorityMap = [
E_NOTICE => self::NOTICE,
E_USER_NOTICE => self::NOTICE,
E_WARNING => self::WARN,
E_CORE_WARNING => self::WARN,
E_USER_WARNING => self::WARN,
E_ERROR => self::ERR,
E_USER_ERROR => self::ERR,
E_CORE_ERROR => self::ERR,
E_RECOVERABLE_ERROR => self::ERR,
E_PARSE => self::ERR,
E_COMPILE_ERROR => self::ERR,
E_COMPILE_WARNING => self::ERR,
// E_STRICT is deprecated in php 8.4
2048 => self::DEBUG,
E_DEPRECATED => self::DEBUG,
E_USER_DEPRECATED => self::DEBUG,
];
}

0 comments on commit 2f377b3

Please sign in to comment.