Nos articles taggués « symfony »
State replication with Symfony Workflow, Messenger, and RabbitMQ
In this article, we’ll see how we can replicate some data between two different applications that live in two different locations. But the special thing is that the network is not reliable! Yeah, network is never reliable, but here, it’s really not 😁 The project has two applications:…
Lire la suite de l’article State replication with Symfony Workflow, Messenger, and RabbitMQ
About Symfony Messenger and Interoperability
The Messenger component has been merged into Symfony 4.1, released in May 2018. It adds an abstraction layer between a data producer (or publisher) and its data consumer. Symfony is thus able to send messages (the data) in a bus, usually asynchronous. In concrete terms: our controller…
Lire la suite de l’article About Symfony Messenger and Interoperability
A new way to squash your Doctrine migrations
As time flies, Doctrine migrations stacks. After many years of working on a project, you’ll have a high number of migrations. Even if it’s not a big issue, It takes a lot of space in your code sources, and it can take some time in your CI (Continuous Integration). Doctrine already…
Lire la suite de l’article A new way to squash your Doctrine migrations
Make Your Entities Sortable in EasyAdmin
Imagine that your EasyAdmin administration backend contains an entity (Sponsor in our example) and that you want to give the user the possibility to choose the order in which these sponsors are displayed on the application frontend (maybe because alphabetical sorting is not relevant).…
Lire la suite de l’article Make Your Entities Sortable in EasyAdmin
We are open-sourcing our QOTD application
At JoliCode, we like to share our knowledge and our tools. We also like to have fun. That’s why we created a QOTD application for our Slack workspace. We are happy to announce that we are open sourcing it so you can use it in your own workspace. This project is a « pet project ».…
Lire la suite de l’article We are open-sourcing our QOTD application
Symfony, reverse proxies and IP protection
Following an issue encountered on one of my projects, I had to dive into how IP protection works in Symfony applications when at least one reverse proxy is in front of them. After some research, trial and error, I thought it was the perfect opportunity to go back to the basics, then…
Lire la suite de l’article Symfony, reverse proxies and IP protection
Symfony, reverse proxies et protection par IP
Suite à un souci rencontré sur un de mes projets, j’ai dû me plonger dans le fonctionnement de la protection par IP dans nos applicatifs Symfony lorsque des reverse proxies se trouvent devant. Après quelques recherches et tâtonnements, je me suis dit que c’était l’occasion parfaite…
Lire la suite de l’article Symfony, reverse proxies et protection par IP
How to use mock with Symfony’s WebTestCase and PHPUnit
We faced a problematic situation while testing our application, and we may have found a super cool solution. It’s a bit experimental, but we want to share it with you anyway. The context We have a service that usually makes calls to an external API. It’s a wrapper around the Stripe…
Lire la suite de l’article How to use mock with Symfony’s WebTestCase and PHPUnit
Symfony Webhook & RemoteEvent, or how to simplify external event management
During the SymfonyCon 2022 conference at Disneyland Paris, Fabien Potencier unveiled two new components to the Symfony community: Webhook and RemoteEvent. They have recently (March 2023) been merged into the 6.3 branch, so we can start testing them, which is what we’ll do in the…
Symfony Webhook et RemoteEvent, ou comment simplifier la gestion d’événements externes
Lors de la conférence SymfonyCon 2022 à Disneyland Paris, Fabien Potencier a dévoilé à la communauté Symfony deux nouveaux composants : Webhook et RemoteEvent. Ces derniers ont récemment (mars 2023) été mergés dans la branche 6.3 et nous pouvons donc commencer à les tester, c’est…
Rendez-vous service et optimisez votre environnement de développement
Ceci est le transcript d’un lightning talk donné par Bastien lors du SymfonyLive Paris 2023. On monitore toujours la production. Mais qui monitore l’environnement de développement ? Il paraît évident de monitorer les performances de la production, c’est une pratique quasiment…
Lire la suite de l’article Rendez-vous service et optimisez votre environnement de développement
Notre retour sur le SymfonyLive Paris 2023
Nous étions nombreux de JoliCode à assister, la semaine dernière, à une nouvelle édition du SymfonyLive Paris. Cette conférence se déroule depuis des années au sein de la magnifique Cité Universitaire de Paris. Voici notre retour sur ces 2 jours de conférences dans l’écosystème Symfony.…
Lire la suite de l’article Notre retour sur le SymfonyLive Paris 2023
Leverage Symfony VarDumper Component to Enhance your Dumps
Symfony’s VarDumper Component is a game changer when it comes to debugging. It allows us to dump variables in a clean and efficient way. We hope you already use it in your projects. If not, you should definitely give it a try! Today, we’ll see how we can extend it to dump our objects, …
Lire la suite de l’article Leverage Symfony VarDumper Component to Enhance your Dumps
Comprendre et éviter les attaques CSRF grâce à Symfony
CSRF veut dire Cross-Site Request Forgery en anglais, une traduction française pourrait être « Falsification de requêtes inter-sites ». Dans cet article, nous allons faire un rappel de ce qu’est une attaque CSRF et comment Symfony nous en protège. Puis au travers d’un exemple…
Lire la suite de l’article Comprendre et éviter les attaques CSRF grâce à Symfony
Handling signal with Symfony Command
A few years ago, we wrote an article (in french) about how POSIX signals work in PHP. Today, we want to share with you how to handle signals with Symfony Command. ⚠ This works only as of Symfony 6.3. Symfony 6.3 will be released in May 2023. By default, Symfony Command does not handle…
Lire la suite de l’article Handling signal with Symfony Command
Aggressive Caching with Symfony HTTP Client
The Symfony CachingHttpClient The HttpClient component comes with a client that can cache responses when possible. It means the client won’t issue another request to the server if the response is already available in the cache. It works like your browser by reading some headers like…
Lire la suite de l’article Aggressive Caching with Symfony HTTP Client
How to Fix Memory Leak in Doctrine Migrations
I had to write a Doctrine migration to fix some bad data. Unfortunately there was so much data (~600K records) that the migration leaked. The memory consumption reaches about 12Gb! That’s not really acceptable! Usually, when there is a leak in Doctrine DBAL (not the ORM), it comes…
Lire la suite de l’article How to Fix Memory Leak in Doctrine Migrations
Dites-nous tout !
Un de nos articles vous a aidé dans votre travail et vous voulez nous remercier ?
Vous avez trouvé une typo ou une erreur ?
N’hésitez pas à nous le faire savoir
en nous envoyant un message