Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[VarDumper] Backport handler lock when using VAR_DUMPER_FORMAT #37841

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

Merged
merged 1 commit into from
Aug 16, 2020
Merged

[VarDumper] Backport handler lock when using VAR_DUMPER_FORMAT #37841

merged 1 commit into from
Aug 16, 2020

Conversation

ogizanagi
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

Backport of the "lock" behavior from #35967, preventing unexpected handler change when using the VAR_DUMPER_FORMAT env var.


As a concrete example of this not working as expected:
Start a PHPUnit test suite with this env var to the desired format. If a web test case is making a request (with debug enabled), the DebugBundle replaces the handler set initially by the VAR_DUMPER_FORMAT, will collect dumps into the profiler, but won't output these.
As well, for dumps made in between the the kernel is boot (DebugBundle::build() is called) and a request, the dumps are properly sent to the output with expected format, but looses colors.

IMHO, the use-cases of VAR_DUMPER_FORMAT justifies locking the handler for the whole process.

@ogizanagi ogizanagi changed the title [Messenger] Fix BC layer for stamps moved into separate packages [VarDumper] Backport handler lock when using VAR_DUMPER_FORMAT Aug 14, 2020
@fabpot
Copy link
Member

fabpot commented Aug 16, 2020

Thank you @ogizanagi.

@fabpot fabpot merged commit 7f2726a into symfony:4.4 Aug 16, 2020
@ogizanagi ogizanagi deleted the lock-var-dumper-format branch August 16, 2020 07:15
This was referenced Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants