Closed sadikoff closed 6 months ago
With #37 merged, there is still a problem with easyadmin?
Hey @kbond,
EasyAdmin has a mechanism to change the entity creation process, so it's not a big problem and can be bypassed with one little method in CrudController
Cheers!
Ok, can this pr be closed?
Hi @kbond
Trying to use the latest version of bundle with PHP8 support we got some bugs =) And this PR should fix all of them I hope.
The main issue was that trying to create an empty object with the form on the project I got a TypeError that I can't assign
null
to a property defined asstring
. It's really legit so I looked closer in the code and found that if I create anRedirect
with empty string''
data, thensetSource()
method converts empty string tonull
and then it fails because$source
property is defined as non-nullable... and so onAlso, I got some issues with EasyAdmin because EA instantiates entity with an empty constructor, so I decided to improve this part of the code, and move constructor logic to static
create
methods.Cheers!