Skip to content

[ObjectMapper] update promoted properties w/ an object as target #61151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2025

Conversation

soyuka
Copy link
Contributor

@soyuka soyuka commented Jul 18, 2025

Q A
Branch? 7.3
Bug fix? yes
License MIT

When using promoted properties properties would not be mapped when the target was an object, this test case was failing:

    public function testUpdateObjectWithConstructorPromotedProperties(ObjectMapperInterface $mapper)
    {
        $a = new PromotedConstructorSource(1, 'foo');
        $b = new PromotedConstructorTarget(1, 'bar');
        $v = $mapper->map($a, $b);
        $this->assertSame($v->name, 'foo');
    }
    ```

@nicolas-grekas
Copy link
Member

Thank you @soyuka.

@nicolas-grekas nicolas-grekas merged commit a00793f into symfony:7.3 Jul 20, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants