Skip to content

Commit 12fd428

Browse files
committed
fix(webdav): Use string instead of a constant in the WebDAV adapter builder
1 parent cd0da59 commit 12fd428

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Adapter/Builder/WebDAVAdapterDefinitionBuilder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function configureOptions(OptionsResolver $resolver): void
4848
$resolver->setDefault('prefix', '');
4949
$resolver->setAllowedTypes('prefix', 'string');
5050

51-
$resolver->setDefault('visibility_handling', WebDAVAdapter::ON_VISIBILITY_THROW_ERROR);
52-
$resolver->setAllowedTypes('visibility_handling', ['string']);
51+
$resolver->setDefault('visibility_handling', 'throw');
52+
$resolver->setAllowedValues('visibility_handling', ['throw', 'ignore']);
5353

5454
$resolver->setDefault('manual_copy', false);
5555
$resolver->setAllowedTypes('manual_copy', 'bool');
@@ -70,8 +70,9 @@ public function addConfiguration(NodeDefinition $node): void
7070
->defaultValue('')
7171
->info('Optional path prefix to prepend to all paths')
7272
->end()
73-
->scalarNode('visibility_handling')
74-
->defaultValue(WebDAVAdapter::ON_VISIBILITY_THROW_ERROR)
73+
->enumNode('visibility_handling')
74+
->values(['throw', 'ignore'])
75+
->defaultValue('throw')
7576
->info('How to handle visibility operations')
7677
->end()
7778
->booleanNode('manual_copy')

0 commit comments

Comments
 (0)