Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Thanks to https://github.com/flaushi for his suggestion: |
| 5 | * https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358 |
| 6 | */ |
| 7 | namespace Carbon\Doctrine; |
| 8 | |
| 9 | use Carbon\CarbonImmutable; |
| 10 | use Doctrine\DBAL\Types\VarDateTimeImmutableType; |
| 11 | |
| 12 | class DateTimeImmutableType extends VarDateTimeImmutableType implements CarbonDoctrineType |
| 13 | { |
| 14 | /** @use CarbonTypeConverter<CarbonImmutable> */ |
| 15 | use CarbonTypeConverter; |
| 16 | |
| 17 | /** |
| 18 | * @return class-string<CarbonImmutable> |
| 19 | */ |
| 20 | protected function getCarbonClassName(): string |
| 21 | { |
| 22 | return CarbonImmutable::class; |
| 23 | } |
| 24 | } |