Skip to content

Instantly share code, notes, and snippets.

View lyrixx's full-sized avatar

Grégoire Pineau lyrixx

View GitHub Profile
lyrixx /
Last active April 11, 2024 21:52
slugger CLI


This "project" is a simple CLI slugger


lyrixx / LogMiddleware.php
Last active March 13, 2024 08:11
UUID processor for symfony
namespace App\Middleware;
use App\Middleware\Stamp\LogStamp;
use App\Monolog\Processor\UuidProcessor;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;
lyrixx / index.php
Last active February 19, 2024 06:37
How to call private command method in Symfony ?
#!/usr/bin/env php
require __DIR__ . '/../../vendor/autoload.php';
use Castor\Console\Command\CompileCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
// We extends the CompileCommand, to be able to remove the constructor, because
lyrixx /
Last active February 23, 2024 14:36


  • removed EntityChoiceList
  • removed $manager (2nd) and $class (3th) arguments of ORMQueryBuilderLoader
  • removed passing a query builder closure to ORMQueryBuilderLoader
  • removed loader and property options of the DoctrineType


  • deprecated interface Symfony\Component\HttpKernel\Log\LoggerInterface has been removed
lyrixx /
Last active February 13, 2023 10:39
[GitHub] Bookmarklet to mark all files in a PR a "viewed"

Add the following bookmark:

javascript:boxes=document.getElementsByClassName("js-reviewed-checkbox"),counter=0;for(let e=0;e<boxes.length;e++){const t=boxes[e];!t.checked&&(,counter++)}alert("Folded "+counter);

Then click on it to mark all "viewed" checkbox to checked

lyrixx /
Last active August 18, 2022 08:41
How to "control" auto-completion in Google Chrome address bar?

How to "control" auto-completion in Google Chrome address bar?

For a while, when I type g in the address bar, it suggests me the following URL

But I don't want this URL at the first position. I don't even use this URL!

lyrixx / ContainerTest.php
Last active May 22, 2024 11:23
Test applications services can boot
namespace Tests\Integration;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
lyrixx / test.php
Last active November 10, 2023 14:27
Symfony Playgound with its Container and a custom configuration
use App\Kernel;
require __DIR__.'/vendor/autoload_runtime.php';
use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
lyrixx /
Created July 22, 2022 13:54
Watch dir and copy on change
watch -n 1 cp -u -R ./source ./dest
# Run every seconds: `-n 1`
# Copy everything from "source" to "dest":
# `-R ./source ./dest`
# But only if the content is different `-u`
lyrixx /
Last active March 22, 2022 14:01
PHP + Stream Wrapper + Stream Filter // Reproducer

PHP + Stream Wrapper + Stream Filter // Reproducer

Reproducer for php/php-src#8219


Run php index.php