Skip to content

Commit

Permalink
feature #1438 Remove mentions of undefined Doctrine constants Types::…
Browse files Browse the repository at this point in the history
…ARRAY and Types::OBJECT (njutn95)

This PR was squashed before being merged into the 1.x-dev branch.

Discussion
----------

Remove mentions of undefined Doctrine constants Types::ARRAY and Types::OBJECT

Fixes #1437

This PR removes the use of `Types::ARRAY` and `Types::OBJECT` as they were removed in Doctrine v4.0 (see doctrine/dbal@763b4ad).

Commits
-------

a456435 Remove mentions of undefined Doctrine constants Types::ARRAY and Types::OBJECT
  • Loading branch information
weaverryan committed Feb 5, 2024
2 parents dfa4737 + a456435 commit 3e01cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Doctrine/DoctrineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ public static function getPropertyTypeForColumn(string $columnType): ?string
{
return match ($columnType) {
Types::STRING, Types::TEXT, Types::GUID, Types::BIGINT, Types::DECIMAL => 'string',
Types::ARRAY, Types::SIMPLE_ARRAY, Types::JSON => 'array',
'array', Types::SIMPLE_ARRAY, Types::JSON => 'array',
Types::BOOLEAN => 'bool',
Types::INTEGER, Types::SMALLINT => 'int',
Types::FLOAT => 'float',
Types::DATETIME_MUTABLE, Types::DATETIMETZ_MUTABLE, Types::DATE_MUTABLE, Types::TIME_MUTABLE => '\\'.\DateTimeInterface::class,
Types::DATETIME_IMMUTABLE, Types::DATETIMETZ_IMMUTABLE, Types::DATE_IMMUTABLE, Types::TIME_IMMUTABLE => '\\'.\DateTimeImmutable::class,
Types::DATEINTERVAL => '\\'.\DateInterval::class,
Types::OBJECT => 'object',
'object' => 'object',
'uuid' => '\\'.Uuid::class,
'ulid' => '\\'.Ulid::class,
default => null,
Expand Down

0 comments on commit 3e01cf2

Please sign in to comment.