Chapter 12 of the Symfony for PHP developers track
The big night
6 exercises · 2,000 XP · about 6 h 15 min
ModelingEntities and relationsValidationMigrationsController and templatesFormsSecurityN+1 queriesBusiness ruleFormErrorTemplatedEmailJSON API#[MapRequestPayload]HTTP status codesStateless firewallConsole commandMailerIdempotencyFunctional testsCommandTester
The chapter's exercises
-
The specifications
Exercise 1 · 320 XP · 5 objectives checked by tests
Bruna has an idea for the winter evenings: story nights. A storyteller, a date, a number of seats, and travelers who sign up. Gorm has written the specifications. Your job is to build the feature, end to end, over the six exercises of this chapter.
ModelingEntities and relationsValidationMigrations
-
The story night poster
Exercise 2 · 320 XP · 5 objectives checked by tests
The story nights exist in the database. Now people need to hear about them, and Gorm needs to be able to schedule them.
Controller and templatesFormsSecurityN+1 queries
-
Sign-ups
Exercise 3 · 320 XP · 5 objectives checked by tests
The poster is drawing a crowd. Time for sign-ups.
FormsBusiness ruleFormErrorTemplatedEmail
-
The guilds join in
Exercise 4 · 320 XP · 5 objectives checked by tests
The guilds want their story nights too. They already have their magic scrolls to book a table: now they want to browse the story nights and sign up their members, without going through the website.
JSON API#[MapRequestPayload]HTTP status codesStateless firewall
-
The night before
Exercise 5 · 320 XP · 5 objectives checked by tests
Some guests forget their story night. Bruna wants a reminder to go out the night before, to everyone signed up for the next day's story nights. Gorm will run it every evening, and he is wary: nobody must get two reminders, even if he runs the command twice by mistake.
Console commandMailerMigrationsIdempotency
-
🐉 Boss: the big night
Exercise 6 · 400 XP · 6 objectives checked by tests
The story nights are ready: the poster, the scheduling, the sign-ups, the guilds' API, the reminders. On Saturday comes the big night: the first story night, with a full house.
Functional testsCommandTester