From a9aeafe0dc690e51227645a0e65f68e532bc3c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 3 Nov 2025 21:01:32 -0500 Subject: [PATCH] Deprecate ClassMetadata::isIdGeneratorUuid() --- src/Mapping/ClassMetadata.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mapping/ClassMetadata.php b/src/Mapping/ClassMetadata.php index 763d70cfa..d3e5c5ed0 100644 --- a/src/Mapping/ClassMetadata.php +++ b/src/Mapping/ClassMetadata.php @@ -2170,9 +2170,13 @@ public function isIdGeneratorIncrement(): bool /** * Checks whether the class will generate a uuid id. + * + * @deprecated Since 2.15, the UUID id generator is deprecated. Use GENERATOR_TYPE_AUTO with the UUID type instead. */ public function isIdGeneratorUuid(): bool { + trigger_deprecation('doctrine/mongodb-odm', '2.15', 'The method %s() is deprecated. Use GENERATOR_TYPE_AUTO with the UUID type instead.', __FUNCTION__); + return $this->generatorType === self::GENERATOR_TYPE_UUID; }