fix serializing Parameters as yaml #44749
Merged
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.
Summary
This has been broken since the logging context was added in
6be9c49
Also added a higher level test to ensure that this isn't broken again in
the future.
Other Information
The test isn't perfect, as the anonymous class causing the error doesn't seem to exist in the test case. (It's somewhere around
ActionDispatch::Routing::RouteSet::NamedRouteCollection
based on printing@emitter.instance_variable_get(:@stack)
in a debugger). So instead of testing thatto_yaml
doesn't error, I tested the actual output, which I think is also reasonable (since the logging context should not be in the output)Fixes #44743