Skip to content

Instantly share code, notes, and snippets.

View Jibbarth's full-sized avatar
🌴

Jibé Barth Jibbarth

🌴
View GitHub Profile
@Jibbarth
Jibbarth / HttpProblemNormalizer.php
Created April 10, 2024 14:03
Exception normalizer : Allow to have message of exception
<?php
declare(strict_types=1);
namespace App\Normalizer;
use Symfony\Component\ErrorHandler\Exception\FlattenException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
@Jibbarth
Jibbarth / 1.PHP_OAuth_CLI.md
Last active April 22, 2024 23:34
⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

⚡Recreate Github CLI OAuth feature in a Symfony command ⚡

Github recently released a CLI tool to manage issues and PR directly from your terminal. As I work on some open source projects, I downloaded it to give a try.

And at first launch, the CLI ask to connect by using OAuth. It propose to press "Enter" to open github.com in my browser, and catch correctly the access_token.

That .. blown my mind 🤯 I didn't expect we can connect through terminal like this. So, as it's open source, I dived into the code source.

@Jibbarth
Jibbarth / 00-Add_Composer.md
Last active April 23, 2024 19:04
Composering a PrestaShop

Note : This is a guide for PS 1.6.x because 1.7 provide a composer.json

How to use composer in PrestaShop

The PHP World is full of talentued developers. They create very usefull and powerfull libraries. In PrestaShop, developers often have to reimplement them. Unless use composer !

Init a composer

First, you have to install composer to your system. I don't teach you how to do this, read the doc.