This tutorial has a new version, check it out!

Symfony 3: Level up with Services and the Container

33:46

What you'll be learning

// composer.json
{
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.1.*", // v3.1.4
        "doctrine/orm": "^2.5", // v2.7.2
        "doctrine/doctrine-bundle": "^1.6", // 1.6.4
        "doctrine/doctrine-cache-bundle": "^1.2", // 1.3.0
        "symfony/swiftmailer-bundle": "^2.3", // v2.3.11
        "symfony/monolog-bundle": "^2.8", // 2.11.1
        "symfony/polyfill-apcu": "^1.0", // v1.2.0
        "sensio/distribution-bundle": "^5.0", // v5.0.22
        "sensio/framework-extra-bundle": "^3.0.2", // v3.0.16
        "incenteev/composer-parameter-handler": "^2.0", // v2.1.2
        "knplabs/knp-markdown-bundle": "^1.4", // 1.4.2
        "doctrine/doctrine-migrations-bundle": "^1.1" // 1.1.1
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0", // v3.0.7
        "symfony/phpunit-bridge": "^3.0", // v3.1.3
        "nelmio/alice": "^2.1", // 2.1.4
        "doctrine/doctrine-fixtures-bundle": "^2.3" // 2.3.0
    }
}

Our app is coming to life! Thanks to the Doctrine Course we have a rich data model. And after the course on Configuration, well, using and configuring services is simple.

Now it's time to level-up with those services. These puppies are the backbone of what makes Symfony special & fast. It's also the reason that organizing your code into reusable chunks is so easy. But beyond that, once you understand how services and the service container work, you'll be absolutely unstoppable inside of Symfony. Yep, let's do that:

  • Understanding what a service is
  • Listing, fetching and using existing services
  • Creating your own custom services
  • Registering your service
  • Checking out the (mystical) dumped container
  • Configuration Parameters
  • Dependency Injection Tags

This is the episode where it all starts coming together. Let's go!


Your Guides

Ryan Weaver Leanna Pelham

Buy Access

Questions? Conversation?