Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Use new class syntax (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Apr 13, 2021
1 parent d305039 commit 7e9a0c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -58,7 +58,7 @@ Additional filesystems could be configured in `config/params.php` as described b
'file.storage' => [
'runtimeStorage' => [
'adapter' => [
'__class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'__construct()' => [
dirname(__DIR__) . '/runtime',
\League\Flysystem\UnixVisibility\PortableVisibilityConverter::fromArray([
Expand All @@ -81,7 +81,7 @@ Additional filesystems could be configured in `config/params.php` as described b
],
'documentStorage' => [
'adapter' => [
'__class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'__construct()' => [
dirname(__DIR__) . '/docs',
\League\Flysystem\UnixVisibility\PortableVisibilityConverter::fromArray([
Expand Down Expand Up @@ -130,7 +130,7 @@ And then register it in the `params`:
'file.storage' => [
ImageStorageInterface::class => [
'adapter' => [
'__class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'class' => \League\Flysystem\Local\LocalFilesystemAdapter::class,
'__construct()' => [
dirname(__DIR__) . '/storage/images',
\League\Flysystem\UnixVisibility\PortableVisibilityConverter::fromArray([
Expand Down
2 changes: 1 addition & 1 deletion src/FileStorageServiceProvider.php
Expand Up @@ -26,7 +26,7 @@ public function register(Container $container): void

private function validateAdapter(string $alias, array $config): void
{
$adapter = $config['adapter']['__class'] ?? false;
$adapter = $config['adapter']['class'] ?? false;
if (!$adapter) {
throw new \RuntimeException("Adapter is not defined in the \"$alias\" storage config.");
}
Expand Down

0 comments on commit 7e9a0c9

Please sign in to comment.