Back-end & frameworks

Symfony 7: develop a structured web application

Learn to build an application with Symfony: routing, Twig, Doctrine, forms, security and services.

Request this program
Duration
35 h · 5 days
Level
Intermediate
Format
On site · Remote · Blended
Max. group size
12 participants

Overview

This program lets you become autonomous on Symfony 7. It starts with a refresher on object-oriented programming in PHP, then covers routing, controllers, Twig, Doctrine, forms, security, dependency injection, events and console commands. Participants build a complete application end to end.

Who this program is for

  • PHP developers wishing to adopt a framework
  • Back-end developers from other languages
  • Teams migrating to Symfony

Prerequisites

  • Good command of the PHP language
  • Notions of SQL

Learning objectives

  • Install a Symfony project and understand its structure
  • Create routes, controllers and Twig templates
  • Manage data with Doctrine
  • Build forms and validations
  • Secure access: authentication, roles and voters
  • Use services, events and console commands

Detailed curriculum

10 modules · 35 h · 5 days

Day 1
Refresher: objects in PHP3.5 h
50% theory · 50% practice
  • Classes, interfaces and relations
  • Namespaces and autoload
  • Error and exception handling
  • Typing and enums
  • Composer
Key Symfony concepts3.5 h🛠 1 workshop
30% theory · 70% practice
  • Architecture and philosophy of the framework
  • Project structure
  • Routes and controllers
  • Environments and configuration
  • Debugging with the profiler toolbar
🛠 Hands-on workshops
First pages1.5 h

Create several static pages with controllers.

✅ Deliverable : A static-page site
Day 2
Twig and data with Doctrine3.5 h🛠 1 workshop
30% theory · 70% practice
  • Twig syntax, inheritance and components
  • Entities, migrations and fixtures
  • Doctrine queries
  • Relations between entities
  • Pagination
🛠 Hands-on workshops
Catalog in the database2 h

Display and manage entities in a database.

✅ Deliverable : A catalog fed by Doctrine
Advanced routing and assets3.5 h
50% theory · 50% practice
  • Route parameters, constraints and priorities
  • URL generation
  • Asset management
  • Twig structures and filters
  • Custom error pages
Day 3
Forms3.5 h🛠 1 workshop
30% theory · 70% practice
  • Form types
  • Validation with constraints
  • Forms bound to an entity
  • File uploads
  • Form themes
🛠 Hands-on workshops
Full CRUD2 h

Generate and customize a CRUD.

✅ Deliverable : A polished CRUD module
Introduction to security3.5 h
50% theory · 50% practice
  • Firewalls and user providers
  • Registration and login
  • Password hashing
  • Access control by route
  • CSRF protection
Day 4
Services and dependency injection3.5 h
50% theory · 50% practice
  • Service container
  • Autowiring and configuration
  • Creating your own services
  • HTTP client to call APIs
  • Parameters and environment variables
Events3.5 h🛠 1 workshop
30% theory · 70% practice
  • Event dispatcher
  • Listeners and subscribers
  • Core events
  • Sending emails and notifications
  • Best practices
🛠 Hands-on workshops
React to events1.5 h

Add processing triggered by events.

✅ Deliverable : Documented listeners
Day 5
Authorization: roles and voters3.5 h🛠 1 workshop
30% theory · 70% practice
  • Role hierarchy
  • Checking permissions in controllers and Twig
  • Custom voters
  • Security tests
  • Access audit
🛠 Hands-on workshops
Secure administration area2 h

Protect an administration area with voters.

✅ Deliverable : A secured back office
Console commands and finalization3.5 h🛠 1 workshop
30% theory · 70% practice
  • Creating console commands
  • Scheduled tasks
  • Functional tests
  • Deployment: checklist
  • Review and next steps
🛠 Hands-on workshops
Defense1 h

Present the application and its technical choices.

✅ Deliverable : A presented application

Tools and technologies

ComposerDoctrine ORMMySQLPHPSymfonyTwigVisual Studio Code

Teaching methods

  • Alternating short lectures and hands-on work
  • Live demonstrations by the trainer
  • Capstone project built throughout the modules
  • Group corrections and discussion of best practices

Assessment

  • Hands-on exercises corrected in each module
  • Mini-project completed at the end of the course
  • Knowledge-check quiz

Required equipment

  • A computer with an internet connection
  • PHP 8, Composer, the Symfony command-line tool and a database server

Resources provided

  • Course materials and repository of corrected exercises

Career outcomes

  • A secure Symfony application with a database
  • A framework working method
  • Ability to continue independently

Related video courses

My video courses that go with this program, to get ready for the training or to review afterwards. Free with an account.