-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined array key "compound" on liform->transform($form) #74
Comments
I forget when the ?? (null coalese) operator was introduced, but a simple fix would be
|
I've tracked this down to the transformers not being loaded during the compiler pass. I haven't solved it, and when I try to replicate the problem is a small and concise test it, it works. I hope to find it though, it's maddening. I'll also update the documentation at that time. |
I encounter also this same problem (after updating Symfony) that the transformers are not loaded duging the compiler pass. Any solutions yet ? |
I went down a refactoring path that fixed that (injecting the transformers
during the compiler pass), but broke something else in the process. I'm
traveling now, but when I get back I'll post what I did and where I'm stuck.
…On Tue, Jan 14, 2025 at 5:34 AM ewoutj ***@***.***> wrote:
I encounter also this same problem (after updating Symfony) that the
transformers are not loaded duging the compiler pass. Any solutions yet ?
—
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXIQKIR3C34TRPABOEEMT2KTR2XAVCNFSM6AAAAABKPN5AFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBZGU2TSOJZGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Just a heads up, i resolved it by using attributes. |
Very cool, I forgot about that! Can you submit a PR? |
Been trying for the longest time to solve this without any luck, so I'm writing this here as a last stand.
The following is one of the first controllers I've made, which is where i would be using Liform
But no matter what i try, it always comes back to the same error Undefined array key "compound" when i use $liform->transform.
I then went to the line where the issue happened and for some reason the types are not what I at least expected them to be.
So just for context, this is the function in resolver where it breaks. specifically here 'transformer' => $this->transformers['compound']['transformer'], which when looking at what it receives makes sense, if it's supposed to be an array of the different types anyway.
for further context, this is the Form which i am trying to transform.
But for some reason in Resolver.php, the $types array gets the following, instead of the actual types in the form.
[0]: 'category_create',
[1]: 'form'
If i am lucky enough to have anyone read this that might have an idea as to what could be the issue, please let me know, i am utterly lost.
The text was updated successfully, but these errors were encountered: