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

64 exercises · 21 to 40

Sort: Recent Title

By title

20
  1. 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
  2. Symfony 8.2 New Describing a form with attributes A form's fields are declared on the DTO, right next to the validation constraints: no more form class for simple cases. FormsDTO Do the exercise
  3. 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
  4. Symfony 8.2 New Docker-style sub-commands tenant --name=acme users list: the group carries the option once, each sub-command reads it from the command chain. Console Do the exercise
  5. 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
  6. Symfony 8.2 New Encrypting the sensitive columns of an entity #[Encrypted]: Doctrine encrypts a column before writing it and decrypts it when reading, with no custom type or listener. DoctrineEncryption Do the exercise
  7. 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
  8. Symfony Filtering without truncating collections A WHERE on a join loaded with addSelect() leaves collections incomplete, and they stay that way in the EntityManager. EXISTS filters without cutting anything. DoctrineRelationsQueryBuilderN+1 queries Do the exercise
  9. 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
  10. Laravel 13.30 New Grouping adjacent items with chunkBy() Consecutive messages from the same author are grouped into one line, without a loop or a tracking variable. Collections Do the exercise
  11. Symfony 8.2 New Grouping the steps of a multi-step form Symfony 8.2 nests the steps of a form flow: createStepGroup() brings the company and billing steps together, and a single setSkip() skips both for an individual. Forms Do the exercise
  12. Laravel 13.26 New Handling only the last event of a burst with #[DebounceFor] A queued listener with #[DebounceFor] waits for the burst to end and handles only the last event, where ShouldBeUnique kept the first one. QueuesEvents Do the exercise
  13. Symfony 8.2 New Help text under each choice, with choice_help choice_help gives each radio button its own help text, linked by aria-describedby: short labels, and explanations that screen readers read with the right choice. FormsAccessibility Do the exercise
  14. 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
  15. Symfony 8.2 New Let a ValidationFailedException bubble up An uncaught ValidationFailedException now gives a 422 with the list of violations: no more need to wrap it. ValidatorAPI Do the exercise
  16. Symfony 8.2 New Listeners that position themselves relative to each other #[AsEventListener(after: …, before: …)]: the order of listeners is stated by their names, no longer by guessed priorities. EventDispatcher Do the exercise
  17. 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
  18. Laravel 13.26 New Migrating files as they are read with read-through A read-through disk reads the new storage, falls back to the old one and copies over what it finds there: the migration happens by itself. Storage Do the exercise
  19. Laravel 13.32 New Moving a file from one disk to another with moveToDisk() copyToDisk() and moveToDisk() stream a file from one disk to another, without loading it into memory. Storage Do the exercise
  20. Symfony Never replace a Doctrine collection With orphanRemoval, a setItems() that replaces the collection wipes every item in the database, even the ones passed back to it. An adder keeps them. DoctrineRelationsOneToMany Do the exercise