Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit d3855f8

Browse files
committed
Don't use the schema object.
1 parent b9be0dc commit d3855f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/AdldapServiceProvider.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Adldap\Connections\Provider;
77
use Adldap\Contracts\AdldapInterface;
88
use Adldap\Contracts\Connections\ConnectionInterface;
9+
use Adldap\Contracts\Schemas\SchemaInterface;
910
use Adldap\Laravel\Exceptions\ConfigurationMissingException;
1011
use Adldap\Schemas\Schema;
1112
use Illuminate\Contracts\Foundation\Application;
@@ -79,13 +80,11 @@ protected function addProviders(Adldap $adldap, array $connections = [])
7980
{
8081
// Go through each connection and construct a Provider.
8182
collect($connections)->each(function ($settings, $name) use ($adldap) {
82-
// Set the default schema.
83-
Schema::set(new $settings['schema']());
84-
8583
// Create a new provider.
8684
$provider = $this->newProvider(
8785
$settings['connection_settings'],
88-
new $settings['connection']()
86+
new $settings['connection'](),
87+
new $settings['schema']()
8988
);
9089

9190
// Try connecting to the provider if `auto_connect` is true.
@@ -115,11 +114,12 @@ protected function newAdldap()
115114
*
116115
* @param array $configuration
117116
* @param ConnectionInterface|null $connection
117+
* @param SchemaInterface $schema
118118
*
119119
* @return Provider
120120
*/
121-
protected function newProvider($configuration = [], ConnectionInterface $connection = null)
121+
protected function newProvider($configuration = [], ConnectionInterface $connection = null, SchemaInterface $schema = null)
122122
{
123-
return new Provider($configuration, $connection);
123+
return new Provider($configuration, $connection, $schema);
124124
}
125125
}

0 commit comments

Comments
 (0)