Skip to content

Commit

Permalink
extend dbal config and extension for result cache
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-hertel committed Oct 31, 2023
1 parent f549108 commit 224b42e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ private function getDbalConnectionsNode(): ArrayNodeDefinition
->cannotBeEmpty()
->defaultValue($this->getDefaultSchemaManagerFactory())
->end()
->scalarNode('result_cache')->end()

Check warning on line 251 in DependencyInjection/Configuration.php

View check run for this annotation

Codecov / codecov/patch

DependencyInjection/Configuration.php#L251

Added line #L251 was not covered by tests
->end();

// dbal < 2.11
Expand Down
4 changes: 4 additions & 0 deletions DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ protected function loadDbalConnection($name, array $connection, ContainerBuilder

$configuration->addMethodCall('setSchemaManagerFactory', [new Reference($connection['schema_manager_factory'])]);

if (isset($connection['result_cache'])) {
$configuration->addMethodCall('setResultCache', [new Reference($connection['result_cache'])]);

Check warning on line 298 in DependencyInjection/DoctrineExtension.php

View check run for this annotation

Codecov / codecov/patch

DependencyInjection/DoctrineExtension.php#L297-L298

Added lines #L297 - L298 were not covered by tests
}

if (class_exists(LegacySchemaManagerFactory::class)) {
return;
}
Expand Down

0 comments on commit 224b42e

Please sign in to comment.