mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 08:00:24 +08:00
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.
This commit is contained in:
parent
1cf9491fe6
commit
6e92af8b00
|
@ -35,16 +35,16 @@ class FilesystemManager extends LaravelFilesystemManager
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
protected function resolve($name): Filesystem
|
protected function resolve($name, $config = null): Filesystem
|
||||||
{
|
{
|
||||||
$driver = $this->getDriver($name);
|
$localConfig = $config ?? $this->getLocalConfig($name);
|
||||||
|
|
||||||
$localConfig = $this->getLocalConfig($name);
|
|
||||||
|
|
||||||
if (empty($localConfig)) {
|
if (empty($localConfig)) {
|
||||||
throw new InvalidArgumentException("Disk [{$name}] has not been declared. Use the Filesystem extender to do this.");
|
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') {
|
if ($driver === 'local') {
|
||||||
return $this->createLocalDriver($localConfig);
|
return $this->createLocalDriver($localConfig);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user