rector/config/set/doctrine25.php

35 lines
1.3 KiB
PHP
Raw Normal View History

2020-07-18 18:57:24 +02:00
<?php
declare(strict_types=1);
use Rector\Generic\Rector\ClassMethod\ArgumentRemoverRector;
2020-07-18 18:57:24 +02:00
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeDeclarationRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AddParamTypeDeclarationRector::class)
->call('configure', [[
2020-07-30 01:39:41 +02:00
AddParamTypeDeclarationRector::TYPEHINT_FOR_PARAMETER_BY_METHOD_BY_CLASS => [
'Doctrine\ORM\Mapping\ClassMetadataFactory' => [
'setEntityManager' => ['Doctrine\ORM\EntityManagerInterface'],
],
'Doctrine\ORM\Tools\DebugUnitOfWorkListener' => [
'dumpIdentityMap' => ['Doctrine\ORM\EntityManagerInterface'],
],
2020-07-18 18:57:24 +02:00
],
]]);
2020-07-18 18:57:24 +02:00
$services->set(ArgumentRemoverRector::class)
->call('configure', [[
2020-07-30 01:39:41 +02:00
ArgumentRemoverRector::POSITIONS_BY_METHOD_NAME_BY_CLASS_TYPE => [
'Doctrine\ORM\Persisters\Entity\AbstractEntityInheritancePersister' => [
'getSelectJoinColumnSQL' => [
4 => null,
],
2020-07-18 18:57:24 +02:00
],
],
]]);
2020-07-18 18:57:24 +02:00
};