Skip to content

Commit

Permalink
Fixes issue with Laravel 8.48 filesystem changes
Browse files Browse the repository at this point in the history
The FilesystemManager has changed to also allow to override
the config while resolving a filesystem.

This PR adds the argument and applies it if provided.
  • Loading branch information
luceos committed Jun 22, 2021
1 parent 1cf9491 commit 6e92af8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Filesystem/FilesystemManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ public function __construct(Container $app, array $diskLocalConfig, array $drive
/**
* @inheritDoc
*/
protected function resolve($name): Filesystem
protected function resolve($name, $config = null): Filesystem
{
$driver = $this->getDriver($name);

$localConfig = $this->getLocalConfig($name);
$localConfig = $config ?? $this->getLocalConfig($name);

if (empty($localConfig)) {
throw new InvalidArgumentException("Disk [{$name}] has not been declared. Use the Filesystem extender to do this.");
}

$driver = $config['driver'] ?? $this->getDriver($name);

if ($driver === 'local') {
return $this->createLocalDriver($localConfig);
}
Expand Down

0 comments on commit 6e92af8

Please sign in to comment.