Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #20621 [HttpKernel] Fix exception when serializing request attrib…
…utes (nicolas-grekas) This PR was merged into the 3.2 branch. Discussion ---------- [HttpKernel] Fix exception when serializing request attributes | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Serializing request attributes obviously fails easily since once can put anything there (I've just got an "Exception: Serialization of 'Closure' is not allowed"). Yet, we don't need attributes when forging a request to feed the TraceableUrlMatcher in RouterController. Well, technically one could for sure register a listener before the router to add an attribute to the request, then use that in the url matcher. But, it makes no sense. And if it were to have, the profiler is already broken in this respect because in e.g. 3.1, the attribute array that is used here has already been processed by the ValueExporter. So the original values have already been altered. Let's just handle request attributes as all the other collected data: using var dumper. Commits ------- 2e404d0 [HttpKernel] Fix exception when serializing request attributes
- Loading branch information