From f88b0032ad7f89292ca3dcbe57f723d426048425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 17 Jan 2023 16:25:51 +0100 Subject: [PATCH] Use correct type for FieldMapping#unique Looking at usages in the codebase, it is supposed to be at least bool|string, but not string. When dumping the value inside `getFieldMapping`, it is always a boolean. --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index bc30da69ec7..48e9eb2ecf7 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -82,7 +82,7 @@ * columnDefinition?: string, * precision?: int, * scale?: int, - * unique?: string, + * unique?: bool, * inherited?: class-string, * originalClass?: class-string, * originalField?: string, @@ -536,7 +536,7 @@ class ClassMetadataInfo implements ClassMetadata * - scale (integer, optional, schema-only) * The scale of a decimal column. Only valid if the column type is decimal. * - * - 'unique' (string, optional, schema-only) + * - 'unique' (boolean, optional, schema-only) * Whether a unique constraint should be generated for the column. * * - 'inherited' (string, optional)