Les articles écrits par « Grégoire Pineau »
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
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
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
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
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 Configure DNS for Developing Webapp with Dnsmaqs once for all
When you install a new project, you often need to edit your /etc/hosts file. It isn’t really painful but wouldn’t it be better if we could avoid it? I have used Dnsmasq for a decade to solve these kinds of problems, and I’m really happy with it. I asked around me, and it does not…
Lire la suite de l’article How to Configure DNS for Developing Webapp with Dnsmaqs once for all
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
How TaggedLocator Can Help You Design Better Symfony Application
One of the features I love the most in Symfony is the TaggedLocator. It seems to not be well known and I believe it deserves more visibility! That’s why I want to explain how it works. I often see blog posts about ServiceSubscriberInterface and how to use it. In my humble opinion, …
Lire la suite de l’article How TaggedLocator Can Help You Design Better Symfony Application
Redis et la mémoire de PHP sont dans un bateau, il coule
La situation initiale 👍 Dans un de nos projets, nous avons un endpoint d’API qui retourne de gros JSON à ses clients. Les clients sont des serveurs, donc la bande passante n’est pas un problème. Il y a quelques années, ces JSON ne dépassaient que rarement les 50 Mo. Et au fur et…
Lire la suite de l’article Redis et la mémoire de PHP sont dans un bateau, il coule
SymfonyCon at Disneyland Paris for the 15+2th birthday of Symfony
After more than two years of waiting, SymfonyCon 2020 2021 2022 was held at Disneyland Paris on November 17th and 18th. We were delighted to meet community members, other members of the Core Team, as well as contributors who have been involved in Symfony for years. The venue, very…
Lire la suite de l’article SymfonyCon at Disneyland Paris for the 15+2th birthday of Symfony
SymfonyCon Disneyland Paris pour les 15+2 ans de Symfony !
Après plus de deux ans d’attente, la SymfonyCon 2020 2021 2022 s’est tenue à Disneyland Paris les 17 et 18 novembre derniers. Nous étions ravis d’y retrouver des membres de la communauté, les autres membres de la Core Team, ainsi que de rencontrer en personne des contributeurs qui…
Lire la suite de l’article SymfonyCon Disneyland Paris pour les 15+2 ans de Symfony !
We are open-sourcing a silly Slack bot, guess what it does!
At JoliCode we use Slack to communicate. And to bring fun to our daily life, we have created a #monologue channel where we can share our thoughts, our feelings, our dreams, our fears, our jokes, our memes, our pictures, our videos, our music, our links, our code, our life. But we…
Lire la suite de l’article We are open-sourcing a silly Slack bot, guess what it does!
JoliDay 2022 avec du chêne, des bruits d’animaux, des Lego et de la Badoit
Comme tous les ans, nous avons profité d’un jour férié (en application de la journée de solidarité) pour nous retrouver tous ensemble et faire des projets ni Web ni Mobile, mais toujours de qualité 👌. Nous avons un gros faible pour le DIY et retrouvons la même gratification à résoudre…
How to fake time in a MySQL Container
Sometimes, you may want to fake the time in your test suite to ensure your code behaves well in all situations. There is a famous library called libfaketime that allows you to set a specific time for a program. This library leverages the LD_PRELOAD environment variable. This variable…
Lire la suite de l’article How to fake time in a MySQL Container
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