-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #31438 [Serializer] Fix denormalization of object with variadic c…
…onstructor typed argument (ajgarlag) This PR was squashed before being merged into the 3.4 branch (closes #31438). Discussion ---------- [Serializer] Fix denormalization of object with variadic constructor typed argument | Q | A | ------------- | --- | Branch? | 3.4 up to 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31436 | License | MIT This PR adds a test to demonstrate the bug, and a fix to squash it. Commits ------- c8c3c56 [Serializer] Fix denormalization of object with variadic constructor typed argument
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
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
27 changes: 27 additions & 0 deletions
27
src/Symfony/Component/Serializer/Tests/Fixtures/VariadicConstructorTypedArgsDummy.php
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Serializer\Tests\Fixtures; | ||
|
||
class VariadicConstructorTypedArgsDummy | ||
{ | ||
private $foo; | ||
|
||
public function __construct(Dummy ...$foo) | ||
{ | ||
$this->foo = $foo; | ||
} | ||
|
||
public function getFoo() | ||
{ | ||
return $this->foo; | ||
} | ||
} |
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