phpstan.neon.dist 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. parameters:
  2. level: 8
  3. treatPhpDocTypesAsCertain: false
  4. reportUnmatchedIgnoredErrors: false
  5. paths:
  6. - src/
  7. # - tests/
  8. excludePaths:
  9. - 'src/Monolog/Handler/PHPConsoleHandler.php'
  10. ignoreErrors:
  11. - '#zend_monitor_|ZEND_MONITOR_#'
  12. - '#MongoDB\\(Client|Collection)#'
  13. # Invalid type info on Redis multi
  14. - '#^Cannot call method ltrim\(\) on int\|false.$#'
  15. # Cannot resolve this cleanly as different normalizers return different types but it is safe
  16. - message: '#Return type \(string\) of method Monolog\\Formatter\\LineFormatter::normalizeException\(\) should be compatible with return type \(array\) of method Monolog\\Formatter\\NormalizerFormatter::normalizeException\(\)#'
  17. paths:
  18. - src/Monolog/Formatter/LineFormatter.php
  19. # blocked until we only support php8+
  20. - '#Parameter \#1 \$socket of function (socket_close|socket_sendto|socket_send) expects Socket, resource\|Socket(\|null)? given\.#'
  21. - '#Parameter \#1 \$handle of function (curl_exec|curl_close|curl_error|curl_errno|curl_setopt) expects CurlHandle, CurlHandle\|resource(\|null)? given\.#'
  22. - message: '#Method Monolog\\Handler\\LogglyHandler::loadCurlHandle\(\) never returns resource so it can be removed from the return typehint.#'
  23. paths:
  24. - src/Monolog/Handler/LogglyHandler.php
  25. # blocked by https://github.com/phpstan/phpstan/issues/5091
  26. - '#has unknown class Monolog\\Handler\\Record#'
  27. - '#::processRecord\(\) should return array#'
  28. - '#::processRecord\(\) has invalid type#'
  29. - '#::processRecord\(\) return type has no value type#'
  30. - '#::processRecord\(\) has parameter \$record with no value type#'
  31. - '#::popProcessor\(\) should return callable#'
  32. - '#Parameter \#1 \$ of callable \(callable\(Monolog\\Handler\\Record\): Monolog\\Handler\\Record\)#'
  33. - '#is incompatible with native type array.#'
  34. # legacy elasticsearch namespace failures
  35. - '# Elastic\\Elasticsearch\\#'
  36. # legacy GelfPHP 1.x failures
  37. - '# Gelf\\Message::set(Facility|Line|File)\(#'