From cc59787aa3143d93d51f66a7cf173a14aabcb369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 16 Nov 2018 00:58:04 +0100 Subject: [PATCH] Check if lateCollect exists --- Tests/ProfilerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/ProfilerTest.php b/Tests/ProfilerTest.php index acb889c75..158341d2d 100644 --- a/Tests/ProfilerTest.php +++ b/Tests/ProfilerTest.php @@ -73,7 +73,9 @@ public function testRender() // This is only needed for WebProfilerBundle=3.2, remove when support for it is dropped $requestCollector = new RequestDataCollector(); $requestCollector->collect($request, $response); - $requestCollector->lateCollect(); + if (method_exists($requestCollector, 'lateCollect')) { + $requestCollector->lateCollect(); + } $profile->addCollector($requestCollector); $output = $this->twig->render('db.html.twig', [