Profile avatar
zenstruck.com
Open Source, #PHP, #Symfony Developer. Writer @SymfonyCasts.com, @Symfony.com Core Member. Author of https://github.com/zenstruck packages.
11 posts 405 followers 43 following
Prolific Poster

Tests are always important, but even more so when dealing with e-commerce. Let’s write a full integration test for our LemonSqueezy webhook so we can sleep easy at night! 😴

We have Symfony successfully parsing our Lemon Squeezy webhook. Now, let’s create a RemoteEvent consumer to handle all that webhook biz logic!

Every time, without fail...

Our LemonSqueezy webhook is getting through to our dev server but... Symfony doesn't know what to do with it. Let's show it how with a custom webhook request parser! symfonycasts.com/screencast/l...

Testing webhooks locally? Time for some tunneling magic with Ngrok & LemonSqueezy!

We need to connect LemonSqueezy customers to our app’s users. How can we do this? Webhooks! Let’s install and configure symfony/webhook to handle the heavy lifting!

Foundry 2.5 is released 🎉 This release comes with "in-memory" repositories support, and a nice performance improvement. github.com/zenstruck/fo... The "in-memory" behavior is still experimental, feedback is very welcome! #php #symfony @zenstruck.com

Our order logic is solid, but OrderController looks like it was written by someone after *way* too much coffee. Time to organize everything into a single, centralized LemonSqueezyApi service.

Bonus Chapter! Never heard of Messenger MonitorBundle? We gotta fix that: give yourself a UI for tracking messages, handling times, failures and retries. Heck if you’re using scheduler, check those details out too!

Our customer just purchased their E-lemonade, yum! Now we need to redirect back to our app instead of the LemonSqueezy order page. We’ll also find and smash a bug :bug: with our shopping cart. symfonycasts.com/screencast/l...

Trying to sell multiple products using LemonSqueezy in one checkout? Turns out... you can’t. Let’s not let that be a blocker though - we can find a workaround! symfonycasts.com/screencast/l...

We’re moving on from hard coding LemonSqueezy IDs — those will be a pain to manage long-term! Let’s replace them with dynamic values using environment variables for the store ID and a dedicated field in the Product entity for variant IDs. symfonycasts.com/screencast/l...

🚀 New in Symfony 7.3: Configurable Compound Rate Limiter ➡️ https://symfony.com/blog/new-in-symfony-7-3-configurable-compound-rate-limiter

We’ve seen the checkout process using the LemonSqueezy storefront. Now, we’ll work to integrate it into our app’s checkout system with some fancy API calls. symfonycasts.com/screencast/l...

Time to integrate LemonSqueezy into our app “Squeeze the Day”! Step 1, create a “scoped” HTTP client to make it easy to send API calls. Anyone up for a refreshing e-lemonade? 🥤 symfonycasts.com/screencast/l...

🚀 New in Symfony 7.3: Invokable Commands and Input Attributes ➡️ https://symfony.com/blog/new-in-symfony-7-3-invokable-commands-and-input-attributes

Before integrating LemonSqueezy into our app, we first need to understand how the checkout process works using the custom storefront they give us. Let’s spend some fake money on fake lemonade! symfonycasts.com/screencast/l...

🚨 NEW COURSE ALERT 🚨 “Merchant of Record” (MoR) digital payment processing with Lemon Squeezy! Time to set up our checkout and leave the tax headache to someone else. symfonycasts.com/screencast/l...

📰 #FridayTechreads New article on our blog 🙌 Silas Joisten writes about a new way to write tests in #Symfony. Explore Zenstruck Foundry 🏭 and improve the quality of your code now! Read the full article here 👉 bit.ly/4ikakOr #PHP #tests @zenstruck.com

Internal Symfonycasts hack day next Friday on MakerBundle: CI needs help, need to simplify to ease maintenance, property hook changes on make:entity & more. My cancer has not been kind to Maker, time to revitalize & make(r) it sustainable 🙃

There’s a new way to work with files in Symfony. 📦 Kevin Bond unveils a fresh approach at #SymfonyOnline June 2025. 🎤"Rethinking File Handling in Symfony " https://symfony.com/blog/symfonyonline-june-2025-rethinking-file-handling-in-symfony

I just released zenstruck/foundry 2.4 This release comes with some nice new features check the release note for more info! github.com/zenstruck/fo...

