Skip to content

Commit 49a85cc

Browse files
committed
minor #2999 Remove unnecessary checks for PHP <8.1 (in tests) (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- Remove unnecessary checks for PHP <8.1 (in tests) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Should have been removed in #946 <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 770676a Remove unnecessary checks for PHP <8.1 (in tests)
2 parents 5cdef70 + 770676a commit 49a85cc

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ public function onEntireEntityUpdated($oldValue)
822822
self::assertNull($object->string);
823823
})
824824
;
825-
}, 80100];
825+
}];
826826

827827
yield 'Enum: (de)hydrates correctly' => [function () {
828828
return HydrationTest::create(new class {
@@ -841,7 +841,7 @@ public function onEntireEntityUpdated($oldValue)
841841
self::assertSame('active', $object->string->value);
842842
})
843843
;
844-
}, 80100];
844+
}];
845845

846846
yield 'Enum: writable enums can be changed' => [function () {
847847
return HydrationTest::create(new class {
@@ -854,7 +854,7 @@ public function onEntireEntityUpdated($oldValue)
854854
self::assertSame(1, $object->int->value);
855855
})
856856
;
857-
}, 80100];
857+
}];
858858

859859
yield 'Enum: null-like enum values are handled correctly' => [function () {
860860
return HydrationTest::create(new class {
@@ -884,7 +884,7 @@ public function onEntireEntityUpdated($oldValue)
884884
self::assertSame(EmptyStringEnum::EMPTY, $object->emptyString);
885885
})
886886
;
887-
}, 80100];
887+
}];
888888

889889
yield 'Enum: nullable enum with invalid value sets to null' => [function () {
890890
return HydrationTest::create(new class {
@@ -898,7 +898,7 @@ public function onEntireEntityUpdated($oldValue)
898898
self::assertNull($object->int);
899899
})
900900
;
901-
}, 80100];
901+
}];
902902

903903
yield 'Object: (de)hydrates DTO correctly' => [function () {
904904
return HydrationTest::create(new class {
@@ -1612,7 +1612,7 @@ public static function provideInvalidHydrationTests(): iterable
16121612
// non-nullable change is rejected (1=LOW)
16131613
self::assertSame(1, $object->nonNullableInt->value);
16141614
});
1615-
}, 80100];
1615+
}];
16161616

16171617
yield 'writable_path_with_type_problem_ignored' => [function () {
16181618
return HydrationTest::create(new class {

src/TwigComponent/tests/Unit/ComponentAttributesTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ public function testCanAddStimulusControllerIfNoneAlreadyPresent()
139139

140140
public function testCanAddStimulusControllerViaStimulusAttributes()
141141
{
142-
// if PHP less than 8.1, skip
143-
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
144-
$this->markTestSkipped('PHP 8.1+ required');
145-
}
146-
147142
$attributes = new ComponentAttributes([
148143
'class' => 'foo',
149144
'data-controller' => 'live',
@@ -167,11 +162,6 @@ public function testCanAddStimulusControllerViaStimulusAttributes()
167162

168163
public function testCanAddStimulusActionViaStimulusAttributes()
169164
{
170-
// if PHP less than 8.1, skip
171-
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
172-
$this->markTestSkipped('PHP 8.1+ required');
173-
}
174-
175165
$attributes = new ComponentAttributes([
176166
'class' => 'foo',
177167
'data-action' => 'live#foo',

0 commit comments

Comments
 (0)