diff --git a/src/Adapter/Builder/AbstractAdapterDefinitionBuilder.php b/src/Adapter/Builder/AbstractAdapterDefinitionBuilder.php index f608887..355dc51 100644 --- a/src/Adapter/Builder/AbstractAdapterDefinitionBuilder.php +++ b/src/Adapter/Builder/AbstractAdapterDefinitionBuilder.php @@ -55,11 +55,6 @@ private function ensureRequiredPackagesAvailable() return; } - throw new MissingPackageException(sprintf( - "Missing package%s, to use the \"%s\" adapter, run:\n\ncomposer require %s", - \count($missingPackages) > 1 ? 's' : '', - $this->getName(), - implode(' ', $missingPackages) - )); + throw new MissingPackageException(sprintf("Missing package%s, to use the \"%s\" adapter, run:\n\ncomposer require %s", \count($missingPackages) > 1 ? 's' : '', $this->getName(), implode(' ', $missingPackages))); } } diff --git a/src/Adapter/Builder/AdapterDefinitionBuilderInterface.php b/src/Adapter/Builder/AdapterDefinitionBuilderInterface.php index 2f9eca1..d36615a 100644 --- a/src/Adapter/Builder/AdapterDefinitionBuilderInterface.php +++ b/src/Adapter/Builder/AdapterDefinitionBuilderInterface.php @@ -24,10 +24,6 @@ public function getName(): string; /** * Create the definition for this builder's adapter given an array of options. - * - * @param array $options - * - * @return Definition */ public function createDefinition(array $options): Definition; } diff --git a/tests/DependencyInjection/FlysystemExtensionTest.php b/tests/DependencyInjection/FlysystemExtensionTest.php index d3c9076..ce5d39d 100644 --- a/tests/DependencyInjection/FlysystemExtensionTest.php +++ b/tests/DependencyInjection/FlysystemExtensionTest.php @@ -11,6 +11,7 @@ namespace Tests\League\FlysystemBundle\DependencyInjection; +use AsyncAws\S3\S3Client as AsyncS3Client; use Aws\S3\S3Client; use Google\Cloud\Storage\Bucket; use Google\Cloud\Storage\StorageClient; @@ -28,6 +29,7 @@ class FlysystemExtensionTest extends TestCase public function provideFilesystems() { $fsNames = [ + 'fs_asyncaws', 'fs_aws', 'fs_azure', 'fs_cache', @@ -105,6 +107,7 @@ private function getClientMocks() return [ 'aws_client_service' => $this->createMock(S3Client::class), + 'asyncaws_client_service' => $this->createMock(AsyncS3Client::class), 'azure_client_service' => $this->createMock(BlobRestProxy::class), 'dropbox_client_service' => $this->createMock(DropboxClient::class), 'gcloud_client_service' => $gcloud, diff --git a/tests/Kernel/config/flysystem.yaml b/tests/Kernel/config/flysystem.yaml index 2ebbd88..05ac7e1 100644 --- a/tests/Kernel/config/flysystem.yaml +++ b/tests/Kernel/config/flysystem.yaml @@ -1,5 +1,12 @@ flysystem: storages: + fs_asyncaws: + adapter: 'asyncaws' + options: + client: 'asyncaws_client_service' + bucket: '%env(AWS_BUCKET)%' + prefix: 'optional/path/prefix' + fs_aws: adapter: 'aws' options: diff --git a/tests/Kernel/config/services.yaml b/tests/Kernel/config/services.yaml index 28634a6..d22b004 100644 --- a/tests/Kernel/config/services.yaml +++ b/tests/Kernel/config/services.yaml @@ -6,6 +6,7 @@ services: class: 'League\Flysystem\Adapter\NullAdapter' # Aliases used to test the services construction + flysystem.test.fs_asyncaws: { alias: 'fs_asyncaws' } flysystem.test.fs_aws: { alias: 'fs_aws' } flysystem.test.fs_azure: { alias: 'fs_azure' } flysystem.test.fs_cache: { alias: 'fs_cache' }