-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unset username and password options when null #249
Unset username and password options when null #249
Conversation
unset($v['password']); | ||
|
||
return $v; | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it must be a separate ->validate()
block, otherwise you will replace the previous conditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @stof
@@ -233,6 +233,13 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode) | |||
|
|||
return $v; | |||
}) | |||
->ifTrue(function($v) { return null === $v['username'] || null === $v['password']; }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with adding ->ifNull()->thenUnset()
to the username
and password
scalar node definitions? If the user actually provides a username and leaves password null, I think we should send that directly to the driver rather than strip both values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adapting to it
fixing #243
sent using Gush