Skip to content

Commit 1a43385

Browse files
committed
Analyser: do not report E_DEPRECATED
1 parent 458a8fb commit 1a43385

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/Analyser/Analyser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ private function collectErrors(array $analysedFiles): void
131131
return true;
132132
}
133133

134+
if ($errno === E_DEPRECATED) {
135+
return true;
136+
}
137+
134138
if (!in_array($errfile, $analysedFiles, true)) {
135139
return true;
136140
}

tests/PHPStan/Rules/Methods/ExistingClassesInTypehintsRuleTest.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,7 @@ public function dataRequiredParameterAfterOptional(): array
205205
return [
206206
[
207207
70400,
208-
PHP_VERSION_ID < 80000 || self::$useStaticReflectionProvider ? [] : [
209-
[
210-
'Required parameter $bar follows optional parameter $foo',
211-
8,
212-
],
213-
[
214-
'Required parameter $bar follows optional parameter $foo',
215-
17,
216-
],
217-
[
218-
'Required parameter $bar follows optional parameter $foo',
219-
21,
220-
],
221-
],
208+
[],
222209
],
223210
[
224211
80000,

0 commit comments

Comments
 (0)