Stellar Development with Symfony 4

Symfony 4 is out, and it's the best Symfony ever. Faster! Re-imagined developer experience! And easier to create the features you need!

In this series from SymfonyCasts (formerly KnpUniversity), you'll create your first Symfony 4 app, learning important concepts in Symfony 4 development along the way.

So let's start coding already! This series of tutorials covers:

  • Set up your new (tiny) Symfony app
  • PhpStorm setup for a killer experience
  • Flex and understanding recipes
  • Creating routes and controllers
  • The bin/console tool
  • Twig and templating
  • Crazy-good debugging with the web debug toolbar
  • JavaScript and asset setup
  • Our first API Endpoint!
  • An intro to services!

Prerequisites

You'll want to be comfortable using the command line as this hands-on series will walk you through a number of commands to install, run, and develop a Symfony 4 application. If you need to brush up or revisit some topics, check out the following resources:

Drupal and Symfony 4

Curious to know how Symfony 4 and Drupal work together? Check out the blog post Symfony 4 and Drupal by Ryan Weaver of SymfonyCasts.

Tutorials in this course
More information

Let's get started with Symfony 4 development. In this tutorial, we'll download and install Symfony with Composer.

Additional resources

- [The Wonderful World of Composer](https://drupalize.me/videos/wonderful-world-composer)
- [Command Line Basics](https://drupalize.me/series/command-line-basics-series)
- [Git](https://drupalize.me/topic/git)

More information

In this tutorial, we'll get oriented with our app and set up PhpStorm for Symfony 4 development.

Additional resources

- [PhpStorm topic page](https://drupalize.me/topic/phpstorm)

More information

Let's create our first page in our Symfony 4 app and learn about routes and controllers in the process.

More information

Let's learn about the Composer plugin Flex and Flex's two superpowers: aliases and recipes. Aliases will ease the process of dependency installation and recipes will help us make sure everything is working in our dependency upon installation.

Additional resources

- [Symfony Recipes Repository](https://github.com/symfony/recipes) (GitHub.com)

More information

In this tutorial, we'll install a Twig bundle and recipe.

More information

In this tutorial, we'll implement a template for our Symfony app using Twig. You'll learn a few Twig basics along the way.

Additional resources

- [Twig Templating](https://drupalize.me/series/twig-templating)

More information

In this tutorial, we'll install the Profiler, also known as the Web Debug Toolbar. Let's explore what information and tools the Profiler and Web Debug Toolbar provide.

Symfony has changed the package name for the profiler since this video was recorded.

You can now install the profiler by running: composer require --dev symfony/profiler-pack

And read more about the profiler tool here: https://symfony.com/doc/current/profiler.html

More information

In this tutorial, we'll install and explore debug-pack, a Symfony debugging package that includes Monolog (a logging library), phpunit-bridge (for testing), and even the profiler-pack that we already installed in a [previous lesson](/videos/symfony-4-web-debug-toolbar-and-profiler).

Additional resources

- [Symfony Recipes Server](https://symfony.sh/)

More information

In this tutorial, let's make our pages less ugly and learn how we can include CSS and JavaScript assets in our application.

Additional resources

- [HTML and CSS topic page](https://drupalize.me/topic/html-and-css)
- [JavaScript topic page](https://drupalize.me/topic/javascript)

More information

In this tutorial, we'll learn how to generate URLs to routes and we'll fix up the links in our app in the process.

More information

In this tutorial, we'll begin to wire up an AJAX call to an API endpoint. Along the way, we'll learn how to include page-specific JavaScript assets.

More information

In this tutorial, we'll learn how to wire up our app to send and receive data to/from an API endpoint.

Additional resources

- [JavaScript topic page](https://drupalize.me/topic/javascript)

More information

In this tutorial, we'll learn about useful objects in Symfony known as services.