Skip to content

Commit

Permalink
Fix criteria mapping type (#2610)
Browse files Browse the repository at this point in the history
* Fix criteria mapping type

* Ignore psalm issues

These new issues have been reported in vimeo/psalm#10578
  • Loading branch information
franmomu authored Feb 28, 2024
1 parent a51bfc0 commit 58c2b1f
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class ReferenceMany extends AbstractField
/** @var array<string, string|int> */
public $sort;

/** @var array<string, string> */
/** @var array<string, mixed> */
public $criteria;

/** @var int|null */
Expand All @@ -73,7 +73,7 @@ final class ReferenceMany extends AbstractField
* @param array<string, class-string>|null $discriminatorMap
* @param string[]|string|null $cascade
* @param array<string, string|int> $sort
* @param array<string, string> $criteria
* @param array<string, mixed> $criteria
* @param string[] $prime
*/
public function __construct(
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/ODM/MongoDB/Mapping/Annotations/ReferenceOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ final class ReferenceOne extends AbstractField
/** @var array<string, string|int> */
public $sort;

/** @var array<string, string> */
/** @var array<string, mixed> */
public $criteria;

/** @var int|null */
Expand All @@ -64,7 +64,7 @@ final class ReferenceOne extends AbstractField
* @param array<string, class-string>|null $discriminatorMap
* @param string[]|string|null $cascade
* @param array<string, string|int> $sort
* @param array<string, string> $criteria
* @param array<string, mixed> $criteria
*/
public function __construct(
?string $name = null,
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
* unique?: bool,
* index?: bool,
* index-name?: string,
* criteria?: array<string, string>,
* criteria?: array<string, mixed>,
* alsoLoadFields?: list<string>,
* order?: int|string,
* background?: bool,
Expand Down Expand Up @@ -147,7 +147,7 @@
* sparse?: bool,
* unique?: bool,
* index?: bool,
* criteria?: array<string, string>,
* criteria?: array<string, mixed>,
* alsoLoadFields?: list<string>,
* enumType?: class-string<BackedEnum>,
* storeEmptyArray?: bool,
Expand Down Expand Up @@ -193,7 +193,7 @@
* sparse?: bool,
* unique?: bool,
* index?: bool,
* criteria?: array<string, string>,
* criteria?: array<string, mixed>,
* alsoLoadFields?: list<string>,
* storeEmptyArray?: bool,
* }
Expand Down
Loading

0 comments on commit 58c2b1f

Please sign in to comment.