11/28/2024 | Press release | Distributed by Public on 11/28/2024 11:42
co-authored by Cédric Vincent, Florian Minin, Anthony Legros, Adriana Vizinho, Loic Doubinine
On October 10th-11th, 2024, several team members traveled to Disneyland Paris' Art of Marvel Hotel for Forum PHP 2024, organized by the AFUP (Association française des utilisateurs de PHP or the French Association of PHP Users). We were looking forward to taking part in the event as a Silver sponsor, with a stand in the hall.
If you're not familiar with the annual conference, it's the largest gathering of the French-speaking PHP community. Over the course of two days, more than 650 people were able to attend around thirty conferences divided into three parallel tracks, participate in a community evening, sponsor demos and test our now famous music quizzes.
Thanks to Deezer, twelve of us were able to attend the conference and man the Deezer stand.
We won't summarize the thirty or so talks here, as they will be available to view in December on the AFUP Youtube channel like an advent calendar. Instead, we've put together a small selection of our favorite topics.
How can we not mention the two talks presented by our Deezer colleagues? Right after the opening keynote, Adriana talked about management with a very real comparison between an orchestra and a tech team. On the same day, during the afternoon session, Vincent gave a talk about setting up tracing in an application using the OpenTelemetry protocol.
"L'équipe technique vue comme un orchestre : l'individu au service du groupe"
by Adriana VIZINHO, Head of Engineering at Deezer
Adriana began her talk by drawing parallels between the different positions in an orchestra and those in a tech team. This was followed by an overview of the workings and objectives of an orchestra, with real-life cases such as a malfunction during a performance, as well as personal feedback. All this was done to highlight the importance of team cohesion, initiative-taking and common objectives that all members of an orchestra share. In conclusion, it was a good overview of the management issues that a tech team may encounter and the ideal vision of a manager's role that everyone hopes for.
Ask yourself the following questions about your technical team:
"Les nouveautés dans Symfony 7.x"
by Nicolas GREKAS at SYMFONY SAS
What is new with Symfony?
First of all, Nicolas reminded us of best practices to update the framework easily and confirmed the release date of version 7.2 at the end of November. He invited us to update bug fixes every month, minor versions every six months, and use continuous migration to have a major version every two years. In his presentation, he showed some new features (html sanitizer, clock, remote event, etc.), bridges (mailer, sweego, postal, etc.) and news on dependency injection (long list of new attributes).
"PHP/Parallel : Accélérer sensiblement ses temps d'exécution"
by Thierry Kauffmann, Linux systems administrator at Arawa"
PHP/Parallel is a PHP extension that allows you to perform multithreading.
The speech was a ROTI of a specific project where, thanks to this extension, Thierry, a Linux systems administrator at Arawa, managed to handle load balancing of video conference servers for the government (he was able to reach 100 SSH connections in two seconds instead of three minutes in sequential).
Thierry started with some definitions to distinguish the main concepts of multithreading. We won't go into details but what we need to understand here is that PHP isn't able to handle multithreading by default because of its engine, but thanks to the Parallel extension, it's possible to launch multiple threads at the same time.
The Parallel extension, which is available on GitHub, relies on the following principle: "Do not communicate by sharing memory; instead, share memory by communicating." It allows you to handle new objects to implement parallel execution.
Basic examples were presented to highlight the usage of the library. Then, at the end of the presentation, Thierry discussed the limitations of this extension:
Even though references cannot be used (which limits the use of objects), the issue can be resolved using serialization.
"De "0" à "tracing distribué" en quelques lignes de code, c'est possible !"
by Vincent LEPOT, Senior Expert Back End SRE at Deezer
We started the afternoon with a presentation on application tracing by our colleague Vincent.
Starting with a simple application that manages users' favorite films, he showed us how to set up distributed tracing on a PHP application in just a few steps, using the OpenTelemetry protocol:
Once the tracing is in place and using a viewer such as Tempo Grafana, the data collected can be used to monitor error problems in your application, as well as highlight latencies due, for example, to the multiplication of SQL queries (N+1) or multiple synchronous API calls.
"How to debug bizarre PHP bugs"
by Kévin DUNGLAS, Creator of FrankenPHP and Co-founder of "Les Tilleuls.coop"
This presentation was a personal return of experience on a complex bug that was related to the Xdebug library itself.
Kévin Dunglas proposed an approach that allows us to identify the root cause of a bug. First, he exposed a decision tree from two possible points of view:
If this wasn't enough to find the source of the problem, he listed the several steps to follow to find it:
Kévin also explained how to submit clean bug reports to the maintainer.
You can find his slides here.
"Une Monade, simplement, c'est quoi ?"
by Gina BANYARD, Core Developer at PHP Foundation
During this presentation, Gina, core developer at PHP Foundation, first tried to demystify the mathematical term "monad." Then, she went on to explain the way monads are actually used in PHP programming, with a focus on error management. She showed us the main types of monads like 'maybe,' 'either' and 'exception.' The talk offered an approach to functional programming that differs from traditional object-oriented programming. The way monads work reminded us of the Pipeline design pattern.
Gina's slides can be found here.
"Et si on repensait les ORMs ?"
by Baptiste Langlade, Software architect
Baptiste, a software architect, started by talking about Domain Driven Design using the example of a car and the registration card of the vehicle to introduce his talk about ORMs. After, he explained Formal ORM and compared it with Doctrine ORM. In short, Formal can be used by storage DB (mysql, postgres, mariadb), Filesystem (concrete, S3, memory), ElasticSearch and the ecosystem Inmind. He pointed out that he gained a lot from using the Formal system instead of the Doctrine one (Formal is 40% faster than Doctrine).
Formal is an ORM that he created himself and continues to maintain. He uses it for different cases:
"Optimiser les performances de votre API avec AutoMapper"
by Joël WURTZ, Web Developer at JoliCode
AutoMapper is an open source PHP library created by JoliCode, which enables you to map one schema (object or array) to another. Compared to Symfony's Serializer, it generates code instead of relying on metadata, which significantly improves performance.
The AutoMapper tries to map your properties automatically, but if you have custom normalizers, you will need to migrate them to transformers.
Joël, web developer at JoliCode, recommends using DTOs, with 1 endpoint = 1 DTO, for two reasons:
You can find his slides here.
"The Business of Bisecting"
by Pauline Vos, freelance software engineer and consultant
Pauline Vos, freelance software engineer and consultant, gave a talk on Git, with a focus on the git bisect command, which is very useful for identifying the commits responsible for a regression/bug.
She started with a simple demo: when facing a regression on a website, rather than manually searching through the git history, git bisect allows you to target the offending commit by starting with a stable commit and successively testing intermediate commits, indicating whether they are good or bad, until you isolate the one causing the problem. Git bisect can also be used to identify the cause of an abnormally long build or tests that slow down CI.
Pauline also suggested some tips such as replacing default terms "good"/"bad" with more appropriate terms, correcting errors via git bisect replay.
Finally, she ended her conference by pointing out the importance of maintaining atomic commits.
"Écrire du Php avec seulement 6 caractères"
by Benoît Viguier, Senior Developer at Lendable
Benoît, senior developer at Lendable, gave a relaxed talk where he presented how he accomplished a rather unconventional challenge: writing PHP code with the fewest possible characters.
He demonstrated how his library can transform any PHP code into a much shorter version. During this fun presentation, he explained the inner workings of this magic trick, step by step.
To give you a preview, here's what a "Hello world" in 12 characters would look like:
"Utiliser un framework pour écrire de la documentation ?"
by Martin SUPIOT, Staff Engineer at Alma
One could argue that writing documentation has as many approaches as there are writers. In this context, how can we help developers write documents more easily and effectively? How can we prevent the dreaded "blank page" syndrome?
First, Martin, staff engineer at Alma, provided a theoretical framework for documentation. He then explained how, through a set of best practices, tips and a framework (Diataxis), we can enhance the developers' experience with this task.
Once again, many of us turned out for Forum PHP. It was an opportunity for us to answer questions from visitors and sponsors about tech solutions at Deezer.
To animate our stand, we chose to organize two Music Quiz sessions in "Party mode" each day during breaks. Many participants came to test their musical knowledge on the four themes we picked. Despite the background music in the hall, contestants had a lot of fun and won some great Deezer goodies.
At lunch break and during discussions with visitors, we chose to explain the recently released Shaker feature.
Shaker is a collaborative soundtrack for your future parties, road trips or family holidays. It allows you to:
Shaker works with all platforms, and everyone is welcome, even non-Deezer users.
Learn more and join the community here.
These were two incredible days in the company of the PHP community. Many thanks to the organizers, speakers, sponsors and to Deezer for allowing us to return each year.
We're now focusing on the 2025 edition, which will celebrate 30 years of PHP and 25 years of AFUP. See you there?