Skip to content

Instantly share code, notes, and snippets.

View Gasjki's full-sized avatar

George-Cristian Tudoran Gasjki

  • Bucharest, Romania
  • 16:47 (UTC +03:00)
View GitHub Profile
@Gasjki
Gasjki / ExceptionSubscriber.php
Created January 30, 2026 08:42
[Symfony 5 or newer] Exception subscriber used to solve error "Library error: table too large for buffer" thrown by Symfony Messenger (with RabbitMQ) when exception trace is too big
<?php
declare(strict_types=1);
namespace App\YourNameSpace;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent;
use Symfony\Component\Messenger\Exception\HandlerFailedException;
use Symfony\Component\Messenger\Stamp\ErrorDetailsStamp;
@Gasjki
Gasjki / Article.php
Created November 16, 2023 07:52 — forked from kunicmarko20/Article.php
Symfony Second Level Cache
<?php
namespace AppBundle\Entity;
/**
* @package AppBundle\Entity
* @ORM\Entity()
* @ORM\Table()
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
@Gasjki
Gasjki / FormHelper.php
Last active April 24, 2023 06:33
Beautify Symfony errors
<?php
declare(strict_types = 1);
use Symfony\Component\Form\FormInterface;
class FormHelper
{
public static function formatErrors(FormInterface $form, array &$errors): void
{
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Function Move-SPOFilesBetweenFolders
{
param
(
[Parameter(Mandatory=$true)] [string] $SiteURL,
[Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.Folder] $SourceFolder,