Skip to content

[VarDumper] Backport handler lock when using VAR_DUMPER_FORMAT#37841

Merged
fabpot merged 1 commit intosymfony:4.4from
ogizanagi:lock-var-dumper-format
Aug 16, 2020
Merged

[VarDumper] Backport handler lock when using VAR_DUMPER_FORMAT#37841
fabpot merged 1 commit intosymfony:4.4from
ogizanagi:lock-var-dumper-format

Conversation

@ogizanagi
Copy link
Copy Markdown
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
Copy Markdown
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