Skip to content

Commit 7c60acf

Browse files
committed
add version constraints
1 parent 21881f4 commit 7c60acf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ public function testInternalClassesWithOverloadedOffsetAccess(): void
905905

906906
public function testInternalClassesWithOverloadedOffsetAccess84(): void
907907
{
908+
if (version_compare(PHP_VERSION, '8.4.0', '<')) {
909+
$this->markTestSkipped('Test requires PHP version 8.4.');
910+
}
908911
$this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access-php84.php'], []);
909912
}
910913

@@ -915,6 +918,9 @@ public function testInternalClassesWithOverloadedOffsetAccessInvalid(): void
915918

916919
public function testInternalClassesWithOverloadedOffsetAccessInvalid84(): void
917920
{
921+
if (version_compare(PHP_VERSION, '8.4.0', '<')) {
922+
$this->markTestSkipped('Test requires PHP version 8.4.');
923+
}
918924
$this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access-invalid-php84.php'], []);
919925
}
920926

tests/PHPStan/Rules/Arrays/data/internal-classes-overload-offset-access-invalid-php84.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 8.4
1+
<?php
22
/**
33
* All of these offset accesses are invalid
44
* ++ and -- are also disallowed in general are they operate "by ref"

tests/PHPStan/Rules/Arrays/data/internal-classes-overload-offset-access-php84.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 8.4
1+
<?php
22

33
namespace InternalClassesOverloadOffsetAccess\Php84;
44

0 commit comments

Comments
 (0)