From 153935741bfa7cffba30b74c78c54f1fce81dc1f Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Tue, 22 Jun 2021 21:20:00 +0200 Subject: [PATCH] Fixes issue with Laravel 8.48 filesystem changes 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. --- src/Filesystem/FilesystemManager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Filesystem/FilesystemManager.php b/src/Filesystem/FilesystemManager.php index c31fa2e7b9..95e3c057ff 100644 --- a/src/Filesystem/FilesystemManager.php +++ b/src/Filesystem/FilesystemManager.php @@ -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); }