Skip to content

Commit

Permalink
Extension: implemented new schemaAssetsFilter callable (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Jan 9, 2023
1 parent c1bcc4b commit cb448d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DI/DbalExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function getConfigSchema(): Schema
'configuration' => Expect::structure([
'sqlLogger' => Expect::anyOf(Expect::string(), Expect::array(), Expect::type(Statement::class)),
'resultCache' => Expect::anyOf(Expect::string(), Expect::array(), Expect::type(Statement::class)),
'schemaAssetsFilter' => Expect::anyOf(Expect::string(), Expect::type(Statement::class)),
'filterSchemaAssetsExpression' => Expect::string()->nullable(),
'autoCommit' => Expect::bool(true),
]),
Expand Down Expand Up @@ -136,6 +137,11 @@ public function loadDoctrineConfiguration(): void
$resultCacheDefinition,
]);

// SchemaAssetsFilter
if ($config->schemaAssetsFilter !== null) {
$configuration->addSetup('setSchemaAssetsFilter', [$config->schemaAssetsFilter]);
}

// FilterSchemaAssetsExpression
if ($config->filterSchemaAssetsExpression !== null) {
$configuration->addSetup('setFilterSchemaAssetsExpression', [$config->filterSchemaAssetsExpression]);
Expand Down

0 comments on commit cb448d2

Please sign in to comment.