🐉 Boss: trouble in the kitchen

Exercise 8 of 8 in chapter 1 · 200 XP · 5 objectives checked by tests

Topics covered: DebuggingError pagesProfiler

Gorm went off to the troll fair for two days and left the website to his nephew, Pippin. Pippin “improved a couple of things”. Result: nothing works anymore, adventurers are lining up in front of an error page, and a customer swears he ordered a grilled unicorn… and got served one.

Your mission

Get the tavern back up and running. Three bugs are hiding in the code: find them and fix them.

No step-by-step instructions this time, only symptoms. Your best ally: Symfony's error page, in the preview. It gives the exception type, a clear message, and the stack trace leading to the faulty file and line.

Detective method

  1. Read the error title: it often says it all.
  2. Find the first file in the stack trace that belongs to you (not vendor/).
  3. Fix it, check the preview, start again.
  4. Beware of silent bugs: a page that displays is not necessarily a correct page.

No pressure, but the dragon on the sign is starting to smoke.