New course alert! π¨ Doctrine Inheritance #1
Want to share fields and behavior across multiple entities? Letβs start with the simplest form: the Mapped Superclass!
New course alert! π¨ Doctrine Inheritance #1
Want to share fields and behavior across multiple entities? Letβs start with the simplest form: the Mapped Superclass!
Rewind βͺ Symfony Messenger #32
We've talked about command & event buses already. Now it's time to talk about the final type: a school bus! I mean, a query bus!? symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #31
Ready to see a cool Symfony services config trick? We use auto-registration, sub-directories and tags to bind our command handlers *only* to the command bus & our event handlers *only* to the event bus. An optional, but geeky-fun step! symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #30
Messenger has a few other built-in, but optional middleware that we haven't talked about. Let's look into the validation & doctrine_transaction middleware, talk about what each does and why you might (or might not) use them #Symfony symfonycasts.com/screencast/m...
Twig loads all extensions on each request - even unused ones. To keep things fast, push heavy logic into a Twig runtime. Pro tip: the runtime can be any service, not just something Twig-specific.
π symfonycasts.com/screencast/b...
Rewind βͺ Symfony Messenger #29
If Symfony has an EventDispatcher... and also Messenger is able to dispatch events... whatβs the difference between EventDispatcher & Messenger? And when should I use one versus the other? Excellent question! symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #28
Weβve created an βeventβ and an βevent handlerβ. Letβs finish this by dispatching that into our Messenger-powered event bus. Also: what happens if an event has *no* handlers? In a perfect world... that should be allowed. #Symfony symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #27
Event time! Weβll create our first βeventβ class for Messenger & corresponding event handler. Whatβs the difference between an event and a message? Letβs find out! #Symfony symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #26
Weβre on our way to using Messenger as an event bus! Letβs configure a separate bus service for this & see βnamed autowiringβ in action: the system that allows you to autowire different message bus services in different situations symfonycasts.com/screencast/m...
When building bundles, not every class is meant to be used by end users. My preference is to mark those as "internal", and "hide" services so they donβt show up during container debugging. Hereβs how I do it π symfonycasts.com/screencast/b...
Rewind βͺ Symfony Messenger #25 When you deploy new code to your Symfony app, will your workers see the new code? Not until you restart them! Learn about a command to restart *all* workers, options to make sure workers don't run too long & an updating messages gotcha symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #24 Deploy time! Messenger is delivering messages to our queue... but how do we run our workers on production? If your host doesn't handle it for you, Supervisor will. Let's get this tool set up, kill some workers & watch them restart symfonycasts.com/screencast/m...
Want to unlock the power of #Symfony Flex for your own bundles? Learn how to create a "contrib" Flex recipe with us -> symfonycasts.com/screencast/b...
Have you ever built a PHP package youβre proud of? Well, you should publish it to Packagist so anyone can install and use it with Composer. Hereβs a quick tutorial on how to do it -> symfonycasts.com/screencast/b...
Want every push to your PHP project tested automatically? GitHub Actions makes that easy! Hereβs how to get started quickly: symfonycasts.com/screencast/b...
Symfony Form Basics #11
Letβs wrap up our unmapped form by switching it to GET, cleaning up the query string, reading the submitted data, and giving it a Turbo-powered boost β‘.
Find bugs without even running your code. Use PHPStan to add static analysis to your project and start catching issues your tests miss --> symfonycasts.com/screencast/b...
Symfony Form Basics #10
Symfony form types donβt have to be tied to an entity. Letβs turn a plain HTML form into a Symfony form and explore some other cool options along the way!
Consistent code style = happier humans reading your code. Install PHP-CS-Fixer and start automating the boring stuff --> symfonycasts.com/screencast/b...
Symfony Form Basics #9
A fully customizable CRUD for an entity in seconds? What a dream! One command gives us the whole UI, then we step in for the fun part: tweaks, fixes, and styling!
Happy Thursday - here's a quick guide to stateful vs stateless CSRF protection in Symfony β and how request protection works today. #Symfony #shorts
www.youtube.com/shorts/URNBE...
Symfony Form Basics #8 Time for some polish π . Weβll reorder fields, customize the layout, and tweak styling directly in Twig. Then handle global form errors and add help text that steers users away from validation errors in the first place. symfonycasts.com/screencast/s...
Symfony Form Basics #7 Validation isnβt just for form types. Weβll move constraints onto our entities, explore how null values bypass most constraints (and how NotBlank changes that), then wrap things up with CSRF protection!
Rewind βͺ Symfony Messenger #23
By using Symfonyβs in-memory transport, we can short-circuit the message delivery system in the test environment and assert that the *exact* right message was sent. Boom!
symfonycasts.com/screencast/m...
Symfony Form Basics #6 Client-side HTML5 validation is niceβ¦ but itβs easy to bypass. Letβs add real server-side validation with the Validator component!
Rewind βͺ Symfony Messenger #22
How can we unit test our Messenger setup? Since weβre writing great code, we can unit test all of it! Letβs bootstrap a functional test for the upload endpoint on our way to asserting that the message was received by the transport!
symfonycasts.com/screencast/m...
Symfony Form Basics #5
Time to dress our form up for the big dance! We'll apply a built-in form theme, adjust individual field attributes, and improve the `EntityType` user experience. π
Rewind βͺ Symfony Messenger #21
While developing, you *can* run the βmessenger:consumeβ command to handle the messages. *Or*, you can use the βsyncβ transport and a configuration trick to handle messages *now* and keep life simple. #Symfony
symfonycasts.com/screencast/m...
Rewind βͺ Symfony Messenger #20
Some messages are more important than others. If your queue gets filled with a mixture of βsuper importantβ and βless importantβ messages, can we tell Messenger which to handle first? Totally! By creating βpriority transportsβ #Symfony
symfonycasts.com/screencast/m...