services(); $services->set(ManagerRegistryGetManagerToEntityManagerRector::class); $services->set(InitializeDefaultEntityCollectionRector::class); $services->set(MakeEntitySetterNullabilityInSyncWithPropertyRector::class); $services->set(MakeEntityDateTimePropertyDateTimeInterfaceRector::class); $services->set(MoveCurrentDateTimeDefaultInEntityToConstructorRector::class); $services->set(CorrectDefaultTypesOnEntityPropertyRector::class); $services->set(ChangeBigIntEntityPropertyToIntTypeRector::class); $services->set(ImproveDoctrineCollectionDocTypeInEntityRector::class); $services->set(RemoveRedundantDefaultPropertyAnnotationValuesRector::class); $services->set(RemoveRedundantDefaultClassAnnotationValuesRector::class); $services->set(ReplaceStringWithClassConstantRector::class) ->call('configure', [[ ReplaceStringWithClassConstantRector::REPLACE_STRING_WITH_CLASS_CONSTANT => ValueObjectInliner::inline([ new ReplaceStringWithClassConstant( 'Doctrine\ORM\QueryBuilder', 'orderBy', 1, 'Doctrine\Common\Collections\Criteria' ), ]), ]]); $services->set(ServiceGetterToConstructorInjectionRector::class) ->call('configure', [[ ServiceGetterToConstructorInjectionRector::METHOD_CALL_TO_SERVICES => ValueObjectInliner::inline([ new ServiceGetterToConstructorInjection( 'Doctrine\Common\Persistence\ManagerRegistry', 'getConnection', 'Doctrine\DBAL\Connection' ), new ServiceGetterToConstructorInjection( 'Doctrine\ORM\EntityManagerInterface', 'getConfiguration', 'Doctrine\ORM\Configuration' ), ]), ]]); };