Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(serializer): fix union types on collection denormalization
- Loading branch information
1 parent
42215cf
commit 1b102ef
Showing
3 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,11 @@ class Dummy | |
|
||
public Collection|iterable $relatedDummies; | ||
|
||
/** | ||
* @var Collection<int|float, RelatedDummy> | ||
*/ | ||
public Collection $relatedDummiesWithUnionTypes; | ||
Check failure on line 91 in src/Serializer/Tests/Fixtures/ApiResource/Dummy.php GitHub Actions / PHPStan (PHP 8.3)
|
||
|
||
/** | ||
* @var array|null serialize data | ||
*/ | ||
|
@@ -107,6 +112,7 @@ public static function staticMethod(): void | |
public function __construct() | ||
{ | ||
$this->relatedDummies = new ArrayCollection(); | ||
$this->relatedDummiesWithUnionTypes = new ArrayCollection(); | ||
} | ||
|
||
public function getId() | ||
|