@@ -88,37 +88,30 @@ public function provides()
88
88
* @param Adldap $adldap
89
89
* @param array $connections
90
90
*
91
- * @throws \Adldap\Auth\BindException
92
- *
93
91
* @return Adldap
94
92
*/
95
93
protected function addProviders (Adldap $ adldap , array $ connections = [])
96
94
{
97
95
// Go through each connection and construct a Provider.
98
96
foreach ($ connections as $ name => $ config ) {
99
- try {
100
- // Create a new provider.
101
- $ provider = $ this ->newProvider (
102
- $ config ['settings ' ],
103
- new $ config ['connection ' ]
104
- );
105
-
106
- if ($ this ->shouldAutoConnect ($ config )) {
107
- try {
108
- $ provider ->connect ();
109
- } catch (BindException $ e ) {
110
- // We will catch and log bind exceptions so
111
- // any connection issues fail gracefully
112
- // in our application.
113
- logger ()->error ($ e );
114
- }
97
+ // Create a new provider.
98
+ $ provider = $ this ->newProvider (
99
+ $ config ['settings ' ],
100
+ new $ config ['connection ' ]
101
+ );
102
+
103
+ if ($ this ->shouldAutoConnect ($ config )) {
104
+ try {
105
+ $ provider ->connect ();
106
+ } catch (BindException $ e ) {
107
+ logger ()->error ($ e );
108
+ } catch (ConnectionException $ e ) {
109
+ logger ()->error ($ e );
115
110
}
116
-
117
- // Add the provider to the Adldap container.
118
- $ adldap ->addProvider ($ provider , $ name );
119
- } catch (ConnectionException $ e ) {
120
- logger ()->error ($ e );
121
111
}
112
+
113
+ // Add the provider to the Adldap container.
114
+ $ adldap ->addProvider ($ provider , $ name );
122
115
}
123
116
124
117
return $ adldap ;
@@ -140,8 +133,6 @@ protected function newAdldap()
140
133
* @param array $configuration
141
134
* @param ConnectionInterface|null $connection
142
135
*
143
- * @throws ConnectionException If starting TLS fails.
144
- *
145
136
* @return Provider
146
137
*/
147
138
protected function newProvider ($ configuration = [], ConnectionInterface $ connection = null )
0 commit comments