Skip to content

Instantly share code, notes, and snippets.

View enleur's full-sized avatar

Serhii Zolotov enleur

View GitHub Profile
@enleur
enleur / ConstraintViolationsConverter.php
Last active May 18, 2022 10:31
Symfony json body to request object auto mapping
<?php
namespace App\Request\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\ConstraintViolationListInterface;
final class ConstraintViolationsConverter implements ParamConverterInterface
<?php
namespace AppBundle\Component\Doctrine\ORM\Hydrators;
use Doctrine\ORM\Internal\Hydration\AbstractHydrator;
class NoneHydrator extends AbstractHydrator
{
const NAME = 'NoneHydrator';
<?php
namespace AppBundle\Extensions\Doctrine\ORM;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Doctrine\DBAL\Connection as DoctrineConnection;
use Doctrine\DBAL\Connections\MasterSlaveConnection;
use Doctrine\DBAL\DBALException;
class ReopeningConnectionWrapper extends MasterSlaveConnection