
What this course is all about, what you will learn, how this course is structured, who I am
What is Symfony, what it is used for, documentation, release process
What you will need to accomplish the course (tools & requirements for students)
Learn how to get the most out of this course
You will get familiar with the applications that we will build in this course
My approach to coding standards and Symfony best practices
Install Symfony 4, check system requirements, take a look at the folder structure
Main Symfony config file and config folder explained
Using Symfony Flex to automate installation of packages. Installing Twig and Doctrine
Request lifecycle in Symfony
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.
You will know two ways of creating routes in Symfony
Basics about Symfony controllers
Symfony views basics
Create database and use it with entities in Symfony
Service container, autowiring of services
Using external service in our own service
Examples of advanced routes in Symfony, optional parameters
Using session flash messages in controllers and views
Using cookies in Symfony (how to get cookie value - see the next lecture)
Using session in Symfony
Using POST and GET data in Symfony. Using Request object
Make custom error pages in Symfony
Handle exceptions in Symfony with example of NotFoundException
How to bind a service to a controller so that it can be accessed via php variable in the controller
How to redirect with dynamic parameters, how to download files, how to forward to another controller
Explore built-in features in Twig: tags, filters, functions, tests, operators
Generate url's for routes and images, escape js, html, css
Make variables global in all Symfony Twig views
Manage css and js files/libraries with Webpack Encore & npm
How to access the User, Request, Session and more in Twig via the app variable
How to render controller results in Twig files
Create a new user and many users using fixtures. Console commands for resetting entire database
Select users from database. Make use of repository
Update a user
Delete a user from the database
Make raw database queries with Doctrine
Use param converter in Symfony to automatically fetch specific object from the database
Execute entity code automatically using Doctrine events
One-to-many relationship in Doctrine. Owning and inverse side of a relationship. Bidirectional & unidirectional types of relations. Proxy classes & lazy loading
cascade={"remove"} vs onDelete="CASCADE" vs orphanRemoval=true deleting options
A user has one address and address belongs to only one user
How to implement Twitter-like follow user feature in Doctrine
Fetch all related objects with one Doctrine query
How to design database when entities share common fields
Create example entities and abstract entity that stores shared properties
Make polymorhpic queries with lazy and egaer loading options. Single and joined inheritance types
Inject parameters to services
Inject other services to a service using constructor injection & service arguments (most common)
Autowire, autoconfigure and public configuration options
Inject optional dependency to a service using setter method
Inject dependency to a service using class property
How to make a service lazy so that it is instantiated only if we call it
How to use aliases for our services names
How to add tags to a service so that it is treated by Symfony in a special way
Two services that implement one interface. How to deal with this in our application. Import configuration file to another
List all of services that you can autowire & all services from the Symfony container
Basic usage of cache in Symfony. Set cache expiration time
Use cache tags to store/clear related items in/from cache
Using Symfony console to automate tasks & get helped
Use profiler tool in Symfony. Take a look at the error stack trace
Difference between environments and kernels
Deploy your Symfony application to live server
Events & Listeners base concepts in Symfony. List all of Symfony events. Built in Symfony events
Create listener that listens to the kernel response built in Symfony event
Create an event and dispatch it
Create subscriber and subscribe to custom event & dispatch it
One subscriber can listen to many events
Set priorities of subscribed events
Update video entity and create form class for it
Render the form in view file
Style your symfony form in easy way
Send form and save data in the database
Validate a form before saving data (backend side validation)
Use form events to dynamically modify/build forms
Use "mapped false" option in forms
How to upload files in Symfony application
Install email package & send emails in Symfony
How to delay the delivery of emails to make loading website faster (send emails using server cron job)
How to test that an email was sent
Create special user for security purposes such as register, login, etc.
Register a new user
Login to the application
Logout from the application
How to implement 'remember me' feature in the login form
Using csrf token to protect html forms from being hacked
Install security checker package and check security
Use annotations in controllers to authorize user actions
Use access control feature in configuration file to restrict access to pages
Use denyAccessUnlessGranted method to make authorization in controller method
How to authorize user action in Twig view files
How to use voters to authorize user actions
Install a package for unit testing, command for running all tests
Make first unit test in Symfony and test simple calculator service
Install a package for functional testing, make first functional test
The most common used assertions while testing
How to click links on the website in functional tests
How to send forms in functional tests
Use data providers in functional tests to make test methods simplified
Isolate your tests using second database connection or transactions
How to create mocked (fake) objects in testing
Generate code coverage report during testing
Install and configure a package for translations in Symfony application
Make translations in view files
How to translate in controllers
How to translate routes
How to pluralize translated strings
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.
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
We will display our template directly in the Symfony by moving template to it, creating first controller and route
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
We will make connection with the database and create first entity in Symfony 4 to communicate with the database
We will fetch all the records from the database using Doctrine and display it on the website
Create method for switching a status of the task: done or undone
Create the method for deleting a task using Doctrine ORM
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.
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
Moving admin area pages to Symfony. Use asset() function. Create first twig blocks in views
Create routes and controller methods for pages and link them with path() function
Create routes and controller methods for pages and link them with path() function
Make base Twig layout for admin area. Create routes and controller methods for pages and link them with path() function
Create routes and controller methods for pages and link them with path() function
Use twig "for" loop etc
Install & use Webpack-Encore for handling our assets
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
Create subcategories for fixtures
Finish creating fixtures for Category entity
Use Symfony render controller feature. Create advanced route. Use twig filter. Use Doctrine to fetch all main categories (with parent column equals to null)
Create custom Twig filter to slugify url (e.g. change "Romantic Drama" to romantic-drama)
Create main abstract class for categories and child class for front-end. Install composer packages for debugging code
Create method for building tree array for categories
Build and display nested html li element for front-page categories. Use "raw" Twig tag
Find main parent of categories, use Twig filters, refactoring of our code
Build html for categories in admin area (html ul li). Update Category entity to allow for deleting a category. Controller method for deleting category
Build html for categories in admin area (html option list). Use php recursive method. Render controller result in Twig file
Controller method for editing category, render controller in view
Create html form in Symfony. Modify controller method to handle POST requests. Build html form in view with Symfony approach. Form validation
Validate form
Save category in database. Unique key for name field in category table
Code refactoring
Unit test slugger for url's. Sh script to automate tasks
Mocking category class
Build 3 mocked classes: two for admin area and one for front-end
Testing admin option list (html)
Testing admin "ul li" list (html)
Installing necessary dependencies. Create first functional test
Configure database transactions (testing with isolation)
Test editing category
Test deleting category
Create video fixtures (fake video data to display on website)
Display videos on front-page taken from the database
Paginate list of videos
Build recursive function to get id's of child categories and display videos from them
Sort videos by title using Doctrine Query Builder
Search videos by title in the database and display them
Test no results on the website
Test results were found on the website
Test sorting
Make user entity. Install security package with Symfony Flex
Make user fixtures (example user data in the database)
Make changes in configuration file for login functionality
Modify controller methods and views
Display roles restricted stuff and data of currently logged in user
Prevent access user to content based on user roles
Prevent access user to content based on user roles - part 2
Display links for users depending on login status
Display links for users depending on login status
Securing access to superadmin pages
Install package for checking security of our application
Welcome to the most comprehensive Symfony course on Udemy. Symfony is the great PHP framework!
In this course you will learn Symfony from basic to advanced level - from theory, through simple crud app, up to creating an advanced Real Life Application. You will also learn how to create REST API using API Platform and how to create microservices architecture using CQRS, RabbitMQ and Symfony Messenger.
By the end of this course you will be able to create both simple websites and complex dynamic web applications in the Symfony PHP framework.
You won't find a more comprehensive Symfony course on Udemy than this one. Although we currently have Symfony version 7, the course is still very useful, not much has changed, many things are very similar. For example, the definition of routing:
Symfony 4,5:
/**
* @Route("/blog", name="blog_list")
*/
public function list(): Response
{
// ...
}
Symfony 7:
#[Route('/blog', name: 'blog_list')]
public function list(): Response
{
// ...
}
Don't worry. You won't encounter version incompatibility errors - in this course you use the same package versions as the instructor on the screen.
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 - 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: 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)