Skip to content

Commit

Permalink
Add "doctrine_type" config option
Browse files Browse the repository at this point in the history
  • Loading branch information
danielburger1337 committed Jul 9, 2023
1 parent 1b5d92a commit 3007b8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
->children()
->booleanNode('constraint_violation')->defaultTrue()->end()
->booleanNode('csrf_token')->defaultTrue()->end()
->booleanNode('doctrine_type')->defaultTrue()->end()
->booleanNode('invalid_choice')->defaultTrue()->end()
->booleanNode('string')->defaultTrue()->end()
->booleanNode('stringable')->defaultTrue()->end()
Expand Down
4 changes: 4 additions & 0 deletions src/SBSEDVFormBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
$container->services()->remove(CauseResolver\CsrfTokenCauseResolver::class);
}

if (!$config['cause_resolver']['doctrine_type']) {
$container->services()->remove(CauseResolver\DoctrineTypeCauseResolver::class);
}

if (!$config['cause_resolver']['constraint_violation']) {
$container->services()->remove(CauseResolver\ConstraintViolationCauseResolver::class);
}
Expand Down

0 comments on commit 3007b8b

Please sign in to comment.