Objectives of the training
The objective of this training is to acquire the necessary knowledge of the Symfony framework in order to develop a server-side application that interacts with a database.Targeted audience
Computer scientistsPrerequisite
Des connaissances sur PHP sont nécessaires.Trainers
Course architecture
Introduction
• Introduction to Symfony
• Prerequisites for installing Symfony
• Demonstration – Configuring the web server
• Introduction to Composer
• Demonstration – Installing Composer and Cmder
• Choosing a coding tool
• Demonstration – Installing and configuring PHPStorm
• Symfony CLI
• Creating a Symfony project
• Project directories
• Using Git with Symfony
Hello World
• Routes and controllers
• Introduction to the Twig template engine
Views and Twig
• Module objectives
• Introduction to Twig
• Delimiters
• Tags
• Filters
• Blocks, inheritance, and inclusion
• Asset and URL management
• Passing variables to the view
• XSS attacks
Routing and controllers
• Module objectives
• Routes
• Routes as attributes
• Routes and the console
• Controllers
• Debugging
Data and Doctrine
• Problems encountered with data
• Configuring Doctrine
• Entities
• The EntityManager
• Fixtures
• Demonstration – Fixtures and Faker
• The Repository
• DQL and QueryBuilder
Forms
• Introduction to forms
• Form class
• Displaying a form
• Displaying a form in Twig
• Using a theme
• Processing a form
• Data validation
• Security: CSRF attacks
Doctrine: relationships between entities
• The ManyToOne/OneToMany relationship
• The ManyToMany relationship
• The OneToOne relationship
• Relationships between PHP objects
• Relationships with Doctrine
• Demonstration – Defining relationships between entities
• Using fixtures with relationships
• Retrieving an entity associated with another
• Manipulating associated entities
Users and security
• The Symfony security system
• The user entity
• The authentication system
• The registration form
• Authorization and roles
• Role hierarchy
• Other security features
Services
• Introduction to services
• Dependency injection and service container
• Demonstration – Adding dependencies
API
• Module objectives
• What is an API?
• The HTTP protocol
• The JSON format
• Postman (installation and quick overview)
• The Serializer component
• Demonstration – Manipulating an existing API
• Creating an API
• REST API
• Demonstration – Setting up a CRUD
• Validating data
• Demonstration – Validating data in an API
• The API Platform component
• Security
• JSON Web Token (JWT)
• Demonstration – Setting up JWT authentication
Tests
• Module objectives
• Overview
• Setup
• Demonstration – Setting up the environment
• Unit tests
• Simulating objects (stubs/mocks)
• Demonstration – Mocking a dependency
• Integration tests
• Functional or application tests
• Functional tests (API)
• End-to-end (E2E) tests
• Code coverage
• Test base issues
Deployment
• Symfony environments
• Demonstration – Customizing error pages
• Deployment
• Going further
Voting
• Why use Voters?
• Creating a Voter
• Using in a controller with an attribute
• Changing the message and status code in a controller
• Using in a Twig file
The Console component
• The Console component
• Console Output
• Console Input
• Question Helper
• Bonus: a crawler in console mode
Training Notes
100% remote training. Accessible anytime, anywhere. One year of access to training and digital manual.
Private or personalized training
If you have more than 8 people to sign up for a particular course, it can be delivered as a private session right at your offices. Contact us for more details.
Request a quotePrivate or personalized training
If you have more than 8 people to sign up for a particular course, it can be delivered as a private session right at your offices. Contact us for more details.
Request a quote