Practice
Use a feature, right now
Short exercises, separate from the tracks: code written the old way, to rewrite with the feature. Often something new in the framework, sometimes a specific point worth a closer look.
- 64 exercises
- 55 new features
Earlier
20- Symfony Keeping both sides of a OneToMany relation in sync Adding an item to an order's collection doesn't save it: Doctrine only reads the owning side, the ManyToOne. DoctrineRelationsOneToMany Do the exercise
- Symfony Setting the style of EasyAdmin badges EasyAdmin badges separate the color (color) from the style (variant); since 5.8, the style is set at once for the whole back office or for a single CRUD controller. EasyAdminTwig Do the exercise
- Symfony Filtering on the properties of a related entity with EasyAdmin EasyAdmin 5.8 guesses the type of a filter set on a related property ("patient.contact.country"): no need to declare it anymore. EasyAdminDoctrine Do the exercise
- Symfony 8.2 New Describe the tools of an AI agent with JsonSchema The JsonSchema component reads the schema of the arguments from a method signature: types, default values, PHPDoc and constraints, without a hand-written schema that drifts. JsonSchema Do the exercise
- Symfony 8.2 New Validate a cron expression for real The Cron constraint parses the expression instead of checking its shape: 60 * * * * is rejected, and three modes tell whether aliases and the Scheduler's "#" are allowed. Validator Do the exercise
- Laravel 13.36 New Don't send the email of a cancelled order A queued mailable now honours #[DeleteWhenMissingModels]: if its order has disappeared in the meantime, the job is removed instead of failing. MailQueues Do the exercise
- Symfony 8.2 New Change a secret without breaking the links already sent The secret of framework.uri_signer accepts a list: the first one signs new links, all of them check the ones still around. HttpFoundationSecurity Do the exercise
- Laravel 13.35 New Stop a long command cleanly with schedule:interrupt schedule:interrupt timestamps its signal, and hasBeenInterruptedSince() reads it: a long command stops between two batches, without cutting the current one. ConsoleScheduling Do the exercise
- Symfony 8.2 New Log out with a button, not with a link logout_button() renders a POST logout form, CSRF token included: a link followed by a bot no longer logs anyone out. SecurityCSRFTwig Do the exercise
- Laravel 13.38 New See what you just wrote right away, despite the replica The PreventStaleDatabaseReads middleware sends a visitor's reads to the primary database right after they wrote, and DB::usingWritePdo() does it for a block of code. DatabaseMiddleware Do the exercise
- Symfony 8.2 New A link in a translation, without raw The trans_html filter replaces the pseudo-tags of a translation with HTML declared in the template, and escapes everything else, parameters included. TranslationTwigSecurity Do the exercise
- Laravel 13.36 New Validation rules without parameter strings Every validation rule now has its Rule:: method: the editor completes them, and a value that contains a comma is no longer cut in two. Validation Do the exercise
- Symfony 8.2 New One import at a time, with #[Lock] #[Lock] puts a lock on a controller: a concurrent request gets a 409, and reads can share a lock between them. HttpKernelLock Do the exercise
- Laravel 13.35 New Computed default values with defaults() The HasDefaultAttributes trait gives the model a defaults() method: default values that can read the configuration or the clock, as soon as new Abonnement runs. Eloquent Do the exercise
- Symfony 8.2 New Finding a patient by an encrypted email address #[BlindIndexed]: a keyed fingerprint, filled on flush, makes an encrypted column searchable when no WHERE can find it. DoctrineEncryption Do the exercise
- Symfony 8.2 New Describing a workflow with attributes #[AsWorkflow] and #[Transition]: the state machine, its transitions and its guards fit in a single class instead of a YAML file. WorkflowGuards Do the exercise
- Symfony 8.2 New Ask for the right factor again instead of a 403 Vote::requestReAuthentication(): your voter can send the user to a new authentication, and the entry point chooses which one. Security Do the exercise
- Laravel 13.35 New Serving a page as Markdown with response()->markdown() response()->markdown() returns Markdown with the right content type, text/markdown, for the readers and agents that ask for it. ResponsesHTTP Do the exercise
- Symfony 8.2 New Require an SMS code before a transfer AuthenticationMethodBadge and getAuthenticationProofs(): the token remembers how the user authenticated, and a voter can require a second factor. Security Do the exercise
- Laravel 13.35 New Checking an event's contents with an array of properties assertDispatched() and assertPushed() accept an array of expected properties instead of a callback. TestingEventsQueues Do the exercise
No account needed for these exercises: the editor opens right away. An account keeps your progress and unlocks the mentor and feedback. Create yours or log in.