Skip to content

Commit acd9015

Browse files
committed
clean up PHP 8.0 version checks
1 parent ba6a65c commit acd9015

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ public function testCloneVarExistingFilePath()
3838
$this->assertSame($filePath, $c->getData()[0]);
3939
}
4040

41-
/**
42-
* @requires PHP 8
43-
*/
4441
public function testClassPublicObjectProperty()
4542
{
4643
$parent = new WithPublicObjectProperty();
@@ -54,9 +51,6 @@ public function testClassPublicObjectProperty()
5451
$this->assertNotNull($c->getData()->parent);
5552
}
5653

57-
/**
58-
* @requires PHP 8
59-
*/
6054
public function testClassPublicObjectPropertyAsReference()
6155
{
6256
$parent = new WithPublicObjectProperty();
@@ -70,9 +64,6 @@ public function testClassPublicObjectPropertyAsReference()
7064
$this->assertNotNull($c->getData()->parent);
7165
}
7266

73-
/**
74-
* @requires PHP 8
75-
*/
7667
public function testClassUsePropertyInDestruct()
7768
{
7869
$parent = new UsePropertyInDestruct();
@@ -86,9 +77,6 @@ public function testClassUsePropertyInDestruct()
8677
$this->assertNotNull($c->getData()->parent);
8778
}
8879

89-
/**
90-
* @requires PHP 8
91-
*/
9280
public function testClassUsePropertyAsReferenceInDestruct()
9381
{
9482
$parent = new UsePropertyInDestruct();

src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function isGetMethod(\ReflectionMethod $method): bool
116116
private function isSetMethod(\ReflectionMethod $method): bool
117117
{
118118
return !$method->isStatic()
119-
&& (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class))
119+
&& !$method->getAttributes(Ignore::class)
120120
&& 1 === $method->getNumberOfRequiredParameters()
121121
&& str_starts_with($method->name, 'set');
122122
}

src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private function hasAttributeAccessorMethod(string $class, string $attribute): b
216216
$method = $reflection->getMethod($attribute);
217217

218218
return !$method->isStatic()
219-
&& (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class))
219+
&& !$method->getAttributes(Ignore::class)
220220
&& !$method->getNumberOfRequiredParameters();
221221
}
222222
}

0 commit comments

Comments
 (0)