Skip to content

Commit 1a77106

Browse files
committed
AC-7422:Incompatible issues fix for PHP8.2 - Fixed static tests cases
1 parent e45dfad commit 1a77106

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"magento/magento2-functional-testing-framework": "^4.0",
9999
"pdepend/pdepend": "^2.10",
100100
"phpmd/phpmd": "^2.12",
101-
"phpstan/phpstan": "^1.7",
101+
"phpstan/phpstan": "1.9.2",
102102
"phpunit/phpunit": "^9.5",
103103
"sebastian/phpcpd": "^6.0",
104104
"symfony/finder": "^5.4"

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,19 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in
6666
return self::NO_ERRORS;
6767
}
6868

69-
return $this->tableErrorFormatter->formatErrors($analysisResult, $output);
69+
//@phpstan:ignore-line
70+
$clearedAnalysisResult = new AnalysisResult(
71+
$this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()),
72+
$analysisResult->getNotFileSpecificErrors(),
73+
$analysisResult->getInternalErrors(),
74+
$analysisResult->getWarnings(),
75+
$analysisResult->getCollectedData(),
76+
$analysisResult->isDefaultLevelUsed(),
77+
$analysisResult->getProjectConfigFile(),
78+
$analysisResult->isResultCacheSaved()
79+
);
80+
81+
return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output);
7082
}
7183

7284
/**

0 commit comments

Comments
 (0)