Skip to main content

Learn PHP Symfony 4 Hands-On Creating Real World Application

13h 22m 28s
English
Paid

Embark on a comprehensive journey to master PHP Symfony 4 by creating a real-world application. You'll code alongside me, step-by-step, gaining detailed insights into the workings and best practices of the framework. By the course's end, not only will you have developed a fully functional, Twitter-like application, but you'll also deploy it to a production server and set up an automation server for seamless application releases through a single Git commit.

Course Overview

Development Environment

The course recommends using Vagrant with Laravel Homestead for quick setup, complete with setup instructions for Ubuntu, MacOS, and Windows. Alternatively, you can use any suitable environment like XAMPP, MAMP, Docker, or your own system, as long as it has PHP 7+ and MySQL installed.

Initial Setup

The journey begins with introduction and setup lectures, providing an overview of the Symfony project structure.

Core Concepts

We’ll delve into the Service Container, a pivotal framework component. Fear not if it seems complex initially; continuous revisits throughout the course will reinforce your understanding.

Application Backbone

Next, you'll explore Controllers, Routes, and the Twig templating engine. Learn to construct your application’s backbone and render HTML with data using Twig. Additionally, you'll manage assets like CSS and JavaScript by installing Bootstrap with yarn.

Database Management

The course will introduce you to databases and the Doctrine ORM. You'll create PHP objects representing database rows, handle database migrations, and learn to fetch, modify, and delete data efficiently.

Requirements

  • Basic understanding of PHP and Object-Oriented Programming
  • Mac, Windows, or Ubuntu system
  • IDE or any other code editor

Target Audience

  • PHP developers new to frameworks
  • Developers familiar with other PHP frameworks
  • Developers eager to quickly master Symfony with a focused approach

