Skip to content

Commit

Permalink
Allow fields containing null-safe property paths
Browse files Browse the repository at this point in the history
  • Loading branch information
alshenetsky authored Apr 8, 2024
1 parent df81f10 commit 9d07755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Type/CrudFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
// 'property_path' option to keep the original field name
if (str_contains($fieldDto->getProperty(), '.')) {
$formFieldOptions['property_path'] = $fieldDto->getProperty();
$name = str_replace(['.', '[', ']'], '_', $fieldDto->getProperty());
$name = str_replace(['.', '[', ']', '?'], '_', $fieldDto->getProperty());
} else {
$name = $fieldDto->getProperty();
}
Expand Down

0 comments on commit 9d07755

Please sign in to comment.