-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[5.4] Don't reverse the pushed data #16325
[5.4] Don't reverse the pushed data #16325
Conversation
I feel like we must have been doing this for a reason? 😄 |
@taylorotwell I originally thought that, but the change that introduced the reversal didn't explicitly state why. |
Would like to get to the bottom of that if possible. |
@mark86092 can you let us know why you introduced an array_reverse on the push? |
Pinging @mark86092? |
Oh, you beat me. |
Wait me a moment, I'll reply soon |
The reason goes to several statements:
The first is child --> then parent --> then the grand parent blade template with So, the PR #12808 's tests use the
I would expect the Reason from 1) and 2)So, I think when render the Making the parent's push content (i.e. |
During the investigation of the reason, I found that in |
@jbrooksuk any thoughts on that? 😄 |
I tend to agree with removing this. It becomes more apparent the behavior is wrong when you use something like the new 5.4 components and slots... your pushes are in reverse order when you dump them in that situation. |
I think there are situations where the array_reverse behavior makes sense but perhaps it needs to be thought out more. To me |
Sorry, @taylorotwell I missed your message. But yeah, slots would make the reverse weirder. |
From my point of view the 5.3 order was better (maybe not correct but better). For the moment i fixed my error using prioritized yields for the scripts that need to be loaded first but this doesn't feel nice at all. Any ideas how to work arround this? |
Closes #14876