| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- includes:
- - 'phpstan-baseline.neon'
- parameters:
- level: 8
- treatPhpDocTypesAsCertain: false
- reportUnmatchedIgnoredErrors: false
- paths:
- - src/
- # - tests/
- excludePaths:
- - 'src/Monolog/Handler/PHPConsoleHandler.php'
- ignoreErrors:
- - '#zend_monitor_|ZEND_MONITOR_#'
- - '#MongoDB\\(Client|Collection)#'
- # Invalid type info on Redis multi
- - '#^Cannot call method ltrim\(\) on int\|false.$#'
- # Cannot resolve this cleanly as different normalizers return different types but it is safe
- - message: '#Return type \(string\) of method Monolog\\Formatter\\LineFormatter::normalizeException\(\) should be compatible with return type \(array\) of method Monolog\\Formatter\\NormalizerFormatter::normalizeException\(\)#'
- paths:
- - src/Monolog/Formatter/LineFormatter.php
- # blocked until we only support php8+
- - '#Parameter \#1 \$socket of function (socket_close|socket_sendto|socket_send) expects Socket, resource\|Socket(\|null)? given\.#'
- - '#Parameter \#1 \$handle of function (curl_exec|curl_close|curl_error|curl_errno|curl_setopt) expects CurlHandle, CurlHandle\|resource(\|null)? given\.#'
- - message: '#Method Monolog\\Handler\\LogglyHandler::loadCurlHandle\(\) never returns resource so it can be removed from the return typehint.#'
- paths:
- - src/Monolog/Handler/LogglyHandler.php
- # blocked by https://github.com/phpstan/phpstan/issues/5091
- - '#has unknown class Monolog\\Handler\\Record#'
- - '#::processRecord\(\) should return array#'
- - '#::processRecord\(\) has invalid type#'
- - '#::processRecord\(\) return type has no value type#'
- - '#::processRecord\(\) has parameter \$record with no value type#'
- - '#::popProcessor\(\) should return callable#'
- - '#Parameter \#1 \$ of callable \(callable\(Monolog\\Handler\\Record\): Monolog\\Handler\\Record\)#'
- - '#is incompatible with native type array.#'
- # legacy elasticsearch namespace failures
- - '# Elastic\\Elasticsearch\\#'
- # legacy GelfPHP 1.x failures
- - '# Gelf\\Message::set(Facility|Line|File)\(#'
- # php 8.1 Fiber failures
- - '#unknown class Fiber#'
- - '#Offset mixed does not exist on WeakMap<Fiber, int>\|null\.#'
- # php 8.1 Enum failures
- - '#Class (UnitEnum|BackedEnum) not found#'
- - '#unknown class (UnitEnum|BackedEnum)#'
|