Symfony 7: develop a structured web application
Learn to build an application with Symfony: routing, Twig, Doctrine, forms, security and services.
- 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
Refresher: objects in PHP
- Classes, interfaces and relations
- Namespaces and autoload
- Error and exception handling
- Typing and enums
- Composer
Key Symfony concepts
- Architecture and philosophy of the framework
- Project structure
- Routes and controllers
- Environments and configuration
- Debugging with the profiler toolbar
Create several static pages with controllers.
Twig and data with Doctrine
- Twig syntax, inheritance and components
- Entities, migrations and fixtures
- Doctrine queries
- Relations between entities
- Pagination
Display and manage entities in a database.
Advanced routing and assets
- Route parameters, constraints and priorities
- URL generation
- Asset management
- Twig structures and filters
- Custom error pages
Forms
- Form types
- Validation with constraints
- Forms bound to an entity
- File uploads
- Form themes
Generate and customize a CRUD.
Introduction to security
- Firewalls and user providers
- Registration and login
- Password hashing
- Access control by route
- CSRF protection
Services and dependency injection
- Service container
- Autowiring and configuration
- Creating your own services
- HTTP client to call APIs
- Parameters and environment variables
Events
- Event dispatcher
- Listeners and subscribers
- Core events
- Sending emails and notifications
- Best practices
Add processing triggered by events.
Authorization: roles and voters
- Role hierarchy
- Checking permissions in controllers and Twig
- Custom voters
- Security tests
- Access audit
Protect an administration area with voters.
Console commands and finalization
- Creating console commands
- Scheduled tasks
- Functional tests
- Deployment: checklist
- Review and next steps
Present the application and its technical choices.
Tools and technologies
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.


