-
Notifications
You must be signed in to change notification settings - Fork 11k
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.7] Remove dd() helper #25087
Merged
Merged
[5.7] Remove dd() helper #25087
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👍 |
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Sep 21, 2018
…(SjorsO) This PR was merged into the 4.2-dev branch. Discussion ---------- [VarDumper] Allow dd() to be called without arguments | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | **Description** A while back the `dd()` helper was [added to the VarDumper component](#26970) which was (i think) inspired by Laravel's `dd()` helper. Laravel has [removed their version of the helper](laravel/framework#25087) in favor of the helper in Symfony. However, as opposed to the Laravel helper, the Symfony helper requires at least one argument. Calling the Laravel helper with no arguments simply killed the program (and usually showed a white screen), calling the Symfony helper with no arguments throws a `TypeError: Too few arguments to function dd()` exception (which gets rendered by the error handler and fills the whole screen with useless information). Being able to call the `dd()` helper with no arguments is useful because it is a quick way to tell you if your code reaches a certain point. If it does, you can fill in the `dd()` with variables to keep debugging. This PR allows the dd helper to be called without arguments. This PR also makes the helper call `die` instead of `exit` to better reflect the function name 😄 Commits ------- a73dfad [VarDumper] Allow dd() to be called without arguments
datune
added a commit
to datune/october
that referenced
this pull request
Mar 24, 2020
LukeTowers
pushed a commit
to octobercms/october
that referenced
this pull request
Mar 24, 2020
LukeTowers
pushed a commit
to octoberrain/cms
that referenced
this pull request
Mar 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup from #25086.