Code snippets
You will find here 5 code snippets I find useful so I don't have to Google ™ or Stackoverflow ™ them when I need. There are also code snippets I always forget! 😁 Sometimes, related links to the code will be available. The main difference with other random snippets you will find on the web is that in most cases (for the Symfony related ones) you will be able to run them directly from this website to check the output so you can verify it works as expected ™.
This snippet shows how to create a quick GIT commit function for Fishshell. It is a function I use daily; it's convenient and save...
Fish shell
Published on 2024-08-31 • Modified on 2024-08-31
This snippet shows how to use role constants with the IsGranted Symfony attribute instead of using raw strings. We can use the Aut...
Symfony
Published on 2023-06-06 • Modified on 2023-06-06
This snippet shows how to disable the translations for the test environment with Symfony. The goal is to test the translation code...
Symfony
Published on 2023-01-31 • Modified on 2023-01-31
In this snippet, we will see how to create a simple dateTime object with the Alice fixtures bundle. When you start to play with th...
Symfony
Published on 2021-04-03 • Modified on 2021-04-03
In this snippet, we will see how to switch PHP version locally when using Brew for MacOS. I didn't use this a lot in the past beca...
PHP
Published on 2021-01-01 • Modified on 2021-01-01