This tutorial has a new version, check it out!

Starting in Symfony2: Course 3 (2.4+)

1:34:37

What you'll be learning

// composer.json
{
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.4", // v2.4.2
        "doctrine/orm": "~2.2,>=2.2.3", // v2.4.2
        "doctrine/doctrine-bundle": "~1.2", // v1.2.0
        "twig/extensions": "~1.0", // v1.0.1
        "symfony/assetic-bundle": "~2.3", // v2.3.0
        "symfony/swiftmailer-bundle": "~2.3", // v2.3.5
        "symfony/monolog-bundle": "~2.4", // v2.5.0
        "sensio/distribution-bundle": "~2.3", // v2.3.4
        "sensio/framework-extra-bundle": "~3.0", // v3.0.0
        "sensio/generator-bundle": "~2.3", // v2.3.4
        "incenteev/composer-parameter-handler": "~2.0", // v2.1.0
        "doctrine/doctrine-fixtures-bundle": "~2.2.0", // v2.2.0
        "ircmaxell/password-compat": "~1.0.3", // 1.0.3
        "phpunit/phpunit": "~4.1", // 4.1.0
        "stof/doctrine-extensions-bundle": "~1.1.0" // v1.1.0
    }
}

Welcome back for part 3 of our Starting in Symfony2 series! In part 3 of this series, we're going to discover even more about Symfony and begin to learn more about how Symfony really works under the hood. Over the next hour or so, we're going to learn what a service is, find out more about the core Symfony services, and create a few of our own. In Doctrine, we'll create some Doctrine associations, including ManyToOne and ManyToMany relationships. We'll also talk about lifecycle callbacks and event listeners. Plus a ton more!

Highlights:

  • Doctrine relations, metadata, and the JoinColumn
  • ManyToMany relationship that's bidirectional, owning versus inverse side and why that matters
  • Loading fixtures with shared data
  • Creating shortcuts with your very own base controller!
  • Doctrine extensions: timestampable, sluggable
  • Ajax: returning Json from a controller, setting the content type and the _format parameter
  • Customizing error pages at the template and controller level
  • Overriding bundle templates
  • Embedding other controllers with Twig's render tag
  • Services! What they are, where to find and use the core services, and a step-by-step on how to create your own. Also, demystifying dependency injection.
  • Creating your very own Twig extension
  • Doctrine lifecycle callbacks and how to create and leverage your own doctrine event listener service

Your Guides

Ryan Weaver Leanna Pelham

Buy Access

Questions? Conversation?