Skip to content

Commit b8ccd02

Browse files
committed
Revise error messages for mongo and mongodb handler configs
1 parent bb79337 commit b8ccd02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ private function addMongoSection(ArrayNodeDefinition $handlerNode)
891891
->ifTrue(function ($v) {
892892
return !isset($v['id']) && !isset($v['host']);
893893
})
894-
->thenInvalid('What must be set is either the host or the id.')
894+
->thenInvalid('The "mongo" handler configuration requires either a service "id" or a connection "host".')
895895
->end()
896896
->validate()
897897
->ifTrue(function ($v) {
@@ -903,7 +903,7 @@ private function addMongoSection(ArrayNodeDefinition $handlerNode)
903903
->end()
904904
->validate()
905905
->ifTrue(function ($v) { return 'mongo' === $v['type'] && !isset($v['mongo']); })
906-
->thenInvalid('The mongo configuration has to be specified to use a MongoDBHandler')
906+
->thenInvalid('The "mongo" configuration has to be specified to use a "mongo" handler type.')
907907
->end()
908908
;
909909
}
@@ -930,13 +930,13 @@ private function addMongoDBSection(ArrayNodeDefinition $handlerNode)
930930
->ifTrue(function ($v) {
931931
return !isset($v['id']) && !isset($v['uri']);
932932
})
933-
->thenInvalid('What must be set is either the uri or the id.')
933+
->thenInvalid('The "mongodb" handler configuration requires either a service "id" or a connection "uri".')
934934
->end()
935935
->end()
936936
->end()
937937
->validate()
938938
->ifTrue(function ($v) { return 'mongodb' === $v['type'] && !isset($v['mongodb']); })
939-
->thenInvalid('The mongodb configuration has to be specified to use a MongoDBHandler')
939+
->thenInvalid('The "mongodb" configuration has to be specified to use a "mongodb" handler type.')
940940
->end()
941941
;
942942
}

0 commit comments

Comments
 (0)