Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[VarDumper] Add dd() helper == dump() + exit() #26970
changed the title from
[VarDumper] Add dd() helper == dump() + die()
[VarDumper] Add dd() helper == dump() + exit()
Apr 18, 2018
Creating a macro in the IDE is part of the doc, not the framework, and not asked as much as
@kunicmarko20 Not everyone is always developing with an IDE, don't forget the notepad(++), Vim, atom etc developers. Also important to note down, is that the var-dumper can be used as stand-alone. Meaning if devs like the symfony
When you're comparing the full feature set of the var-dumper component vs other dumpers, then a dump and die functionality is quite common and desired. It takes a few lines to add the function, but adds a big feeling of completion for the developers that would otherwise have used a
I think it's quite nice to have a "full" solution coming from Symfony, making it even better
@nicolas-grekas @DojoGeekRA chrome 65 removed the need for an error code to render the preview that was introduced with 62 https://bugs.chromium.org/p/chromium/issues/detail?id=785050
Oh, a enem..., erm, a friend @taylorotwell here? Hey, let's drink coffee?
About function, I think that is best to be more verbosity, how
referenced this pull request
Apr 18, 2018
What a mess of a conversation just for a DX initiative that has been demanded for a long time, and still lots of arguments against.
I think this is part of the small changes that can really conciliate lots of dev communities and improve "classic" debug experience as well for people not using complex xdebug setups or full-stack IDEs. I mean, when one debugs using VIM, a simple
Apr 19, 2018
added a commit
this pull request
Apr 19, 2018
Lets be clear, a function/method/class should always have a name that describes it's purpose, it helps the developers and prevents mistakes.
dd, a or Foobar are not descriptive (unless you have a Bar named foo - insert Jonh Taffer meme here ) but it's important to understand why we use these undescriptive names, because it doesn't matter. Foobar is only used as an example for testing,
Clean Code is about production code and tests, not about simple hacks to find out why something isn't working. Not everyone has the power of a debugger, sometimes the debugger is not able to reach the code (actually happened to me a few time) or doesn't show all details (or the details are to verbose), by using the VarDumper you can easily solve this problem, and having a simple method to dump and prevent further execution is perfectly fine for development and troubleshooting.