Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine

Symfony 5 Fundamentals: Services, Config & Environments

2:20:28

What you'll be learning

This tutorial also works great for Symfony 6!
// composer.json
{
    "require": {
        "php": "^7.3.0 || ^8.0.0",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "composer/package-versions-deprecated": "^1.11", // 1.11.99
        "knplabs/knp-markdown-bundle": "^1.8", // 1.9.0
        "sensio/framework-extra-bundle": "^6.0", // v6.2.1
        "sentry/sentry-symfony": "^4.0", // 4.0.3
        "symfony/asset": "5.0.*", // v5.0.11
        "symfony/console": "5.0.*", // v5.0.11
        "symfony/debug-bundle": "5.0.*", // v5.0.11
        "symfony/dotenv": "5.0.*", // v5.0.11
        "symfony/flex": "^1.3.1", // v1.17.5
        "symfony/framework-bundle": "5.0.*", // v5.0.11
        "symfony/monolog-bundle": "^3.0", // v3.6.0
        "symfony/profiler-pack": "*", // v1.0.5
        "symfony/routing": "5.1.*", // v5.1.11
        "symfony/twig-pack": "^1.0", // v1.0.1
        "symfony/var-dumper": "5.0.*", // v5.0.11
        "symfony/webpack-encore-bundle": "^1.7", // v1.8.0
        "symfony/yaml": "5.0.*" // v5.0.11
    },
    "require-dev": {
        "symfony/maker-bundle": "^1.15", // v1.23.0
        "symfony/profiler-pack": "^1.0" // v1.0.5
    }
}

This is the tutorial that unlocks your true Symfony 5 potential. How? By talking about what's at the core of Symfony: services, config & environments. These are the tools you'll need to take on any challenge with Symfony:

  • Bundles give you services
  • Finding and using services
  • Configuring bundles (i.e. configuring services)
  • Creating your own services
  • Autowiring & binding custom arguments
  • Symfony Environments
  • The magical configuration loading mechanism
  • Service parameters
  • Environment Variables and .env
  • Secrets management
  • Having fun with magic & the Logger
  • Bonus: The MakerBundle

By the end, you'll see truly understand the fundamentals behind how any part of Symfony works. Need to use a new feature? You'll be ready!

Let's go!


Your Guides

Ryan Weaver

Buy Access

Join the Conversation?

16
Login or Register to join the conversation
Jesus A. Avatar
Jesus A. Avatar Jesus A. | posted 2 years ago

thnks from Mexico brilliant about the training of fundamentals

2 Reply

De que parte? :)

Reply
Jesus A. Avatar

Hidalgo

1 Reply

Bienvenido a SymfonyCasts!
Saludos desde Tepic, Nayarit :)

Reply
Hector Avatar

Mexicano tambien, de Aguascalientes

Reply

Que bien! Bienvenido a SymfonyCasts ;)

Reply
ashatou Avatar

Nice course. Clear and simple. Just started my journey with Symfony.

Reply

Hey,

Get comfortable, check your seatbelt and start your journey as soon as you can!!! It should be awesome!

Cheers!

Reply
Miky Avatar

Hi :)
Should i ask how in service class if i have public function A() { return $object } use it in same service class in public function B {} $object from public function A() ???

Reply
Victor Avatar Victor | SFCASTS | Miky | posted 2 years ago | edited

Hey Mikolaj,

It's a bit fuzzy question, could you provide a bit more complete one? As far as I understand you have:


class Service
{
    public function A() {
        return $object;
    }

    public function B() {
        $this->A(); // This will return you the $object from A() method
    }
}

Or, you can store that object on a class property and call that property instead, but it depends on how you inject/create that $object.

I hope this helps!

Cheers!

1 Reply
Miky Avatar

You answered exactly what i needed :)

Reply

Hey Mikolaj,

Great, I'm happy to hear it :) Thanks for confirming it helped!

Cheers!

Reply
Laura C. Avatar
Laura C. Avatar Laura C. | posted 2 years ago

Thank-you ! Your course is very helpful. It's a really nice job !

Reply
Kiuega Avatar

Hey team! I don't know if it would fit in this tutorial, but a video on the new Rate Limiter component ( https://symfony.com/blog/ne... ) could be really cool! To see how to use it well, on an authentication system, or a simple route from a controller. By exploiting the different possibilities (restrict by IP, by user), see the different ways to store the current number of attempts, etc!

Reply

Hey Kiuega

Thank you for your feedback. This tutorial is already finished, so we won't cover that topic here but since the Rate Limiter component is a great component it's likely that we will cover it in a further tutorial.

Cheers!

1 Reply
Cat in space

"Houston: no signs of life"
Start the conversation!

userVoice