
Learn Symfony through building a to-do app, exploring how the framework streamlines development, enforces structure, and uses Doctrine and entities for database handling.
Choose an IDE that supports the Symfony framework and offers autocompletion, or use a comfortable alternative. Keep the IDE updated to the latest version as you start the Symfony setup.
Download and install Symfony 4 from the official website across Windows, macOS, or Linux, then configure your system and export Symfony to path to create a new project.
Create new Symfony app using the Downloader tool from Symfony website.
Learn to create your Symfony controller by defining the app/ controller namespace, extending abstract controller, and adding an index action that returns a response; compare creation with the make controller.
Spin up Symfony application using HTTP server or using built-in server
Explore how Twig, a template engine for Symfony, powers dynamic rendering by wiring a controller method to a Twig template, passing binding parameters, and organizing templates.
Learn how to configure Doctrine ORM in a Symfony project, install Doctrine bundle, set up the database connection via environment variables, and create and verify the database with Doctrine commands.
Define and tune your Symfony Doctrine YAML file by configuring parameters, database connections, and ORM options, including driver, utf-8 settings, proxy generation, and entity mappings.
Define a new to-do entity with Doctrine using the make entity command, generate and run a migration, and apply changes to the database to create the table.
Doctrine converts PHP entities into database records and lets you manage data via objects and getters/setters instead of sql.
Define and populate an entity, inject the Doctrine entity manager, and persist via flush to insert data into the database, demonstrating creating, persisting, and retrieving records.
Revert migrations in Symfony by executing doctrine migration with a version using up or down, then verify by inspecting the migration table and current tables.
Create a route for a get details method, fetch a single to do item using doctrine's repository, and return a response while handling not found errors.
Insert records into the database, return them as a table, loop through results, and print each name; then use find by with criteria to filter records by name.
Explore how to create custom query methods with the Symfony Doctrine repository and the query builder, using where clauses, like filters, ordering, and limiting results.
Update a to-do record in the database using the Symfony controller and Doctrine; fetch by id, modify priority and status, and flush changes to persist.
Install the form component to enable forms in Symfony 4.0 by running composer require symphony form, then create your first form based on the to do entity.
Learn to create your first Symfony form with the maker bundle, generating a form type class and adding fields like text, email, and password with placeholders and max length.
Learn how to render a Symfony form in a Twig template and bind it to a to-do form type. Then pass a form view to the front-end for display.
Apply a bootstrap template to Symfony forms to transform ugly UI into a clean, user-friendly layout by using twig templates, form themes, and bootstrap integration.
Create a form directly inside a Symfony class using a form builder, defining user name and password fields with text and password types, then render for template integration.
Learn how to handle form submission in a Symfony beginner project by wiring the submit button, injecting the request, and using the form extension to validate input and check submission.
Learn how to save a submitted form into the database using doctrine's entity manager, create and persist a to-do entity, flush, and verify with a database query.
Explore Symfony form validation by combining browser validation and backend constraints; install the validator component with Composer and apply constraints like NotBlank and Email on entities to secure inputs.
Define a custom error message in the seed, set the message to 'this is not a valid email', and bind it to the value property to show the error.
Switch to a different template to resolve input-level error blocks, and display validation messages with a designated form errors section placed where you want, using bootstrap layout.
Edit record from database using form
Current content will be shown on the form inputs
Explore how to model related entities in Symfony with Doctrine by introducing relation types (one-to-one, one-to-many, many-to-many) and owner and inverse concepts, including bidirectional versus unidirectional relationships.
Update the entities by wiring one-to-one, one-to-many, many-to-one, and many-to-many relations between user, to do, category, product, and city, with Doctrine mappings, cascade options, and migrations.
Explore how to turn your Symfony knowledge into a hands-on demo app. Implement actions, collapse panels, and edit and delete interactions with feedback messages and UI state updates.
Install the assets component with composer, then use the assets helper to link public assets, like css/style.scss, demonstrating a Symfony best practice to avoid template verbosity.
Discover how to set up webpack encore in a Symfony project, install the encore pack with composer, configure assets and output paths, and run npm install to build dependencies.
Enable sass using webpack by installing the sass-loader, enabling sass in the web config with SSL, and running npm run watch to build and apply style changes.
Build a Symfony UI using Bootstrap and Sass, render a todo list in Twig with for loops and status badges, and implement entity creation and Doctrine migrations.
Enhance the Symfony UI by displaying created and due dates, a to-do description, a details view, and date formatting with Bootstrap styling.
Learn to implement user feedback with flash messages in a Symfony UI, using try-catch error handling and conditional displays to show success and error notices.
Set up a bootstrap accordion by installing bootstrap, jquery, and popper.js, importing them in the build configuration, and enabling the accordion with the runtime chunk and proper entry points.
Seed your Symfony app with fixtures to generate fake data, install the fixture tool with composer, and create a fixture class to populate todos and users in the database.
The lecture shows making accordion items unique by using the loop index to generate dynamic collapse targets, so only the clicked item toggles, not all, in a Symfony project.
Stylize a Symfony UI by removing borders, tweaking fonts and colors, and aligning content. Build collapsible sections with show states and add edit and delete actions for each item.
Update a todo status to done and reflect changes in the UI by turning the item green when done, disabling the close link, and applying a line-through with reduced opacity.
Install the Symfony event dispatcher, define a unique event name, and dispatch events through a central dispatcher that notifies listeners and passes event data.
Compare event listeners and event subscribers in Symfony, highlighting performance through lazy loading of entity listeners. Prefer entity listeners for reduced service container instantiation and efficient event handling.
Learn to create and wire a Symfony event listener to handle kernel exceptions, configure it with tags, and respond to specific events using a listener class.
Create a Symfony event subscriber by implementing the EventSubscriberInterface and defining getSubscribedEvents to listen for kernel exceptions with priorities.
Create a custom Symfony event, define its name and payload, dispatch it on the to-do edit route, and handle it with a listener and subscriber to greet and log actions.
This course will help you learn Symfony, the powerful PHP framework that would let you create not only websites but great web applications, APIs or mobile backends.
Its latest version is the most powerful, yet simplest to use for developers. If you want to get started with Symfony, this is the best place you could get.
We'll go through each single task step by step; you will code along with me. I'd explain every detail of how things work, and how things should be done.
I'll even leave some scene with error uncut so that you can see and experience a real-world coding example and how the journey is!
At the end of this course, you will complete a fully working, real world application.
The recommended development environment is Linux for the sake of speed and optimization for developer, but if you are on Windows or MacOs no worries. I won't be using any tool or package that could restrict you from taking this course if you are on another environment.
The course starts with an introduction.
Then we'll move on and install the framework using official documentation and guides.
Next section is centered around Controllers, Routes and Twig templating engine. You will learn how to create a backbone of your application and how to render HTML together with data using Twig. We will also see how we can install and manage assets, like CSS & JavaScript, by installing Bootstrap using npm (You can use Yarn if you are comfortable with).
After that, I will manipulate databases and the excellent Doctrine ORM. You will learn how you can create simple PHP objects as a representation of table rows. You will learn about database migrations - an easy way of managing your database schema changes. This section will also show you how to quickly fetch, modify and delete data from the database.
And we end up doing some Front-End work updating and customizing the User Interface.
Who this course is for:
PHP developers that do not know any framework
Developers with some knowledge of other PHP frameworks
Developers that need and want to pick-up Symfony fast with straight to the point course