SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile
SymfonyCasts 🇺🇦

@symfonycasts

Injecting Unicorns and Rainbows back into learning PHP // The official way to learn Symfony: SymfonyCasts.com

ID: 429749331

linkhttp://SymfonyCasts.com calendar_today06-12-2011 10:15:37

3,3K Tweet

8,8K Takipçi

77 Takip Edilen

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

There’s one piece of magic needed to get addDroid() to work again: cascade persist. let’s crack open this underused but potentially dangerous option symfonycasts.com/screencast/doc…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Let's create a nifty language switcher widget since having users manually manipulate the URL in their address bar is a huge bummer. symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Let's do the real work of translating! See where and how you translate text, the "anatomy" of a translation, creating, and loading them. symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

One last thing before we finally translate the site: translation "keys". Let's look at why we use these, how to use them, and how YAML helps! symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Let's look at a more complex translation, one with dynamic values and pluralization, because "1 dinosaurs" doesn't sound quite right 🦖 symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

HTML in your translations, it's gonna happen. There isn't a perfect solution, so let's take a look at our options. symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

I'll admit it, mistakes are going to happen, translations will be missed! Let's look at the tools Symfony provides to help find these and how you can prevent missing translations from making it to production. symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

The Symfony CLI makes local development a breeze - but it works best when PHP is installed directly on your machine. Let's walk through setting up PHP (plus common database extensions) and the Symfony CLI on macOS, Linux, or Windows so you're ready to start building Symfony apps.

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

The translation:extract command automates pulling missing translation keys from your PHP and Twig files. But it also has a secret, secondary purpose... Let's check it out! 🕵️ symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

For a course about translations, we really haven’t done much "translating" yet. That’s kinda important! Symfony has integrations with a few different Translation Provider services. Let’s look at @Crowdin, and see how it works! symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

We've successfully pushed our English translations up to @Crowdin. Merci beaucoup! now, let's automatically translate and pull them back down! symfonycasts.com/screencast/tra…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Symfony Messenger! We know you’re going to *love* working with this component... and the app we’ve built with it ? #Symfony #queues #async #cats #hashtags symfonycasts.com/screencast/mes…

Symfony Messenger! We know you’re going to *love* working with this component... and the app we’ve built with it ? #Symfony #queues #async #cats #hashtags
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Let’s get to the heart of messenger! Create a message class, a handler class, *link* them together, and dispatch to the bus. Oh... and we’ll explain what the heck a “command bus” *is* in the first place. #Symfony symfonycasts.com/screencast/mes…

Let’s get to the heart of messenger! Create a message class, a handler class, *link* them together, and dispatch to the bus. Oh... and we’ll explain what the heck a “command bus” *is* in the first place. #Symfony 
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

The command (message) class and handler inside Messenger are a team: the message class holds *whatever* data you need to pass around while the handler uses that info (+autowired services) to do the work! It’s refreshingly... simple. #Symfony symfonycasts.com/screencast/mes…

The command (message) class and handler inside Messenger are a team: the message class holds *whatever* data you need to pass around while the handler uses that info (+autowired services) to do the work! It’s refreshingly... simple. #Symfony 
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

We’re putting messenger to work, refactoring a controller down to 2 lines! That’s thanks to a new command class, a new handler and the debugging superpowers of debug:messenger... when I mess up #Symfony symfonycasts.com/screencast/mes…

We’re putting messenger to work, refactoring a controller down to 2 lines! That’s thanks to a new command class, a new handler and the debugging superpowers of debug:messenger... when I mess up #Symfony 
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Say hello to Messenger transports: the key system that allows you to send message to a queue instead of handling them immediately. Let’s get the Doctrine transport set up, route some messages there and see what it all looks like in the database! #Symfony symfonycasts.com/screencast/mes…

Say hello to Messenger transports: the key system that allows you to send message to a queue instead of handling them immediately. Let’s get the Doctrine transport set up, route some messages there and see what it all looks like in the database! #Symfony 
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

How can we *consume* messages from the queue asynchronously? By running Symfony’s worker command: php bin/console messenger:consume Dispatching new messages and watching them get handled async automatically? Gorgeous! symfonycasts.com/screencast/mes…

How can we *consume* messages from the queue asynchronously? By running Symfony’s worker command: php bin/console messenger:consume Dispatching new messages and watching them get handled async automatically? Gorgeous! 
symfonycasts.com/screencast/mes…
SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

A quick aside about Messenger, serializing Doctrine entities & (nerd-alert) the identity map! A fun look into a bug in our app and how Doctrine works internally. #Symfony symfonycasts.com/screencast/mes…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Let's update our Messenger message class to hold the entity id instead of the entire object. That'll fix a bug and follow a nice rule: make your message as small as possible. Bonus: we'll start learning to fail gracefully & see retries in action #Symfony symfonycasts.com/screencast/mes…

SymfonyCasts 🇺🇦 (@symfonycasts) 's Twitter Profile Photo

Half of the work for deleting an image in our app must happen now... but half could happen later. The solution? Split the command into 2 & dispatch from *within* the handler. We're breaking things down into smaller pieces to gain more control. #Symfony symfonycasts.com/screencast/mes…