For the first time, I wrote a tutorial to learn the popular Symfony Framework by creating a simple shopping cart from scratch. I’ve been developing with Symfony for more than 8 years and I think it’s time for me to share my experience with you through this series of articles.

The tutorial describes the creation of a shopping cart with Symfony 5 step by step:

Hope you enjoy the ride. …


Mandrill is a transactional email product designed to help applications or websites to send emails such as password reminders, account creations, callbacks, order notifications, etc.

Symfony provides Mailer and Swift Mailer components to help you send emails that support multiple email services including Mandrill.

What is a webhook?

A webhook is an event-driven system that calls the client when an event that interests them occurs. This is the opposite of polling, which consists of having the client continuously check if an event has occurred.


Google reCAPTCHA is a free service that protects your website from spam and bots. Using Symfony Form with Google reCAPTCHA code will be effective and efficient way of validating the user against bots.

Integrating Google reCAPTCHA is recommended compared to the custom captcha. Indeed, the Product Manager of reCAPTCHA at Google explained:

CAPTCHAs have long relied on the inability of robots to solve distorted text. However, our research recently showed that today’s artificial intelligence technology can solve even the most difficult variant of distorted text at 99.8 per cent accuracy. …


Background image by Francesco Mazzoli

Spring has arrived! At this time of year, everyone cleans their house thoroughly. As a developer, I suggest a different approach: Clean up your code.

What is clean code?

Clean code is easy to read, understand and maintain by the author of the code and other developers.

Why you should write clean code?

Writing clean code is a necessary mindset. It is very important for you and your co-workers. It will be easier and faster to improve, maintain and test a product if everyone understands the code. This increases the quality of a product and decreases the technical debt.

️How to clean your code?

The refactoring is to fight technical debt. It transforms a dirty…


Imagine: You’ve just spent a lot of time creating an amazing email for your clients, but when you send a test mail in your mailbox, you see that it looks bad. No worries, this article helps you to code your first responsive email in 10 minutes only!

Why emails are so hard to code?

There is a main reason that creating a responsive email is not an easy task: There is no standard in the way email clients render HTML. Each device and email client render HTML differently.

The best solution is to use a framework that it solves you most of the quirks of email clients…


MJML is an email templating language created by Mailjet. It provides features easy to use for reduce the pain of coding responsive emails.

Twig is a template engine powered by Symfony. It is an awesome option for rendering HTML. It got some nice features like blocks and inheritance.

Why use MJML and Twig together ?

Using MJML and Twig together allows you to use Twig features with MJML. It’s like adding an extension to MJML. Let me show you below the Twig features I use with MJML.

Layout

Don’t repeat yourself and create a layout that you can extend for all your emails.

layout.mjml.twig

<mjml> <mj-body> <mj-section> <mj-column>…


When I discovered MJML, I was happy to find a framework that helps me code responsive email. But I’m a PHP developer and I want to use it in my application. This is why I created a simple library to make easier the integration of MJML for all those who want to create responsive email in PHP.

Installation

composer require qferr/mjml-php

Rendering templates

There are two ways for rendering MJML in PHP:

  • using MJML API, if you don’t want to install anything. It’s free to use !
  • using MJML library, if you don’t want to depend of an external service.

Rendering from the API

You have to…

Quentin Ferrer

I’m a french web developer. I develop in PHP with the popular Symfony framework.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store