apply rector rules: symfony **UP TO** 44

This commit is contained in:
2023-07-28 01:52:53 +02:00
parent b6a094aeee
commit c20f65eebb
88 changed files with 211 additions and 320 deletions

View File

@@ -22,6 +22,6 @@ class ChillThirdPartyBundle extends Bundle
parent::build($container);
$container->registerForAutoconfiguration(ThirdPartyTypeProviderInterface::class)
->addTag('chill_3party.provider');
$container->addCompilerPass(new ThirdPartyTypeCompilerPass());
$container->addCompilerPass(new ThirdPartyTypeCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 0);
}
}

View File

@@ -21,6 +21,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
final class Version20230215175150 extends AbstractMigration implements ContainerAwareInterface
{
public ContainerInterface $container;
public function __construct(\Doctrine\DBAL\Connection $connection, \Psr\Log\LoggerInterface $logger, private \Doctrine\ORM\EntityManager $entityManager)
{
parent::__construct($connection, $logger);
}
public function down(Schema $schema): void
{
@@ -45,7 +49,7 @@ final class Version20230215175150 extends AbstractMigration implements Container
{
$this->addSql('ALTER TABLE chill_3party.third_party ADD profession TEXT DEFAULT \'\' NOT NULL');
$em = $this->container->get('doctrine.orm.entity_manager');
$em = $this->entityManager;
$professions = $em->getRepository(ThirdPartyProfession::class)->findAll();
foreach ($professions as $p) {