wip: modernized edit flow
This commit is contained in:
@@ -11,6 +11,7 @@ use App\Validator\Constraints as AppAssert;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[AppAssert\Participant(groups: ['booking_edit', 'booking_create_step_2'])]
|
||||
#[AppAssert\ApplicantAddress(groups: ['booking_create_step_2'])]
|
||||
class ParticipantDto
|
||||
{
|
||||
/**
|
||||
@@ -132,6 +133,12 @@ class ParticipantDto
|
||||
$instance->weight = $personalData->weight;
|
||||
$instance->shoeSize = $personalData->shoeSize;
|
||||
|
||||
// Clone address to prevent shared object references that could cause mutations
|
||||
$instance->address = null !== $personalData->address ? clone $personalData->address : null;
|
||||
|
||||
$instance->remarksRoom = $personalData->remarksRoom;
|
||||
$instance->licensePlate = $personalData->licensePlate;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user