Skip to content

Commit

Permalink
reallow optional remote (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes authored Jan 11, 2021
1 parent 998ff9f commit b80263b
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions src/Bundle/DependencyInjection/NanbandoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,27 @@ public function load(array $configs, ContainerBuilder $container)
$adapters
);

$adapters['remote'] = $this->createStorageAdapter(
'remote',
$config['storage']['remote'],
$container,
$adapterFactories
);

$this->createFilesystem('remote', [
'adapter' => 'remote',
'alias' => 'filesystem.remote',
'plugins' => [
'filesystem.list_files',
],
], $container, $adapters);
if (array_key_exists('remote', $config['storage'])) {
$adapters['remote'] = $this->createStorageAdapter(
'remote',
$config['storage']['remote'],
$container,
$adapterFactories
);

$this->createFilesystem(
'remote',
[
'adapter' => 'remote',
'alias' => 'filesystem.remote',
'plugins' => [
'filesystem.list_files',
],
],
$container,
$adapters
);
}

// ensure container rebuild after puli bindings changes
$discoveryFile = Path::join([getcwd(), NANBANDO_DIR, '.discovery']);
Expand Down

0 comments on commit b80263b

Please sign in to comment.