Skip to content

Commit ae4849c

Browse files
Fix problem with auth in extensions
1 parent 63e21a3 commit ae4849c

File tree

2 files changed

+6
-36
lines changed

2 files changed

+6
-36
lines changed

src/Configuration/Manager.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function createDriver($driver, array $settings = [])
8282
// will check for a custom driver creator, which allows developers to create
8383
// drivers using their own customized driver creator Closure to create it.
8484
if (isset($this->customCreators[$driver])) {
85-
return $this->callCustomCreator($driver);
85+
return $this->callCustomCreator($driver, $settings);
8686
} elseif (class_exists($class)) {
8787
return $this->container->make($class)->resolve($settings);
8888
}
@@ -94,12 +94,13 @@ protected function createDriver($driver, array $settings = [])
9494
* Call a custom driver creator.
9595
*
9696
* @param string $driver
97+
* @param array $settings
9798
*
9899
* @return mixed
99100
*/
100-
protected function callCustomCreator($driver)
101+
protected function callCustomCreator($driver, array $settings = [])
101102
{
102-
return $this->customCreators[$driver]($this->container);
103+
return $this->customCreators[$driver]($settings, $this->container);
103104
}
104105

105106
/**

src/DoctrineServiceProvider.php

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Doctrine\ORM\EntityManager;
77
use Doctrine\ORM\EntityManagerInterface;
88
use Doctrine\ORM\Mapping\ClassMetadataFactory;
9-
use Illuminate\Auth\AuthManager;
109
use Illuminate\Support\ServiceProvider;
1110
use InvalidArgumentException;
1211
use LaravelDoctrine\ORM\Auth\DoctrineUserProvider;
@@ -31,21 +30,15 @@
3130

3231
class DoctrineServiceProvider extends ServiceProvider
3332
{
34-
/**
35-
* Indicates if loading of the provider is deferred.
36-
* @var bool
37-
*/
38-
//protected $defer = true;
39-
4033
/**
4134
* Boot service provider.
4235
*/
4336
public function boot()
4437
{
45-
$this->app->make(ExtensionManager::class)->boot();
46-
4738
$this->extendAuthManager();
4839

40+
$this->app->make(ExtensionManager::class)->boot();
41+
4942
if (!$this->isLumen()) {
5043
$this->publishes([
5144
$this->getConfigPath() => config_path('doctrine.php'),
@@ -253,30 +246,6 @@ protected function registerConsoleCommands()
253246
]);
254247
}
255248

256-
/**
257-
* Get the services provided by the provider.
258-
* @return string[]
259-
*/
260-
public function provides()
261-
{
262-
return [
263-
'auth',
264-
'em',
265-
'registry',
266-
'validation.presence',
267-
AuthManager::class,
268-
EntityManager::class,
269-
DoctrineManager::class,
270-
ConnectionManager::class,
271-
CacheManager::class,
272-
MetaDataManager::class,
273-
ClassMetadataFactory::class,
274-
EntityManagerInterface::class,
275-
ExtensionManager::class,
276-
ManagerRegistry::class
277-
];
278-
}
279-
280249
/**
281250
* @return bool
282251
*/

0 commit comments

Comments
 (0)