Skip to content

Commit 4ccce5a

Browse files
authored
Doctrine dbal storage enhancement (#15)
* Fixed Doctrine deprecations * Fixed phpunit deprecations * Remove options for table columns naming, use dbal query builders
1 parent 13338fe commit 4ccce5a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ private function storage(): ArrayNodeDefinition
4949
->arrayNode('dbal')
5050
->children()
5151
->scalarNode('connection')
52-
->defaultValue('default')
52+
->defaultNull()
5353
->end()
54-
->arrayNode('options')
55-
->useAttributeAsKey('name')
56-
->scalarPrototype()->end()
54+
->scalarNode('table')
55+
->defaultNull()
5756
->end()
5857
->end()
5958
->end()

src/DependencyInjection/YokaiBatchExtension.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ private function configureStorage(ContainerBuilder $container, array $config): v
8989
->register('yokai_batch.storage.dbal', DoctrineDBALJobExecutionStorage::class)
9090
->setArguments(
9191
[
92-
new Reference("doctrine.dbal.{$config['dbal']['connection']}_connection"),
93-
$config['dbal']['options'],
92+
new Reference('doctrine'),
93+
[
94+
'connection' => $config['dbal']['connection'],
95+
'table' => $config['dbal']['table'],
96+
],
9497
]
9598
)
9699
;

0 commit comments

Comments
 (0)