Skip to content

Commit 3cdc411

Browse files
committed
Doctrine CS 12
1 parent ee7e884 commit 3cdc411

File tree

49 files changed

+155
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+155
-153
lines changed

Command/CreateDatabaseDoctrineCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@ protected function configure(): void
2727
->setDescription('Creates the configured database')
2828
->addOption('connection', 'c', InputOption::VALUE_OPTIONAL, 'The connection to use for this command')
2929
->addOption('if-not-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database already exists')
30-
->setHelp(<<<EOT
30+
->setHelp(<<<'EOT'
3131
The <info>%command.name%</info> command creates the default connections database:
3232
3333
<info>php %command.full_name%</info>
3434
3535
You can also optionally specify the name of a connection to create the database for:
3636
3737
<info>php %command.full_name% --connection=default</info>
38-
EOT
39-
);
38+
EOT);
4039
}
4140

4241
protected function execute(InputInterface $input, OutputInterface $output): int

Command/DropDatabaseDoctrineCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function configure()
3636
->addOption('connection', 'c', InputOption::VALUE_OPTIONAL, 'The connection to use for this command')
3737
->addOption('if-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database doesn\'t exist')
3838
->addOption('force', 'f', InputOption::VALUE_NONE, 'Set this parameter to execute this action')
39-
->setHelp(<<<EOT
39+
->setHelp(<<<'EOT'
4040
The <info>%command.name%</info> command drops the default connections database:
4141
4242
<info>php %command.full_name%</info>
@@ -48,8 +48,7 @@ protected function configure()
4848
<info>php %command.full_name% --connection=default</info>
4949
5050
<error>Be careful: All data in a given database will be lost when executing this command.</error>
51-
EOT
52-
);
51+
EOT);
5352
}
5453

5554
protected function execute(InputInterface $input, OutputInterface $output): int

Command/ImportMappingDoctrineCommand.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ protected function configure(): void
5252
->addOption('force', null, InputOption::VALUE_NONE, 'Force to overwrite existing mapping files.')
5353
->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path where the files would be generated (not used when a bundle is passed).')
5454
->setDescription('Imports mapping information from an existing database')
55-
->setHelp(<<<EOT
55+
->setHelp(<<<'EOT'
5656
The <info>%command.name%</info> command imports mapping information
5757
from an existing database:
5858
5959
Generate annotation mappings into the src/ directory using App as the namespace:
60-
<info>php %command.full_name% App\\\Entity annotation --path=src/Entity</info>
60+
<info>php %command.full_name% App\\Entity annotation --path=src/Entity</info>
6161
6262
Generate xml mappings into the config/doctrine/ directory using App as the namespace:
63-
<info>php %command.full_name% App\\\Entity xml --path=config/doctrine</info>
63+
<info>php %command.full_name% App\\Entity xml --path=config/doctrine</info>
6464
6565
Generate XML mappings into a bundle:
6666
<info>php %command.full_name% "MyCustomBundle" xml</info>
@@ -79,8 +79,7 @@ protected function configure(): void
7979
Use the <info>--force</info> option, if you want to override existing mapping files:
8080
8181
<info>php %command.full_name% "MyCustomBundle" xml --force</info>
82-
EOT
83-
);
82+
EOT);
8483
}
8584

8685
protected function execute(InputInterface $input, OutputInterface $output): int

Command/Proxy/ConvertMappingDoctrineCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class ConvertMappingDoctrineCommand extends ConvertMappingCommand
2424
protected function configure()
2525
{
2626
parent::configure();
27+
2728
$this
2829
->setName('doctrine:mapping:convert');
2930

Command/Proxy/DoctrineCommandHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function setApplicationEntityManager(Application $application, $em
3535
'2.7',
3636
'Providing an EntityManager using "%s" is deprecated. Use an instance of "%s" instead.',
3737
EntityManagerHelper::class,
38-
EntityManagerProvider::class
38+
EntityManagerProvider::class,
3939
);
4040
}
4141
}

