8000 minor #32046 [FrameworkBundle] Unconditionally register the DateInter… · symfony/symfony@26048bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 26048bc

Browse files
committed
minor #32046 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer (ogizanagi)
This PR was merged into the 4.2 branch. Discussion ---------- [FrameworkBundle] Unconditionally register the DateIntervalNormalizer | Q | A | ------------- | --- | Branch? | 4.2 <!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A Fwb conflicts with serializer <4.2 https://github.com/symfony/symfony/blob/37fa45bbd1553ee5ce6efdb79bd003b7327f7376/src/Symfony/Bundle/FrameworkBundle/composer.json#L74 so we can remove this obsolete condition from the extension (DateIntervalNormalizer exists since 3.4). Commits ------- c7cc780 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer
2 parents b8c4809 + c7cc780 commit 26048bc

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
9090
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
9191
use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer;
92-
use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer;
9392
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
9493
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
9594
use Symfony\Component\Stopwatch\Stopwatch;
@@ -1316,10 +1315,6 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
13161315
{
13171316
$loader->load('serializer.xml');
13181317

1319-
if (!class_exists(DateIntervalNormalizer::class)) {
1320-
$container->removeDefinition('serializer.normalizer.dateinterval');
1321-
}
1322-
13231318
if (!class_exists(ConstraintViolationListNormalizer::class)) {
13241319
$container->removeDefinition('serializer.normalizer.constraint_violation_list');
13251320
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,10 +1102,6 @@ public function testDataUriNormalizerRegistered()
11021102

11031103
public function testDateIntervalNormalizerRegistered()
11041104
{
1105-
if (!class_exists(DateIntervalNormalizer::class)) {
1106-
$this->markTestSkipped('The DateIntervalNormalizer has been introduced in the Serializer Component version 3.4.');
1107-
}
1108-
11091105
$container = $this->createContainerFromFile('full');
11101106

11111107
$definition = $container->getDefinition('serializer.normalizer.dateinterval');

0 commit comments

Comments
 (0)
0