Error Identifier: phpstan.php
Every error reported by PHPStan has an error identifier. Here’s a list of all error identifiers. In PHPStan Pro you can see the error identifier next to each error and filter errors by their identifiers.
Code example #
This error wraps native PHP errors (warnings, notices, deprecations) that occur during analysis.
Why is it reported? #
A PHP warning, notice, or deprecation was triggered while PHPStan was analysing the code. This happens when PHP itself encounters an issue during the analysis phase. The error message includes the PHP error level (e.g., Warning, Notice, Deprecated) followed by the error text.
How to fix it #
Fix the underlying PHP issue that causes the warning, notice, or deprecation. The error message from PHP itself describes what went wrong.
How to ignore this error #
You can use the identifier phpstan.php to ignore this error using a comment:
// @phpstan-ignore phpstan.php
codeThatProducesTheError();
You can also use only the identifier key to ignore all errors of the same type in your configuration file in the ignoreErrors parameter:
parameters:
ignoreErrors:
-
identifier: phpstan.php