Skip to content

Commit

Permalink
Document alternative to Type::getName (#6077)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander M. Turek <me@derrabus.de>
  • Loading branch information
Tofandel and derrabus committed Jun 29, 2023
1 parent f5550bb commit 90469f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,13 @@ This method is unused by the DBAL since 2.0.

## Deprecated `Type::getName()`

This will method is not useful for the DBAL anymore, and will be removed in 4.0.
This method is not useful for the DBAL anymore, and will be removed in 4.0.
As a consequence, depending on the name of a type being `json` for `jsonb` to
be used for the Postgres platform is deprecated in favor of extending
`Doctrine\DBAL\Types\JsonType`.

You can use `Type::getTypeRegistry()->lookupName($type)` instead.

## Deprecated `AbstractPlatform::getColumnComment()`, `AbstractPlatform::getDoctrineTypeComment()`,
`AbstractPlatform::hasNative*Type()` and `Type::requiresSQLCommentHint()`

Expand Down
3 changes: 2 additions & 1 deletion src/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ abstract public function getSQLDeclaration(array $column, AbstractPlatform $plat
/**
* Gets the name of this type.
*
* @deprecated this method will be removed in Doctrine DBAL 4.0.
* @deprecated this method will be removed in Doctrine DBAL 4.0,
* use {@see TypeRegistry::lookupName()} instead.
*
* @return string
*/
Expand Down

0 comments on commit 90469f5

Please sign in to comment.