Skip to content
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

Fixing a bug where the dump() function depended on bundle ordering #25824

Merged
merged 1 commit into from Jan 17, 2018

Conversation

Projects
None yet
4 participants
@weaverryan
Copy link
Member

commented Jan 17, 2018

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none
License MIT
Doc PR not needed

If DebugBundle is registered before TwigBundle, then the simpler dump() function wins over the fancy, var-dumper one from DebugBundle. In other words, you get different functionality based on the order in which you install libraries. To get the "bad" way, you can:

composer create-project symfony/skeleton show_bad_dump
cd show_bad_dump
composer require symfony/debug-bundle
composer require twig

Then create a Twig template with a dump() inside. It will use the less-fancy XDebug version.

I'm not sure if there's a more elegant fix for this or not... I have verified locally that this DOES fix the issue.

Thanks!

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Jan 17, 2018

@fabpot

fabpot approved these changes Jan 17, 2018

@fabpot

This comment has been minimized.

Copy link
Member

commented Jan 17, 2018

Thank you @weaverryan.

@fabpot fabpot merged commit 717663a into 2.7 Jan 17, 2018

4 of 5 checks passed

continuous-integration/appveyor/branch AppVeyor build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Jan 17, 2018

bug #25824 Fixing a bug where the dump() function depended on bundle …
…ordering (weaverryan)

This PR was merged into the 2.7 branch.

Discussion
----------

Fixing a bug where the dump() function depended on bundle ordering

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | not needed

If DebugBundle is registered *before* TwigBundle, then the simpler `dump()` function wins over the fancy, var-dumper one from DebugBundle. In other words, you get different functionality based on the *order* in which you install libraries. To get the "bad" way, you can:

```
composer create-project symfony/skeleton show_bad_dump
cd show_bad_dump
composer require symfony/debug-bundle
composer require twig
```

Then create a Twig template with a `dump()` inside. It will use the less-fancy XDebug version.

I'm not sure if there's a more elegant fix for this or not... I have verified locally that this DOES fix the issue.

Thanks!

Commits
-------

717663a Fixing a bug where the dump() function depended on bundle ordering

@nicolas-grekas nicolas-grekas deleted the weaverryan-patch-1 branch Jan 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.