Skip to content

Commit

Permalink
Drop check php 8.0 in tests (#8228)
Browse files Browse the repository at this point in the history
  • Loading branch information
onEXHovia authored Dec 7, 2024
1 parent db99910 commit a43b3c9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
3 changes: 0 additions & 3 deletions tests/Form/DataTransformer/BackedEnumTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Exception\UnexpectedTypeException;

/**
* @requires PHP 8.1
*/
final class BackedEnumTransformerTest extends TestCase
{
public function testReverseTransform(): void
Expand Down
10 changes: 0 additions & 10 deletions tests/Twig/Extension/RenderElementExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1523,11 +1523,6 @@ class="x-editable"
],
];

// TODO: Remove the "if" check when dropping support of PHP < 8.1 and add the case to the list
if (\PHP_VERSION_ID < 80100) {
return $elements;
}

$elements[] = [
'<td class="sonata-ba-list-field sonata-ba-list-field-enum" objectId="12345"> &nbsp; </td>',
FieldDescriptionInterface::TYPE_ENUM,
Expand Down Expand Up @@ -2103,11 +2098,6 @@ class="sonata-readmore"
],
];

// TODO: Remove the "if" check when dropping support of PHP < 8.1 and add the case to the list
if (\PHP_VERSION_ID < 80100) {
return $elements;
}

$elements[] = [
'<th>Data</th> <td>Hearts</td>',
FieldDescriptionInterface::TYPE_ENUM,
Expand Down
5 changes: 0 additions & 5 deletions tests/Twig/RenderElementRuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1473,11 +1473,6 @@ class="x-editable"
],
];

// TODO: Remove the "if" check when dropping support of PHP < 8.1 and add the case to the list
if (\PHP_VERSION_ID < 80100) {
return $elements;
}

$elements[] = [
'<td class="sonata-ba-list-field sonata-ba-list-field-enum" objectId="12345"> Hearts </td>',
FieldDescriptionInterface::TYPE_ENUM,
Expand Down
25 changes: 11 additions & 14 deletions tests/Twig/XEditableRuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,16 @@ public function provideGetXEditableChoicesIsIdempotentCases(): iterable
],
];

// TODO: Remove the "if" check when dropping support of PHP < 8.1 and add the case to the list
if (\PHP_VERSION_ID >= 80100) {
yield 'enum cases' => [
[
'required' => false,
'multiple' => false,
'choices' => [Suit::Hearts, Suit::Clubs],
],
[
['value' => 'H', 'text' => 'Hearts'],
['value' => 'C', 'text' => 'Clubs'],
],
];
}
yield 'enum cases' => [
[
'required' => false,
'multiple' => false,
'choices' => [Suit::Hearts, Suit::Clubs],
],
[
['value' => 'H', 'text' => 'Hearts'],
['value' => 'C', 'text' => 'Clubs'],
],
];
}
}

0 comments on commit a43b3c9

Please sign in to comment.