Nos articles taggués « php »
Castor, a journey across the sea of task runners
At JoliCode we were early adopters of Docker (since late 2013). When we discovered it, we strongly believed that this tool would fit perfectly in our dev environment and allow teams to work under the same clean and reproducible environment. However, like each new piece of software, …
Lire la suite de l’article Castor, a journey across the sea of task runners
Un ch’ti récap de l’AFUP Day 2023 à Lille
Si vous nous lisez régulièrement ici, vous le savez, nous ne ratons quasiment jamais une conférence AFUP. Ce printemps ne déroge pas à la règle, nous étions à Lille pour l’AFUP Day 2023 dans un lieu aux allures de château anglais dans lequel on enseignerait la magie. Et c’était presque…
Lire la suite de l’article Un ch’ti récap de l’AFUP Day 2023 à Lille
Create your own shiny Open Graph images with Imagine PHP
You might not have noticed, but we use our own custom Open Graph preview images for our articles. Some of you asked us how we did it, so here you go! In this article we will explain how to use the php-imagine/Imagine library to create some preview images suited to your needs like…
Lire la suite de l’article Create your own shiny Open Graph images with Imagine PHP
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 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…
Astuces pour traiter des gros volumes de données dans Symfony
Dans la vie d’un développeur, il arrive forcément un moment où l’on doit traiter un volume important de données via une ligne de commande. Et les premières fois, ça fait BOOM 💥, on utilise du memory_limit=-1, des optimisations… Dans cet article, je dresse une liste des différents…
Lire la suite de l’article Astuces pour traiter des gros volumes de données dans Symfony
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…
Quick PHP tip: Initialize a DateTime object from string, but with time resetted
Initialize the PHP DateTime object For a variety of reasons, we all have to initialize DateTime objects from strings like 2023–02–14. The quick and clean way to get an object from this kind of string is to use createFromFormat method of DateTime (or DateTimeImmutable): If I run…
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
Tips for a PayPal implementation with Symfony in 2022 🪙
We recently had to implement a PayPal payment. It was my first payment implementation ever and I obviously wanted to do it right. The thing is, our client wanted a specific behavior, when we were more worried about the security. All the PayPal PHP libraries we found were deprecated, …
Lire la suite de l’article Tips for a PayPal implementation with Symfony in 2022 🪙
Notre Forum PHP 2022 à Disneyland
L’équipe des JoliCodeurs était présente en force à Disneyland pour assister au Forum PHP 2022 : le plus gros événement PHP de l’année et notre pèlerinage annuel au pays des éléPHPants. Nous y avons présenté trois sujets : Bastien a raconté une histoire de sauvetage comme nous les…
Lire la suite de l’article Notre Forum PHP 2022 à Disneyland
Nous avons essayé de décoder un format binaire avec PHP
Nous nous sommes récemment intéressés à un format de données binaires appelé Smile. Notre objectif était d’écrire un encodeur / décodeur en PHP pour ce format, dans le cadre d’un exercice pratique pour mon alternance chez JoliCode. Nous vous expliquons dans cet article comment nous…
Lire la suite de l’article Nous avons essayé de décoder un format binaire avec PHP
How to See Full Request URI in FPM Status
Or: How FPM status page can help when some URLS are blocked? I changed some code in my application, and now the tests suite is failing with many timeout errors. Huh?! 😮 What happened? The initial setup Before my changes, we had the following application flow: someone create a « project »…
Lire la suite de l’article How to See Full Request URI in FPM Status
Use Bayesian Averages to Improve Rating Sorting in your Elasticsearch Index
EDIT: There were two typos in this article. In the formula we were wrong about the position of one of the arguments which made it wrong, we invite you to check again the formula so you can fix it too. And in the Elasticsearch painless script, a subtlety of the Java language will…
Des frites, du PHP et de la bière
Eh oui, vous l’aurez deviné, c’est à Lille que s’est tenu l’AFUP Day 2022 ! Voici ce que nous en avons retenu, entre un welsh et une carbonade. Autour de PHP PHP 8.1 en détail – Damien SEGUY Quoi de mieux pour démarrer la journée qu’un talk sur le PHP ? Damien nous parle de cette…
Lire la suite de l’article Des frites, du PHP et de la bière
Using Symfony Form in WordPress
What a strange idea! Once upon a time, a developer was asked to move a form from one application to another. The source application was a Symfony app. The target application was WordPress, the CMS that runs the Web. Follow us in that journey that will take you to the edge of what…
PHP Clone All The Things
Every time I see clone in PHP code, I can’t help but be a little scared. This simple keyword, although very clear, always puts me in doubt. What exactly is going to be cloned? First, the question brings me back to the basics of PHP: passing variables by value or by reference. Then, …
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