Skip to content

Commit

Permalink
Use correct type for FieldMapping#unique
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greg0ire committed Jan 17, 2023
1 parent de7eee5 commit f88b003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
* columnDefinition?: string,
* precision?: int,
* scale?: int,
* unique?: string,
* unique?: bool,
* inherited?: class-string,
* originalClass?: class-string,
* originalField?: string,
Expand Down Expand Up @@ -536,7 +536,7 @@ class ClassMetadataInfo implements ClassMetadata
* - <b>scale</b> (integer, optional, schema-only)
* The scale of a decimal column. Only valid if the column type is decimal.
*
* - <b>'unique'</b> (string, optional, schema-only)
* - <b>'unique'</b> (boolean, optional, schema-only)
* Whether a unique constraint should be generated for the column.
*
* - <b>'inherited'</b> (string, optional)
Expand Down

0 comments on commit f88b003

Please sign in to comment.