Skip to content

Commit 73e8952

Browse files
author
awu
committed
fix: update DateTime class mapping in data_mapper.yaml and ConfigurationTest
1 parent 62d5854 commit 73e8952

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Resources/config/packages/data_mapper.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ data_mapper:
22
approach: 'SETTER'
33
accessible: 'PUBLIC'
44
class_map:
5-
DateTimeInterface: DateTimeImmutable
5+
DateTimeInterface: DateTime

tests/ConfigurationTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Wundii\DataMapper\SymfonyBundle\Tests;
66

77
use DateTime;
8-
use DateTimeImmutable;
98
use DateTimeInterface;
109
use PHPUnit\Framework\TestCase;
1110
use Symfony\Component\Config\Definition\Processor;
@@ -38,7 +37,7 @@ public function testOverrideConfiguration(): void
3837
'approach' => 'CONSTRUCTOR',
3938
'accessible' => 'PRIVATE',
4039
'class_map' => [
41-
DateTimeInterface::class => DateTimeImmutable::class,
40+
DateTimeInterface::class => DateTime::class,
4241
'Foo' => 'Bar',
4342
],
4443
]];
@@ -47,7 +46,7 @@ public function testOverrideConfiguration(): void
4746

4847
$this->assertSame('CONSTRUCTOR', $config['approach']);
4948
$this->assertSame('PRIVATE', $config['accessible']);
50-
$this->assertSame(DateTimeImmutable::class, $config['class_map'][DateTimeInterface::class]);
49+
$this->assertSame(DateTime::class, $config['class_map'][DateTimeInterface::class]);
5150
$this->assertSame('Bar', $config['class_map']['Foo']);
5251
}
5352
}

0 commit comments

Comments
 (0)