Skip to content

added regression test#1651

Merged
ondrejmirtes merged 4 commits intophpstan:1.8.xfrom
staabm:regress
Aug 25, 2022
Merged

added regression test#1651
ondrejmirtes merged 4 commits intophpstan:1.8.xfrom
staabm:regress

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Aug 25, 2022

was fixed in 6173110

closes phpstan/phpstan#6013
closes phpstan/phpstan#2851
closes phpstan/phpstan#6008

this PR without the latest fix commit:

1) PHPStan\Rules\Comparison\NumberComparisonOperatorsConstantConditionRuleTest::testBug6013
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'
+'11: Comparison operation ">" between int<2, 3> and 0 is always true.
 '

/Users/staabm/workspace/phpstan-src/src/Testing/RuleTestCase.php:182
/Users/staabm/workspace/phpstan-src/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php:145

2) PHPStan\Rules\Comparison\NumberComparisonOperatorsConstantConditionRuleTest::testBug2851
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'
+'09: Comparison operation ">" between int<1, 2> and 0 is always true.
 '

/Users/staabm/workspace/phpstan-src/src/Testing/RuleTestCase.php:182
/Users/staabm/workspace/phpstan-src/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php:150

3) PHPStan\Rules\Comparison\StrictComparisonOfDifferentTypesRuleTest::testBug2851b
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'
+'20: Strict comparison using === between array{0: 1|(literal-string&non-falsy-string)|false, 1: 1|'x'|'y', 2?: 'x'|'y', 3?: 'y'} and array{} will always evaluate to false.
 '

/Users/staabm/workspace/phpstan-src/src/Testing/RuleTestCase.php:182
/Users/staabm/workspace/phpstan-src/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php:601

4) PHPStan\Rules\Variables\IssetRuleTest::testBug6008
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'
+'39: Offset 'curl_id' on array{curl_id: int, exception: Bug6008\stdClass, id: int, origin: string, reject: callable(): mixed, request: array{url: string, options?: array, copyTo?: string|null}, resolve: mixed, response: Bug6008\stdClass, ...} in isset() always exists and is not nullable.
 '

/Users/staabm/workspace/phpstan-src/src/Testing/RuleTestCase.php:182
/Users/staabm/workspace/phpstan-src/tests/PHPStan/Rules/Variables/IssetRuleTest.php:433

@staabm staabm marked this pull request as draft August 25, 2022 09:43
@staabm staabm marked this pull request as ready for review August 25, 2022 09:58
@ondrejmirtes ondrejmirtes merged commit e6f4025 into phpstan:1.8.x Aug 25, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Really nice! Thank you!

@staabm staabm deleted the regress branch September 22, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants