[PR #8898] Throw exception NotSupported Exception for UuidGenerator with doctr… #11237

Open
opened 2026-01-22 16:10:07 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/8898

State: closed
Merged: Yes


Let's fix another issue:

ERROR: UndefinedMethod - lib/Doctrine/ORM/Id/UuidGenerator.php:33:59 - Method Doctrine\DBAL\Platforms\AbstractPlatform::getGuidExpression does not exist (see https://psalm.dev/022)
        $sql  = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression();

Method has been removed with https://github.com/doctrine/dbal/pull/3211.
Lets throw exception if method do not exists. Generator itself is already deprecated.

Questions:

  1. May it would be better to throw it in constructor?
  2. What about unit tests? Should we cover also this case?

It looks like there will be few similar issues, so let's start from this one to create a template for the next PRs :)

**Original Pull Request:** https://github.com/doctrine/orm/pull/8898 **State:** closed **Merged:** Yes --- Let's fix another issue: ``` ERROR: UndefinedMethod - lib/Doctrine/ORM/Id/UuidGenerator.php:33:59 - Method Doctrine\DBAL\Platforms\AbstractPlatform::getGuidExpression does not exist (see https://psalm.dev/022) $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression(); ``` Method has been removed with https://github.com/doctrine/dbal/pull/3211. Lets throw exception if method do not exists. Generator itself is already deprecated. Questions: 1. May it would be better to throw it in constructor? 2. What about unit tests? Should we cover also this case? It looks like there will be few similar issues, so let's start from this one to create a template for the next PRs :)
admin added the pull-request label 2026-01-22 16:10:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#11237