Closed makopov closed 1 month ago
Some ideas:
Hey there thanks for the reply. I'll answer these inline..
new User()
, no attributes defiend, just an empty object. This is the weirdest part about it.Hm. Weird. Which trait do you use exactly?
Just the AsAction
Have you tried debugging it with xDebug? Do you have a repo (prefered with a Dockerfile) where I can try to reproduce it?
I do not. I can try to set something up.
Could you show more code? like the parent's construct initialization?
Could you show more code? like the parent's construct initialization?
I haven't had time to look at this yet, but its on my list to get to soon as my temporary solution will hit its ceiling.
Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.
I observed some odd behavior when trying to store a passed in variable.
My constructor in the base class assigns a variable, but when the child class goes to evaluate it, its only got an empty object. Here's an example:
Base Class:
Then the child class:
I call this like so
but I've also done
And the result is the same.
This will print an empty user object with no attributes. So its doing the assignment. If I do the dd in the constructor it will have all the data, but only when its called from other functions does it come out empty.
I've tried many variations of this. But ultimately when taking out the trait does this work normal.