Skip to content

Commit a86b865

Browse files
committed
minor symfony#58027 [Serializer] clean up PHP version checks (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] clean up PHP version checks | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT these checks are not needed after merging symfony#58021 up into the `6.4` branch Commits ------- 6e19c0f clean up PHP version checks
2 parents 164470e + 6e19c0f commit a86b865

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function testEncodeCustomSettings()
149149
$this->encoder = new CsvEncoder([
150150
CsvEncoder::DELIMITER_KEY => ';',
151151
CsvEncoder::ENCLOSURE_KEY => "'",
152-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
152+
CsvEncoder::ESCAPE_CHAR_KEY => '',
153153
CsvEncoder::KEY_SEPARATOR_KEY => '-',
154154
]);
155155

@@ -175,7 +175,7 @@ public function testEncodeCustomSettingsPassedInContext()
175175
, $this->encoder->encode($value, 'csv', [
176176
CsvEncoder::DELIMITER_KEY => ';',
177177
CsvEncoder::ENCLOSURE_KEY => "'",
178-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
178+
CsvEncoder::ESCAPE_CHAR_KEY => '',
179179
CsvEncoder::KEY_SEPARATOR_KEY => '-',
180180
]));
181181
}
@@ -185,7 +185,7 @@ public function testEncodeCustomSettingsPassedInConstructor()
185185
$encoder = new CsvEncoder([
186186
CsvEncoder::DELIMITER_KEY => ';',
187187
CsvEncoder::ENCLOSURE_KEY => "'",
188-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
188+
CsvEncoder::ESCAPE_CHAR_KEY => '',
189189
CsvEncoder::KEY_SEPARATOR_KEY => '-',
190190
]);
191191
$value = ['a' => 'he\'llo', 'c' => ['d' => 'foo']];
@@ -574,7 +574,7 @@ public function testDecodeCustomSettings()
574574
$this->encoder = new CsvEncoder([
575575
CsvEncoder::DELIMITER_KEY => ';',
576576
CsvEncoder::ENCLOSURE_KEY => "'",
577-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
577+
CsvEncoder::ESCAPE_CHAR_KEY => '',
578578
CsvEncoder::KEY_SEPARATOR_KEY => '-',
579579
]);
580580

@@ -596,7 +596,7 @@ public function testDecodeCustomSettingsPassedInContext()
596596
, 'csv', [
597597
CsvEncoder::DELIMITER_KEY => ';',
598598
CsvEncoder::ENCLOSURE_KEY => "'",
599-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
599+
CsvEncoder::ESCAPE_CHAR_KEY => '',
600600
CsvEncoder::KEY_SEPARATOR_KEY => '-',
601601
]));
602602
}
@@ -606,7 +606,7 @@ public function testDecodeCustomSettingsPassedInConstructor()
606606
$encoder = new CsvEncoder([
607607
CsvEncoder::DELIMITER_KEY => ';',
608608
CsvEncoder::ENCLOSURE_KEY => "'",
609-
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
609+
CsvEncoder::ESCAPE_CHAR_KEY => '',
610610
CsvEncoder::KEY_SEPARATOR_KEY => '-',
611611
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
612612
]);

0 commit comments

Comments
 (0)