symfony-4.3

How to Decode JSON in Twig Symfony 4.3

随声附和 提交于 2020-01-16 01:19:05
问题 How to decode a JSON data in Twig this is my code in my controller public function testoutput($id) { $form = $this->getDoctrine() ->getRepository(ApplicationForm::class) ->findAll(); return $this->render('testoutput.html.twig', array('form' => $form));} My database looks like this. id | jsonData | dateSigned ===|================================= |============ 1 | {"fname":"Jan", "lname": "Jake"} | 10-09-2019 ===|==================================|=========== 2 | {"fname":"Mike", "lname": "Ham

Symfony update from 4.2 to 4.3 caused Web Profiler to break

本秂侑毒 提交于 2019-12-12 12:29:39
问题 I ran composer update and now am getting a slew of deprecation warnings: > [2019-06-03 18:08:41] request.INFO: Matched route "_wdt". > {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"9354bc"},"request_uri":"http://local > host:8080/_wdt/9354bc","method":"GET"} [] [2019-06-03 18:08:42] > request.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: > "Impossible to access an attribute ("nb_errors") on a string