Skip to content

Make createEntity return nullable entity type - #7782

Open
zmitic wants to merge 1 commit into
EasyCorp:5.xfrom
zmitic:fix/allow_empty_data
Open

Make createEntity return nullable entity type#7782
zmitic wants to merge 1 commit into
EasyCorp:5.xfrom
zmitic:fix/allow_empty_data

Conversation

@zmitic

@zmitic zmitic commented Aug 9, 2026

Copy link
Copy Markdown

Allow users to use empty_data callable for form types. EntityDTO also allows null as a value for new instance.

Before this commit we could return null from createEntity, and let Symfony handle the rest and have strict static analysis.

Full example shown in issue #6957 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant