Kevin Bond
@zenstruck.com
420 followers 44 following 16 posts
Open Source, #PHP, #Symfony Developer. Writer @SymfonyCasts.com, @Symfony.com Core Member. Author of https://github.com/zenstruck packages.
Posts Media Videos Starter Packs
zenstruck.com
It'll be on the SymfonyCasts blog. Good idea about a composer plugin tutorial. I will think about that!
Reposted by Kevin Bond
symfonycasts.com
Our translations work 🥳 but relying on the idea that all entities will have a getId() method? Kinda risky. Let’s make it rock-solid by letting Doctrine handle ID fetching - no hoping and wishing needed!
Fetch the Object ID with Doctrine
Currently, our French translation data is being successfully displayed on the page. However, our current method of fetching the ID using "$object->getId()" is a bit shaky
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
🚨 New course alert: Reusable Bundles 📦! Bundle development received a facelift in Symfony 6. Let’s check this out by creating a real, usable bundle that we’ll eventually push to Packagist for all to enjoy. Step 1: Initialize our bundle!
Initialize the Bundle
Hey friends! Welcome to the *Reusable Symfony Bundle* course. I'm Kevin, and I'll be your *bundle navigator* on this journey
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
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.bsky.social, and see how it works!
Translation Providers
So far, we've mostly focused on translating our site from English to... English... What about French and Spanish? We've talked a bit about how we can manually send our "messages.en
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
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! 🕵️
`translation:extract` Command
So far, we've been creating translation keys and manually adding them, and their values to "messages.en
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
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.
Debugging & Linting Translations
Did you finish your homework? Don't worry, neither did I! Let's bike shed that for now and look at debugging translations. This'll be helpful for that homework anyway! ## Web Debug Toolbar On the English...
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
The SymfonyCLI makes local development a breeze - but works best when PHP is installed directly on your machine. Let's walk through setting up PHP (plus database extensions) and the SymfonyCLI on macOS/Linux/Windows so you're ready to start building Symfony apps. symfonycasts.com/blog/install...
Installing PHP and Symfony CLI Locally
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…
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
HTML in your translations, it's gonna happen. There isn't a perfect solution, so let's take a look at our options.
HTML in Translations
Here's another complex scenario. On our homepage, scroll down to the footer
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
Let's look at a more complex translation, one with dynamic values and pluralization, because "1 dinosaurs" doesn't sound quite right 🦖
Placeholders and Pluralization
Onward! Let's find a complex translation scenario. On the article page, scroll down and find the comments section
symfonycasts.com
Reposted by Kevin Bond
Reposted by Kevin Bond
symfonycasts.com
With the Translation component installed and configured, our next step is to figure out what language a user wants. There are a couple ways to do this, but let's look at the most robust one: Localized, or Translated routing.
Localized Routes
We installed the translation component. Go us! Also, our pages are advertised via the "lang" attribute as our default locale: "en"
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
🇬🇧 🔄 🇪🇸 🔄 🇫🇷 New course all about the Symfony Translation component! We'll take an English-only site, translate it into multiple languages, add a language switcher and let it loose on the world... First let's install the component.
Installing the Translation Component
Hey friends! e alegro de que te hayas unido a mí en este curso de sobre las traducciones de Symfony! In this tutorial, we're celebrating one of the oldest components in Symfony, but for the first time...
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
To track our starship parts let’s create a StarshipPart entity & load the database via Foundry. Don’t forget the “part” called toilet paper!
Part Entity
We already have starships showing up on the homepage thanks to the "Starship" entity we built in the last tutorial. But now, it's time to step up our game
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
Our Javascript event listener to sync LemonSqueezy customers with our app users has a little security issue. We could disable the listener in production and just rely on webhooks but that's lame! Let's fix the problem!
Improving Javascript Event Security
We've now showed syncing our LemonSqueezy customer ID with the user in our database using two different methods: *webhooks*, which made for a pretty solid production setup, and via *LemonSqueezy JavaScript...
symfonycasts.com
Reposted by Kevin Bond
symfonycasts.com
New tutorial time! We’re catching up & finishing up (I know, way overdue 🧠 ) our Symfony 7 track with Symfony 7 Doctrine Relations! We’re kicking off with alien animations AND audio from me, @weaverryan! 🌟
Setup
Hey friends! Welcome back! And welcome back to me if I can be so bold. I'm returning from my 14-month brain cancer "vacation"
symfonycasts.com
Reposted by Kevin Bond
zenstruck.com
Thanks for having me! Here are the slides: speakerdeck.com/kbond/rethin...

We'll get back to you about the shirts! 😀
Reposted by Kevin Bond