Key Learning Outcomes

  • Create a fully operational, real-world website using Symfony
  • Gain a profound understanding of the framework
  • Master Continuous Deployment and Continuous Integration processes
  • Automate deployment via a single commit to release your application globally
  • Comprehend database and Doctrine ORM intricacies
  • Develop forms, save, edit, and validate data efficiently
  • Manage complex database relations
  • Implement email functionalities and grasp the Symfony Event system
  • Enhance application security and control user access
  • Formulate SQL queries in Doctrine, utilize Doctrine Table Inheritance, and Lifecycle callbacks
  • Translate your application into multiple languages
  • Understand session management
  • Conduct application testing with PHPUnit through unit tests
  • Setup a remote server by installing Apache, PHP, and MySQL using SSH

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 108 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 108 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction
All Course Lessons (108)
#Lesson TitleDurationAccess
1
Introduction Demo
05:50
2
About Symfony
02:35
3
Tools overview
02:11
4
Setting up Vagrant on Windows
06:10
5
Setting up Vagrant on Ubuntu
03:22
6
Setting up Vagrant on MacOS
04:09
7
Running Vagrant and creating a new Symfony 4 project
05:05
8
Symfony project structure overview
06:23
9
About Service Container
06:11
10
Autowiring, Autoconfiguring services
04:20
11
Public, private services, service aliases
05:15
12
Service tags
04:55
13
Manual service wiring, parameter binding
06:02
14
About controllers
12:34
15
About routing
08:54
16
Introduction to views (Twig)
10:40
17
Twig filters & custom Twig extensions
07:53
18
Custom error pages using Twig
06:00
19
Global variables in Twig
05:16
20
Handling assets (JavaScript, CSS) using Symfony Encore (and Webpack)
08:15
21
Installing Bootstrap 4 and compiling assets using Encore (Webpack)
08:36
22
Doctrine introduction
11:52
23
Creating first Entity
07:34
24
Creating a database migration
07:58
25
Basics of doctrine repository
10:32
26
Creating fixtures (database seeding)
06:25
27
Creating a form and handling form submission
10:46
28
Repository find methods and Twig include
10:43
29
Repository findBy, form validation, handling Entity changes
09:10
30
Deleting an Entity and flash messages
05:47
31
Doctrine internals (Entity, EntityManager, Unit of Work, Identity Map)
06:03
32
Security concepts
04:43
33
Security component config and HTTP Basic login
09:47
34
Creating User entity
08:51
35
User Entity fixtures
09:44
36
Login form part 1
09:42
37
Login form part 2
10:54
38
Adding validation to User entity
06:28
39
User registration form
08:20
40
User registration controller
11:49
41
Assigning user to MicroPost (ManyToOne & OneToMany)
13:25
42
Fixtures for relations (using references in fixtures)
04:39
43
Verifying user permissions in Twig (is_granted)
11:24
44
Adding randomness to fixtures
05:20
45
Security Voters introduction
03:19
46
Restricting access to edit or delete a micro post using SecurityVoter
11:11
47
Securing controller actions and templates using Security Voter
11:48
48
Adding an Admin User with all permissions
12:07
49
Security role hierarchy
02:28
50
Restricting adding new posts to registered users (many ways of doing that)
06:07
51
Lazy loading, proxy classes, repository find* methods criteria
09:45
52
Doctrine Lifecycle Callbacks
04:25
53
ManyToMany self-referencing relation (following/followers)
09:03
54
Fetching collections lazily in templates
07:31
55
Follow/Unfollow functionality (controller, adding Entities to Collections)
16:59
56
Follow/Unfollow functionality (security, verifying uniqueness)
05:41
57
Doctrine QueryBuilder - creating queries in OOP manner
11:54
58
ArrayCollection vs PersistentCollection vs Collection
09:44
59
Creating custom query to fetch users with more than 5 posts
12:44
60
More on Doctrine Collections (from the database perspective)
02:48
61
Section introduction
00:54
62
ManyToMany relationship for liked posts
07:31
63
Likes controller
09:33
64
Implementing like functionality through XHR requests (including JavaScript)
18:55
65
Notifications introduction
00:52
66
Doctrine Table Inheritance - base Notification Entity
10:11
67
NotificationRepository - fetching notifications unseen by user
06:41
68
Unseen notification badge (Twig + JavaScript)
09:41
69
Doctrine EventSubscriber - saving a notification as a reaction to other events
17:45
70
Unseen notification list
11:05
71
Marking notifications as being read (Doctrine Query Builder UPDATE queries)
10:12
72
Introduction to EventDispatcher
03:09
73
Dispatching an event when user registers
05:31
74
EventSubscriber - listening to user register event
04:14
75
Sending e-mail after user registers using Swift Mailer
09:45
76
E-mail spooling
05:08
77
Creating a Mailer class to handle e-mail sending (and generation using Twig)
05:16
78
Account confirmation (using secure token, confirmation link on e-mail)
15:03
79
Installing and configuring translation component
04:36
80
Using trans Twig filter to translate strings and validation messages translation
07:15
81
Translation strings with variables (translating confirmation e-mail with links)
10:18
82
Translation pluralization (different translation depending on variable)
05:15
83
Introduction to sessions
03:19
84
Storing user sessions in database
10:01
85
LocaleSubscriber - keeping user locale (language) in session
09:55
86
UserPreferences Entity & OneToOne relation with User Entity
09:13
87
Creating new UserPreferences after user registration (responding to event)
06:33
88
UserLocaleSubscriber - loading user language from DB and keeping in session
06:18
89
Introduction to unit testing (using PHPUnit)
01:54
90
Writing first unit test
08:08
91
Creating PHPUnit Mocks
06:16
92
A more complicated case with testing
09:56
93
Creating a GitHub account and adding an SSH key
05:43
94
Creating a DigitalOcean droplet
01:43
95
First login to virtual server and changing the root password
01:34
96
Creating and adding an SSH key to DigitalOcean (and managing SSH keys)
04:44
97
Installing Apache2 on virtual server
04:43
98
Installing PHP 7.2 on virtual server
02:19
99
Installing MySQL on virtual server and creating a database
02:57
100
Configuring Apache Virtual Host and using fake SMTP testing server
08:16
101
Moving application code to production server using Git & dependencies
06:08
102
Running migrations on server and folder permissions
07:34
103
Introduction to Continuous Integration & Continuous Deployment
03:02
104
Setting up CircleCI (automation server)
10:18
105
Running our first automation job (running tests)
03:58
106
Adding deployment SSH key to CricleCI
01:13
107
Deployment job and deployment scripts
12:28
108
Running the deployment job
05:19
Unlock unlimited learning

Get instant access to all 107 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription