phpstan.neon.dist 2.4 KB

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