-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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.6] Yet another blade helper @dump #22294
Conversation
Thanks, but 👎. I don't see the need for this, the original code you posted there looks fine. |
Well, currently both 'dd' and 'dump' methods (that are related to output debug data), as I remember, are fine:
By are they really not okay at views? I do feel dissonance about this. |
Those methods aren't supported by everyone either. I dislike them and would like them removed. You cannot argue that since there's some weird part of the framework in once place, you can add more weird parts to another area. |
I can definitely argue that if someone prefer another way, they are free not to use them at all, due they all are optional. Think of them as kind of weird on not is the all about personal tastes. Also, I can notice that Laravel in fact is tightly integrated with Symfony's var-dumper component for a very long time by now. :) |
Going to hold off on this for now. :) |
Okay. But pretty sure someone will attempt to pull in a thing like this again sooner or later. :) |
@dd should never have been merged either. |
You mean #22293, and I agree that it shouldn't have been merged. This only shows to the randomness of the selection process. And the main argument seem to be "Eh, it's fine I guess [...]" |
Can't we create a simple library where you have all these "extra" blade helpers. Or even can list all the ones you want... I feel like there is a road in between, one where everyone can add stuff like |
I find it effing annoying how |
Code size is often ignored, but for some people running their production code on old hardware or embedded systems, these seemingly minute changes can be a big help. |
@36864 Please don't tell me you are either using I'm also really doubting if removing characters would drastically improve the performance. If you are really interested in performance gains, try experimenting with object references and loop optimisations. Of course Laravel should definitely be runnable on older or "lesser fortunate" hardware, but I don't think we are gaining any performance by adding these blade directives. |
@36864 so you want to save 5 chars but add 2 functions to support this? |
In retrospect, I should not have attempted sarcasm before having my morning coffee. I was trying to find a logical reason for adding Sorry. |
Don't be sorry, healthy discussions are actually great! And maybe if somebody feels inspired by this he or she can come up with another point. |
It's just that stuff like this makes the core overly bloated. There's already too many helpers no one would need if they knew plain PHP, how strange it may be. |
In recent versions of Symfony the So doing this in a view So it might make sense to have a |
Or just Or just ignore the gibberish since it's just a debugging tool and you can easily identify what you dumped vs what gets echoed afterwards. |
Yeah, or even use the Blade version of |
Heh, it was pulled in, but in different PR - #23364. |
Are you kidding me -.- |
Why don't we also have a
@dump
helper along with@dd
in our blade views? ;)Example:
It simply passes all given arguments to
dump
function and then prints the output.No more old school dumping like so
{{ dump() }}
.