Skip to content

Conversation

soyuka
Copy link
Contributor

@soyuka soyuka commented Jul 24, 2025

Q A
Branch? 7.3
Bug fix? yes
Issues Fix #60786
License MIT

The mapper would read uninitialized properties, for example this would throw trying to read name:

#[Map(target: FinalInput::class)] class PartialInput { public string $uuid; public string $name; public ?string $email; public ?string $website; } $p = new PartialInput; $p->uuid = '6a9eb6dd-c4dc-4746-bb99-f6bad716acb2'; $p->website = 'https://updated.website.com'; $mapper = new ObjectMapper(); $mapper->map($p);
@carsonbot

This comment was marked as resolved.

@mttsch
Copy link
Contributor

mttsch commented Jul 25, 2025

@soyuka As the description will be part of the commit message, there is a small typo:

$mapper->map($);

->

$mapper->map($p);
@soyuka soyuka changed the base branch from 7.4 to 7.3 July 25, 2025 06:20
@alexandre-daubois alexandre-daubois modified the milestones: 7.4, 7.3 Jul 25, 2025
Copy link
Contributor

@rvanlaak rvanlaak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this implementation resolves our problems. Thanks for addressing our issue @soyuka 🙌

@fabpot
Copy link
Member

fabpot commented Jul 26, 2025

Thank you @soyuka.

@fabpot fabpot merged commit 51ee4ed into symfony:7.3 Jul 26, 2025
10 of 11 checks passed
@fabpot fabpot mentioned this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment