📚 The Notifier is a “new” component that was introduced in Symfony 5.0, the documentation said:

The notifier component can send notifications to different channels. Each channel can integrate with different providers (e.g. Slack or Twilio SMS) by using transports.

It’ very easy to use, you create a Notification and you pass it to the NotifierInterface::send and behind the scene the message will be send to the good provider.

In this example the message will be send to slack, the second parameter of the Notification (['chat/slack'] ) contains the channel here it’s chat and the provider here it’s slack.

(Vous pouvez retrouver cet article en 🇫🇷 ici)

In this article, I’ll show you 10 tips that can improve your PHP code 🔍 🐘

In order to make this article easier to read, I’ll write some pieces of code that I’ve encountered and introduce a commented solution if needed, as you know there are 4242424242424 ways to do the same thing ✨ and It’s OK to disagree with my solution 😅

👀 For my examples I use PHP 7.4

3,2,1… let’s start 🏁 🔥

1- In this use case, just return the expression 👌

2- Null coalescing operator for…

(Access to the English version here )

Dans cet article je te propose de voir 10 tips qui peuvent améliorer ton code PHP 🔍 🐘

Pour faciliter la lecture je vais écrire des morceaux de code que j’ai rencontré et proposer 1 solution de remplacement avec des commentaires si besoin, comme tu le sais il y a 4242424242424 manières de faire la même chose ✨ et tu as clairement le droit de pas être d’accord avec ce que je propose 😅

👀 Pour mes exemples j’utilise la version 7.4 de PHP

3,2,1… c’est parti 🏁 🔥

1 - Dans ce…

👋 Hey, let’s continue our series about how to test services and classes that uses external API, this article is the second, in the first one we saw how to test the Symfony Http Client with behat

In this article back to the basics with PHPUnit 🔥

In our use case, we want to expose an endpoint that says if a user exists or not BUT we don’t have the information in our system (database…).

We have to ask an external API if a user exists, before asking the API we should get a token or a hash (for simplification)…

(Retrouvez cet article en 🇫🇷 sur le blog de Yousign)

Each new version of Symfony brings a lot of new features. But version 5.1 offers a new authentication system and this system changes the internal behavior of Symfony security, to make it extensible and more understandable.

In this article, I will do an overview of this new system and other new features.

Let’s activate the new system

💡To use the new system, you must first update the security.yamllike this:

# config/packages/security.yaml
enable_authenticator_manager: true

What is changing? 📚

The authentication workflow is simplified: in the new system, there is only one Listener AuthenticatorManagerListener who will pass the request to…

What is Behat?

Behat is an open source Behavior-Driven Development framework for PHP.

In few words, It helps us to write end-to-end tests with gherkin each line of gherkin is a step and each step corresponds to a PHP function executed to assert or execute the statement.

Example of end-to-end test with behat :

Our use case, test the PUT operation of an API

The test could be like :

To be honest, I’m not a big fan of functional tests with PHPUnit, I found them “ugly” and some of them can be difficult to read so I prefer to hijack Behat of its first purpose (BDD testing)…

Everybody wants to build robust applications but as the AWS CTO put it so well: “Everything fails, all the time". This is why, as a professional, you should have an excellent disaster recovery.

When your application is down the sooner you know it, the more you increase your chances of getting back to normal.

The health check consists to ping a server and checks the status code, We will build a PHP script that ping servers and sends notifications to a Slack channel if the server returns a server error (between 500 and 600).

We will use vanilla PHP, the…

(english version here)

Une des fonctionnalités les plus puissante de Symfony est le container de service et l’injection de dépendance, il permet de manipuler la définition des services de différentes manières et permet de résoudre des problèmes complexe avec des solutions simple.

Dans cet article, je vais vous montrer comment vous pouvez manipuler la définition d’un service au runtime 🚀.

Notre cas d’utilisation est simple, nous avons une application dans de nombreux pays, chaque pays a des paramètres spécifiques mais ils ont le même code source applicatif, et selon l’endroit où l’application est déployée, nous voulons un debugger spécifique.


(article originale écrit pour WeLoveDevs revu et corrigé par Nicolas Detrez)

Salut à toi jeune entrepreneur 🤙

Je ne vais pas revenir sur le rôle du Lead Developer et son importance au sein d’une équipe car tu trouveras pléthore de ressources sur ce sujet. Mais je vais t’exposer certains points que j’aurais aimé connaître et qui t’aideront à mieux appréhender ce rôle.

Avant d’aller plus loin, je vais me présenter en 2 mots. Je suis développeur et formateur, et actuellement je coach une équipe de devs. Concrètement, je les accompagne dans leur montée en compétences, j’interviens sur des sujets qui…

(Version Française)

One of the most powerful features of Symfony is the service container and the dependency injection, it allows us to deal with services definition in many ways and help us to solve some complex problems in an easy way…

In this article, I’ll show how you can deal with service definition at the runtime 🚀

Our use case is simple we have an application in many countries, each country has specific parameters but they have the same base code, and depends on where the application is deployed we want a specific debug.

In the French Context, we have…

Smaine Milianni

Fullstack Developer- certified Symfony 4,5 and certified AWS Solution Architect - Freelancer - Remote Worker

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