Command/Proxy/OrmProxyCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ trait OrmProxyCommand
1919
public function __construct(?EntityManagerProvider $entityManagerProvider = null)
2020
{
2121
parent::__construct($entityManagerProvider);
22+
2223
$this->entityManagerProvider = $entityManagerProvider;
2324

2425
trigger_deprecation(
2526
'doctrine/doctrine-bundle',
2627
'2.8',
2728
'Class "%s" is deprecated. Use "%s" instead.',
2829
self::class,
29-
parent::class
30+
parent::class,
3031
);
3132
}
3233

Command/Proxy/RunDqlDoctrineCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function configure(): void
2020

2121
$this
2222
->setName('doctrine:query:dql')
23-
->setHelp(<<<EOT
23+
->setHelp(<<<'EOT'
2424
The <info>%command.name%</info> command executes the given DQL query and
2525
outputs the results:
2626
@@ -35,8 +35,7 @@ protected function configure(): void
3535
show:
3636
3737
<info>php %command.full_name% "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
38-
EOT
39-
);
38+
EOT);
4039

4140
if ($this->getDefinition()->hasOption('em')) {
4241
return;

Command/Proxy/RunSqlDoctrineCommand.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ protected function configure(): void
2121

2222
$this
2323
->setName('doctrine:query:sql')
24-
->setHelp(<<<EOT
24+
->setHelp(<<<'EOT'
2525
The <info>%command.name%</info> command executes the given SQL query and
2626
outputs the results:
2727
2828
<info>php %command.full_name% "SELECT * FROM users"</info>
29-
EOT
30-
);
29+
EOT);
3130
}
3231

3332
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -36,7 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
3635
'doctrine/doctrine-bundle',
3736
'2.2',
3837
'The "%s" (doctrine:query:sql) is deprecated, use dbal:run-sql command instead.',
39-
self::class
38+
self::class,
4039
);
4140

4241
return parent::execute($input, $output);

ConnectionFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function createConnection(array $params, ?Configuration $config = null, ?
117117
$params = $this->addDatabaseSuffix(array_merge($connection->getParams(), $overriddenOptions));
118118
$driver = $connection->getDriver();
119119
$platform = $driver->getDatabasePlatform(
120-
...(class_exists(StaticServerVersionProvider::class) ? [new StaticServerVersionProvider($params['serverVersion'] ?? '')] : [])
120+
...(class_exists(StaticServerVersionProvider::class) ? [new StaticServerVersionProvider($params['serverVersion'] ?? '')] : []),
121121
);
122122

123123
if (! isset($params['charset'])) {
@@ -128,7 +128,7 @@ public function createConnection(array $params, ?Configuration $config = null, ?
128128
Deprecation::trigger(
129129
'doctrine/doctrine-bundle',
130130
'https://github.com/doctrine/dbal/issues/5214',
131-
'The "collate" default table option is deprecated in favor of "collation" and will be removed in doctrine/doctrine-bundle 3.0. '
131+
'The "collate" default table option is deprecated in favor of "collation" and will be removed in doctrine/doctrine-bundle 3.0. ',
132132
);
133133
$params['defaultTableOptions']['collation'] = $params['defaultTableOptions']['collate'];
134134
unset($params['defaultTableOptions']['collate']);
@@ -186,7 +186,7 @@ private function getDatabasePlatform(Connection $connection): AbstractPlatform
186186
'For further information have a look at:' . PHP_EOL .
187187
'https://github.com/doctrine/DoctrineBundle/issues/673',
188188
0,
189-
$driverException
189+
$driverException,
190190
);
191191
}
192192
}

DependencyInjection/Compiler/CacheCompatibilityPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private function createCompatibilityLayerDefinition(ContainerBuilder $container,
103103
'doctrine/doctrine-bundle',
104104
'2.4',
105105
'Configuring doctrine/cache is deprecated. Please update the cache service "%s" to use a PSR-6 cache.',
106-
$definitionId
106+
$definitionId,
107107
);
108108

109109
return (new Definition(CacheItemPoolInterface::class))

0 commit comments

Comments
 (0)