Symfony 4 & 5 Web Development Guide: Beginner To Advanced
4.3 (612 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,169 students enrolled

Symfony 4 & 5 Web Development Guide: Beginner To Advanced

Master Symfony PHP framework: from theory, through simple crud app, up to creating an advanced Real Life Application
Bestseller
4.3 (612 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,168 students enrolled
Last updated 1/2020
English
English [Auto-generated]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 24 hours on-demand video
  • 11 articles
  • 271 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • You will create two apps: simple crud app and an advanced video sharing service with PayPal integration, deployment to Heroku etc.
  • You will learn Symfony 4 & 5 from theory to advanced level by creating real life projects
  • You will learn how to create multilevel nested categories tree in PHP
  • You will learn how to install Symfony
  • You will learn about Symfony configuration
  • You will learn about Symfony Flex
  • You will learn about HTTP processing workflow in Symfony framework
  • You will learn routes
  • You will learn controllers
  • You will learn views in Symfony using Twig
  • You will learn html forms in Symfony
  • You will learn Doctrine ORM (how to use database)
  • You will learn entities (models) in Symfony and relations between them
  • You will learn about service container & services in Symfony
  • You will learn dependency injection (autowiring in Symfony)
  • You will learn console command
  • You will learn how to create events and listeners
  • You will learn how to use sessions & cookies in Symfony
  • You will learn how to send emails
  • You will learn how to do translations in Symfony
  • You will learn about security concepts in Symfony (login, registration, etc.)
  • You will learn unit & functional testing
  • You will learn about debugging Symfony applications
  • You will learn about cache
  • You will learn how to use Redis for session and cache
  • You will learn about doctrine table inheritance in Symfony & polymorphic database queries
  • You will learn how to deploy a Symfony application to Heroku (make application online)
  • You will learn how to integrate PayPal with the Symfony application for making subscription billing
  • You will learn how to use external API (Vimeo api) and use it with the Symfony application
  • You will be able to create your own websites or web applications in Symfony framework
  • You will learn basics of RabbitMQ message broker
  • You will learn basics of Messenger Component
  • You will learn CQRS pattern - command query responsibility segregation
  • You will learn REST API with Symfony & API Platform
Course content
Expand all 312 lectures 24:20:39
+ Introduction
7 lectures 16:34

What this course is all about, what you will learn, how this course is structured, who I am

Preview 04:03

What is Symfony, what it is used for, documentation, release process

About Symfony
02:08

What you will need to accomplish the course (tools & requirements for students)

Preview 02:32

Learn how to get the most out of this course

How to use the course
01:47

You will get familiar with the applications that we will build in this course

Preview 04:04

My approach to coding standards and Symfony best practices

Quick note about coding standards
01:34
How to get helped
00:26
+ Symfony 4 & 5 basics, installation & configuration
4 lectures 12:48

Install Symfony 4, check system requirements, take a look at the folder structure

Symfony 4 installation & requirements
04:19

Main Symfony config file and config folder explained

Symfony 4 configuration
02:28

Using Symfony Flex to automate installation of packages. Installing Twig and Doctrine

Installing libraries with Symfony Flex
03:06

Request lifecycle in Symfony

Request & response objects, HTTP processing workflow
02:55
+ Theory - Symfony 4 & 5 core features
99 lectures 05:30:24

In order to go through this section with ease, install the Symfony app using the version in which an app was created. Later I will show you how to upgrade to the latest stable version of Symfony.

Before you start watching this section of the Symfony course
00:44

You will know two ways of creating routes in Symfony

Routes
04:19

Basics about Symfony controllers

Controllers
06:56

Symfony views basics

Views
05:21

Create database and use it with entities in Symfony

Entities (models)
12:40

Service container, autowiring of services

Preview 10:54

Using external service in our own service

Service container & services - part2
02:38

Examples of advanced routes in Symfony, optional parameters

Advanced routes
03:47

Using session flash messages in controllers and views

Flash messages
03:26

Using cookies in Symfony (how to get cookie value - see the next lecture)

Cookies
01:50

Using session in Symfony

Session
02:22

Using POST and GET data in Symfony. Using Request object

POST & GET data
01:28

Make custom error pages in Symfony

Custom error pages
02:13

Handle exceptions in Symfony with example of NotFoundException

Handle exceptions
00:47

How to bind a service to a controller so that it can be accessed via php variable in the controller

Binding services to controllers
01:20

How to redirect with dynamic parameters, how to download files, how to forward to another controller

More features in controllers
05:20

Explore built-in features in Twig: tags, filters, functions, tests, operators

Views - tags, filters, functions, tests, operators
07:23

Generate url's for routes and images, escape js, html, css

Views - genereate url's and escaping strings
03:35

Make variables global in all Symfony Twig views

Views - global variables
01:52

Manage css and js files/libraries with Webpack Encore & npm

Views - Webpack Encore
07:31

How to access the User, Request, Session and more in Twig via the app variable

Views - using app variable
01:29

How to render controller results in Twig files

Views - embed controllers in view
03:33

Create a new user and many users using fixtures. Console commands for resetting entire database

Doctrine crud - create
03:31

Select users from database. Make use of repository

Doctrine crud - read
02:24

Update a user

Doctrine crud - update
00:58

Delete a user from the database

Doctrine crud - delete
00:54

Make raw database queries with Doctrine

Doctrine raw queries
01:04

Use param converter in Symfony to automatically fetch specific object from the database

Preview 01:22

Execute entity code automatically using Doctrine events

Doctrine LifecycleCallbacks option
02:23

One-to-many relationship in Doctrine. Owning and inverse side of a relationship. Bidirectional & unidirectional types of relations. Proxy classes & lazy loading

Doctrine one-to-many & many-to-one relationships
08:51

cascade={"remove"} vs onDelete="CASCADE" vs orphanRemoval=true deleting options

Doctrine database relationships - cascade remove ralated objects
09:06

A user has one address and address belongs to only one user

Doctrine one-to-one relationship
04:18

How to implement Twitter-like follow user feature in Doctrine

Doctrine many-to-many self referencing relationship
04:58

Fetch all related objects with one Doctrine query

Doctrine Query Builder & eager loading
04:27

How to design database when entities share common fields

Doctrine table inheritance mapping in Symfony (polymorphic queries) - part 1
04:03

Create example entities and abstract entity that stores shared properties

Doctrine table inheritance mapping in Symfony (polymorphic queries) - part 2
07:31

Make polymorhpic queries with lazy and egaer loading options. Single and joined inheritance types

Doctrine table inheritance mapping in Symfony (polymorphic queries) - part 3
17:24

Inject parameters to services

Service parameters
03:39

Inject other services to a service using constructor injection & service arguments (most common)

Service & autowiring by constructor injection and service arguments
02:04

Autowire, autoconfigure and public configuration options

Service configuration
02:35

Inject optional dependency to a service using setter method

Services - setter injection for optional dependencies
04:26

Inject dependency to a service using class property

Services - property injection
01:47
Install composer package before the next lecture
00:04

How to make a service lazy so that it is instantiated only if we call it

Services - lazy services
02:17

How to use aliases for our services names

Service - aliases
03:09

How to add tags to a service so that it is treated by Symfony in a special way

Service - tags
04:02

Two services that implement one interface. How to deal with this in our application. Import configuration file to another

Service - dealing with different implementations of a service
04:35

List all of services that you can autowire & all services from the Symfony container

Services list
01:11

Basic usage of cache in Symfony. Set cache expiration time

Cache - basic usage
04:27

Use cache tags to store/clear related items in/from cache

Cache - tags
05:28

Using Symfony console to automate tasks & get helped

Symfony console
02:03

Use profiler tool in Symfony. Take a look at the error stack trace

Use profiler tool in Symfony
05:27

Difference between environments and kernels

Environments vs kernels
03:04

Deploy your Symfony application to live server

Deploy Symfony application
03:08

Events & Listeners base concepts in Symfony. List all of Symfony events. Built in Symfony events

Events & Listeners base concepts
01:59

Create listener that listens to the kernel response built in Symfony event

Create listener
02:28

Create an event and dispatch it

Dispatching events
04:27

Create subscriber and subscribe to custom event & dispatch it

Create subscriber
01:33

One subscriber can listen to many events

Subscriber - many events handled by one subscriber
01:26

Set priorities of subscribed events

Subscriber - events priorities
02:08

Update video entity and create form class for it

Form - create a class
02:20

Render the form in view file

Form - render in view
05:13

Style your symfony form in easy way

Form - themes
01:51

Send form and save data in the database

Form - send
01:29

Validate a form before saving data (backend side validation)

Form - validation
02:11

Use form events to dynamically modify/build forms

Form - events
03:48

Use "mapped false" option in forms

Form - fields not related to entity
01:53

How to upload files in Symfony application

Form - upload files
04:35

Install email package & send emails in Symfony

Email - install email package & send an email
03:19

How to delay the delivery of emails to make loading website faster (send emails using server cron job)

Email - spooling
02:21

How to test that an email was sent

Email - functional testing
03:25

Create special user for security purposes such as register, login, etc.

Security - create user
02:28

Register a new user

Security - register
06:56

Login to the application

Security - login
03:18

Logout from the application

Security - logout
01:37

How to implement 'remember me' feature in the login form

Security - login & remember login state
01:42

Using csrf token to protect html forms from being hacked

Security - csrf
00:39

Install security checker package and check security

Security - use security checker
00:18
Install expression-language package
00:02

Use annotations in controllers to authorize user actions

Security - authorization using annotations
06:26

Use access control feature in configuration file to restrict access to pages

Security - authorization using configuration file
01:18

Use denyAccessUnlessGranted method to make authorization in controller method

Security - authorization using denyAccessUnlessGranted method
01:17

How to authorize user action in Twig view files

Security - authorization in view files
01:11

How to use voters to authorize user actions

Security - authorization using voters
02:14

Install a package for unit testing, command for running all tests

Unit tests - install
02:16

Make first unit test in Symfony and test simple calculator service

Unit tests - first unit test
01:22

Install a package for functional testing, make first functional test

Functional tests - install
01:32

The most common used assertions while testing

Functional & unit tests - common assertions
03:33

How to click links on the website in functional tests

Functional tests - click links
02:21

How to send forms in functional tests

Functional tests - send a form
02:00

Use data providers in functional tests to make test methods simplified

Functional tests - data providers
01:22

Isolate your tests using second database connection or transactions

Functional tests - tests in isolation
04:16

How to create mocked (fake) objects in testing

Tests - mock objects
05:05

Generate code coverage report during testing

Tests - code coverage report
01:56

Install and configure a package for translations in Symfony application

Translations - install a package
00:47

Make translations in view files

Translations - views
03:30

How to translate in controllers

Translations - controllers
01:03

How to translate routes

Translations - routes
02:08

How to pluralize translated strings

Translations - pluralization
03:12
+ First application in Symfony: to-do list app (CRUD)
8 lectures 59:47

In order to go through this section with ease, install the Symfony app using the version in which an app was created. Later I will show you how to upgrade to the latest stable version of Symfony.

Before you start watching this section of the Symfony course
00:48

We will use composer to install Symfony 4 and xampp to work with the framework. We will also make nice url for our application by using virtual hosts in xampp

Preview 10:36

We will display our template directly in the Symfony by moving template to it, creating first controller and route

Preview 13:38

In this lecture we will create controller methods for 3 actions in our app and use path() function in views to create links to those routes

Preview 08:08

We will make connection with the database and create first entity in Symfony 4 to communicate with the database

Preview 14:10

We will fetch all the records from the database using Doctrine and display it on the website

Preview 05:58

Create method for switching a status of the task: done or undone

Preview 03:11

Create the method for deleting a task using Doctrine ORM

Preview 03:18
+ Controllers, routes, views - install and move html template to Symfony (App)
9 lectures 01:15:26

In order to go through this section with ease, install the Symfony app using the version in which an app was created. Later I will show you how to upgrade to the latest stable version of Symfony.

Before you start watching this section of the Symfony course
00:53

Installation of Symfony 4 framework and all the necessary libraries. First steps with moving template to Symfony, installing Twig template engine, extending base layout. Create first route, controller and first page

Installation of Symfony 4 framework and moving template to it
08:43

Moving admin area pages to Symfony. Use asset() function. Create first twig blocks in views

Continue with moving html template to Symfony
05:54

Create routes and controller methods for pages and link them with path() function

Make template links working in Symfony - part 1
09:29

Create routes and controller methods for pages and link them with path() function

Make template links working in Symfony - part 2
12:46

Make base Twig layout for admin area. Create routes and controller methods for pages and link them with path() function

Make template links working in Symfony - part 3
17:19

Create routes and controller methods for pages and link them with path() function

Make template links working in Symfony - part 4
06:59

Use twig "for" loop etc

Make template links working in Symfony - part 5
05:38

Install & use Webpack-Encore for handling our assets

Install Webpack-Encore
07:45
+ Doctrine entities, relations, fixtures,console commands - video categories (App)
16 lectures 02:11:32

Create Category & Video entities. Make first database relations on entities. Create fixtures for Category entity (fake data). Use console commands for handling database related stuff

Category entity (model)
17:05

Create subcategories for fixtures

Continue with Category fixtures - part 1
06:52

Finish creating fixtures for Category entity

Continue with Category fixtures - part 2
05:12

Use Symfony render controller feature. Create advanced route. Use twig filter. Use Doctrine to fetch all main categories (with parent column equals to null)

Display main categories on website
07:01

Create custom Twig filter to slugify url (e.g. change "Romantic Drama" to romantic-drama)

Create custom Twig filter
04:06

Create main abstract class for categories and child class for front-end. Install composer packages for debugging code

Category class for front-end
12:10

Create method for building tree array for categories

Build php array for nested categories
04:18

Build and display nested html li element for front-page categories. Use "raw" Twig tag

Create nested categories on front-page
09:18

Find main parent of categories, use Twig filters, refactoring of our code

Finish displaying categories on front-page
17:02

Build html for categories in admin area (html ul li). Update Category entity to allow for deleting a category. Controller method for deleting category

Display categories in admin area - part 1
11:57

Build html for categories in admin area (html option list). Use php recursive method. Render controller result in Twig file

Display categories in admin area - part 2
06:05

Controller method for editing category, render controller in view

Edit category in admin panel - part 1
05:04

Create html form in Symfony. Modify controller method to handle POST requests. Build html form in view with Symfony approach. Form validation

Edit category in admin panel - part 2
09:44

Validate form

Edit category in admin panel - part 3
02:21

Save category in database. Unique key for name field in category table

Edit category in admin panel - part 4
07:08

Code refactoring

Edit category in admin panel - part 5
06:09
+ First unit tests, mocking classes (Symfony App)
5 lectures 28:31

Unit test slugger for url's. Sh script to automate tasks

Unit testing of categories - part 1
06:21

Mocking category class

Unit testing of categories - part 2
13:38

Build 3 mocked classes: two for admin area and one for front-end

Unit testing of categories - part 3
02:05

Testing admin option list (html)

Unit testing of categories - part 4
03:45

Testing admin "ul li" list (html)

Unit testing of categories - part 5
02:42
+ First functional tests with isolation (Symfony App)
4 lectures 17:53

Installing necessary dependencies. Create first functional test

Functional testing of categories - part 1
05:21

Configure database transactions (testing with isolation)

Functional testing of categories - part 2
08:07

Test editing category

Functional testing of categories - part 3
03:10

Test deleting category

Functional testing of categories - part 4
01:15
+ Paginate, sort and search - videos on the website and test it (Symfony App)
9 lectures 29:43

Create video fixtures (fake video data to display on website)

Create video fixtures
03:44

Display videos on front-page taken from the database

Videos on front-page
03:28

Paginate list of videos

Pagination
04:06

Build recursive function to get id's of child categories and display videos from them

Display videos from child categories
04:54

Sort videos by title using Doctrine Query Builder

Sort videos
04:14

Search videos by title in the database and display them

Search results
04:48

Test no results on the website

Functional testing of videos - part 1
02:02

Test results were found on the website

Functional testing of videos - part 2
01:17

Test sorting

Functional testing of videos - part 3
01:10
+ Login and authorization system, sample user data - fixtures (Symfony App)
11 lectures 32:24

Make user entity. Install security package with Symfony Flex

Symfony login system - part 1
05:12

Make user fixtures (example user data in the database)

Symfony login system - part 2
04:02

Make changes in configuration file for login functionality

Symfony login system - part 3
03:34

Modify controller methods and views

Symfony login system - part 4
04:47

Display roles restricted stuff and data of currently logged in user

User roles - part 1
03:08

Prevent access user to content based on user roles

User roles - part 2
01:11

Prevent access user to content based on user roles - part 2

User roles - part 3
01:14

Display links for users depending on login status

Display links for users depending on login status - part 1
01:02

Display links for users depending on login status

Display links for users depending on login status - part 2
02:44

Securing access to superadmin pages

Securing access to superadmin pages
04:07

Install package for checking security of our application

Check security
01:23
Requirements
  • PHP language and object oriented programming
  • Basics of HTML, CSS, JavaScript
  • How to install software on your computer and have internet connection
  • You need to have server environment installed, e.g. Ubuntu, Xampp etc. to work with PHP applications locally
Description

Welcome to the best course of Symfony (incl. 4 & 5 version) - the great PHP framework!


In this course you will learn Symfony from basic to advanced level!

By the end of this course you will be able to create both simple websites and complex dynamic web applications in the great Symfony PHP framework.


Very practical course! Almost all sections/concepts are explained using real life applications/scenarios. In this course we will create a huge real life app (probably you will not find a course where built more advanced  app like in this course)


This is a very massive guide to Symfony, which is one of the most popular PHP frameworks. Symfony 4 version introduced a new approach to php frameworks - it starts small as a microframework and grows as you need new features. You install them using the amazing Symfony Flex tool. For example, if you are making a simple website and do not need a login functionality then there is no code responsible for logging in the framework directory. Thanks to this our application contains only as much as we really need.

   


**********************************************

The course consist of three main parts:

1. The theoretical part where I discuss the basic Symfony concepts on examples with effects on a web browser

2. In the second part we will build a simple application in Symfony - a list of tasks to be performed (database used)

3. In part 3 we will build an advanced web application for video subscription in which we integrate PayPal for payments, multi-level nested video categories, communication with Vimeo API, deployment to Heroku server


as well as:


BONUS section added (October 2019) - basics of Symfony Messenger Component, RabbitMQ message broker and CQRS pattern (Command Query Responsibility Segregation) with practical example by simulating e-commerce system consisting of main app and cooperating microservices.


Course update: (January 2020) new section added REST API with Symfony & API Platform

**********************************************



During the course we will be covering many simple and advanced Symfony concepts such as: routing, controllers, views, database with doctrine orm, entities and relationships between them: one to one, one to many and many to many; events & listeners, security topics such as login, registration, authorization; also unit and functional testing, dependency injection, service container, symfony services, doctrine table inheritance with polymorphic database queries, REST API and many more.


This course is a combination of theory and project-based learning approach. Learning by building real projects is the best way to learn programming languages and tools like php frameworks.


All of the course applications were made using Symfony 4 (except applications for rest api section - Symfony 5). Upgrade to Symfony 5 section was added to the course. According to Symfony standard, there are no any new features in Symfony 5.0 compared to Symfony 4.4.


Remember that only practice makes perfect. If necessary, study the course two or more times. Take notes  during the course like a real student. Use documentations, Google search. Finally, try to write the application yourself, not necessarily the same as in the course, you can try to change, add something, etc. No single course will make you a very good web developer. It can only bring you closer to this goal. The more practice, the better.


--------------------------------------------

QA

Question:

You used Symfony 4 and Symfony 5 in this course for creating apps to practice knowledge. Why not use only the latest version? Does it mean that this course is outdated and I will not benefit from it?

Answer:

Absolutely not! In tools like PHP frameworks the fundamentals and base syntax almost never change regardless of the version. But of course any maintained software evolves all the time. That's why I always suggest you to use the version of software that instructor uses in the course. It prevents from errors and confusions. As a someone who wants to learn web development you should be aware, that real web development involves also adapting the code to newer versions if necessary - but this is not always necessary, not every company do that. Software changes so often that the instructors would not be able to create the courses so that they match the latest version. This is not even advisable, because as a student you would loose an important aspect of real web development - the awareness that everything is changing and you need to be able to deal with it.

---------------------------------------------


Enroll now and let's start learning Symfony!

There is no risk! 30 day money back guarantee (as always at Udemy)

Who this course is for:
  • Everyone who want to learn Symfony framework
  • Everyone who is interested in building web applications and websites