Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #28904 [Serializer] fix MetadataAwareNameConverter break denormal…
…ization (Britaliope) This PR was merged into the 4.2-dev branch. Discussion ---------- [Serializer] fix MetadataAwareNameConverter break denormalization | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - During denormalization of an object, the `normalize` function of the `MetadataAwareNormalizer` is called to find the serialized name of constructor arguments. This do not work if the constructor argument is not in the serialized representation of the object (for example given with a `default_constructor_arguments` option ). **Checklist** - [x] Add test to cover the bug Commits ------- faf8b00 [Serializer] fix MetadataAwareNameConverter break denormalization
- Loading branch information
Showing
3 changed files
with
60 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
31 changes: 31 additions & 0 deletions
31
src/Symfony/Component/Serializer/Tests/Fixtures/NotSerializedConstructorArgumentDummy.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,31 @@ | ||
<?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 NotSerializedConstructorArgumentDummy | ||
{ | ||
private $bar; | ||
|
||
public function __construct($foo) | ||
{ | ||
} | ||
|
||
public function getBar() | ||
{ | ||
return $this->bar; | ||
} | ||
|
||
public function setBar($bar) | ||
{ | ||
$this->bar = $bar; | ||
} | ||
} |
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