phpstan.neon.dist 2.0 KB

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