Bonus! Let’s talk Symfony Scheduler: a pretty incredible way to schedule tasks, ensure they run & even see a run down of what tasks are scheduled and when. An absolute hidden Symfony gem 💎

Let's fire up ngrok & the under-appreciated server:dump to watch webhooks hit our local server in real time. User opens the email... boom! MailerEngagementEvent baby!

Covering the Webhook *and* RemoteEvent components in 1 chapter? They said it couldn't be done. And yet, here they both come: allowing us to handle Mailtrap webhooks with ease

We’ll have an extra peaceful cryogenic rest on that trip to Mars knowing our reminder emails are working thanks to our tests. To write them we’ll use zenstruck/console-test which makes writing console tests a breeze!

Creating Twig functions/filters just got a whole lot easier thanks to @jerome.tamarelle.net. I love this! twig.symfony.com/doc/3.x/adva...

The mailto link is a simple way to open an email client with a pre-filled email. But what if you want this email to have a pre-filled attachment? Let's dive into how to do this with Symfony Mailer.

We've done the ground work for a new feature, now let's add it: reminder emails sent via a CLI command. Don’t forget to arrive before lift off! 🚀

Our email is pretty… thank you designers! 🦸‍♀️ It’s now up to us to make sure every email uses the same, pretty layout, else, designers => 😢. Let’s leverage plain old Twig to add an email layout. Plus, start working on a new feature for our app!

🧪 Email testing time! We’ll use zenstruck/mailer-test to make clean, readable & crazy fun email assertions in our functional tests. $this->mailer()->assertEmailSentAndIsAwesome()

Friendly reminder: A 1 day Symfony conference is coming to the US (Chicago) in 12 days. Ryan will be there with Leanna and an *absurd* speaker list. We'll be road-tripping from Grand Rapids with Diego and Kevin from Symfonycasts. Can't wait! buff.ly/EMpZbp4

Our emails are being sent asynchronously but we have a subtle, but big problem: the links are broken! Let’s see why, and how to fix! Also, a bonus Symfony CLI trick to make using messenger in development easier.

Sending an email in a controller has some pitfalls. Let’s use Symfony Messenger to send emails asynchronously and watch our page ZOOM!

It doesn't end once a production email is sent with @Mailtrap. You can track the "flow" of each email. With Symfony Mailer, you can go even further by adding tags and metadata.

Fancy email testing tools :star-struck:. But sending real, production emails is also wickedly easy using @Mailtrap. Trip booking notification engage!

▶️ Learn how to send emails in a modern and super efficient way with #Symfony! 🎓 From basic text email to rich content with images and attachments, fine tune your emails with tons of tips! 🙏 Thanks to @zenstruck.com for the records of this series https://symfonycasts.com/screencast/mailtrap

We’re all about less manual work, so, if all your emails have the same “from” address, setting it for each email is super lame. Let’s use Mailer events to set it globally!

Use Symfony Mailer and experience the ease of adding attachments and embedding images in your emails. It’s not rocket science!

[Release] Symfony UX 2.23 A small but mighty release with improvements & fixes across multiple components. 🌿 Autocomplete: TomSelect resets, results config 📍 Map: Distance helpers 📊 Charts: Destroy on disconnect ..and a lot of fixes! Full Changelog: ux.symfony.com/changelog #symfony #ux #release

🏗️ Constructing an HTML email that looks consistent in all email clients is hard. You have to use <table>s 😱! Lucky us there are two tools to make it easier!

HTML without CSS is like bread without butter. Let's butter our email's HTML with CSS! 🧈🍞

Plain text emails? Boring… 🥱 Let’s add an HTML version but see how a text version can be automatically generated from it.

What’s better than using the Symfony Profiler locally to preview emails? @Mailtrap’s email testing tool — you’ll get a preview that better represents what email clients will display ✉️  🚀

Let’s get our interstellar tourists excited for their trips with an improved booking confirmation email. Adding a bit of Twig for the text body should do the trick! To infinity and beyond!

You just booked your trip to Krypton - it cost 10,000 credits and you don’t even get a confirmation email? Time to fix that with Symfony Mailer!

🚨 NEW COURSE ALERT 🪐 ✉️ Send, preview, test & track beautiful HTML+CSS emails with Symfony Mailer, Webhook and @Mailtrap.

Final chapter! We’ll likely have multiple places in our code where we check-in a starship. Let’s “encapsulate” this logic into a “rich entity method” / make our model “smart”: $screencastPost->generateNerdJoke()