From 81833b5787e2e8f451b31218875e29e4ed600ab2 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 26 Oct 2024 11:50:09 +0200 Subject: [PATCH] Removed always true PHP_VERSION_ID condition --- .../FetchingDeprecatedConstRuleTest.php | 52 +++++++++---------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/tests/Rules/Deprecations/FetchingDeprecatedConstRuleTest.php b/tests/Rules/Deprecations/FetchingDeprecatedConstRuleTest.php index 6f48fd6..1428ec2 100644 --- a/tests/Rules/Deprecations/FetchingDeprecatedConstRuleTest.php +++ b/tests/Rules/Deprecations/FetchingDeprecatedConstRuleTest.php @@ -5,7 +5,6 @@ use PHPStan\Rules\Rule; use PHPStan\Testing\RuleTestCase; use function defined; -use const PHP_VERSION_ID; /** * @extends RuleTestCase @@ -28,33 +27,30 @@ public function testFetchingDeprecatedConst(): void } $expectedErrors = []; - - if (PHP_VERSION_ID >= 70300) { - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', - 5, - ]; - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', - 6, - ]; - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', - 7, - ]; - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', - 8, - ]; - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', - 37, - ]; - $expectedErrors[] = [ - 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', - 38, - ]; - } + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', + 5, + ]; + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', + 6, + ]; + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', + 7, + ]; + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', + 8, + ]; + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated.', + 37, + ]; + $expectedErrors[] = [ + 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated.', + 38, + ]; require_once __DIR__ . '/data/fetching-deprecated-const-definition.php'; $this->analyse(