Skip to content

Commit daf3edc

Browse files
authored
Merge pull request thephpleague#66 from thephpleague/prepare-2-0
Prepare 2.0 release
2 parents 6177ba2 + 507afb6 commit daf3edc

11 files changed

Lines changed: 48 additions & 30 deletions

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ library into Symfony applications.
1212
It provides an efficient abstraction for the filesystem in order to change the storage backend depending
1313
on the execution environment (local files in development, cloud storage in production and memory in tests).
1414

15+
> Note: you are reading the documentation for flysystem-bundle 2.0, which relies on Flysystem 2.X.
16+
> If you use Flysystem 1.X, use [flysystem-bundle 1.X](https://github.com/thephpleague/flysystem-bundle/tree/1.x).
17+
1518
## Installation
1619

17-
flysystem-bundle requires PHP 7.1+ and Symfony 4.2+.
20+
flysystem-bundle requires PHP 7.2+ and Symfony 4.2+.
1821

1922
You can install the bundle using Symfony Flex:
2023

@@ -93,14 +96,16 @@ to interact with your storage.
9396

9497
## Full documentation
9598

96-
1. [Getting started](https://flysystem.thephpleague.com/v2/docs/getting-started/)
99+
1. [Getting started](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md)
97100
2. Cloud storage providers:
98101
[AsyncAws S3](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#asyncaws-s3),
99-
[AWS S3](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#aws-s3),
100-
[Google Cloud Storage](https://flysystem.thephpleague.com/v2/docs/adapter/gcs/),
102+
[AWS SDK S3](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#aws-sdk-s3),
103+
[Google Cloud Storage](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#google-cloud-storage),
104+
[DigitalOcean Spaces](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#digitalocean-spaces),
105+
[Scaleway Object Storage](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/2-cloud-storage-providers.md#scaleway-object-storage)
101106
3. [Interacting with FTP and SFTP servers](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/3-interacting-with-ftp-and-sftp-servers.md)
102-
4. [Using a lazy adapter to switch storage backend using an environment variable](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/5-using-lazy-adapter-to-switch-at-runtime.md)
103-
5. [Creating a custom adapter](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/6-creating-a-custom-adapter.md)
107+
4. [Using a lazy adapter to switch storage backend using an environment variable](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/4-using-lazy-adapter-to-switch-at-runtime.md)
108+
5. [Creating a custom adapter](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/5-creating-a-custom-adapter.md)
104109

105110
* [Security issue disclosure procedure](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/A-security-disclosure-procedure.md)
106111
* [Configuration reference](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/B-configuration-reference.md)

UPGRADE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Upgrading from 1.0 to 2.0
2+
3+
flysystem-bundle 2.0 introduces Backward Compatibility breaks, meaning you will need to update
4+
the code of your projects to upgrade.
5+
6+
flysystem-bundle 2.0 relies on Flysystem 2.0, which introduced most of the backward incompatible
7+
changes. You should read
8+
[Flysystem 2.0 upgrade guide](https://flysystem.thephpleague.com/v2/docs/advanced/upgrade-to-2.0.0/).
9+
10+
In addition to the library updates, the bundle also changed a bit:
11+
12+
* Following the drop of support for several Cloud providers in Flysystem itself, the bundle no longer
13+
natively supports Azure, Dropbox, Rackspace and WebDAV. If the need arise for community adapters to be
14+
ported to Flysystem 2 and flysystem-bundle 2, we could add them again.
15+
* Following their removal from the main library, null, cache, zip and replicate adapters were removed
16+
from the bundle as well.
17+
* Following the drop of support for plugins in the main library, the bundle does not support them anymore.

docs/2-cloud-storage-providers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ flysystem:
3333
prefix: 'optional/path/prefix'
3434
```
3535
36-
## AWS S3
36+
## AWS SDK S3
3737
3838
### Installation
3939

docs/3-interacting-with-ftp-and-sftp-servers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ flysystem:
6464
6565
## Next
6666
67-
[Using a lazy adapter to switch storage backend using an environment variable](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/5-using-lazy-adapter-to-switch-at-runtime.md)
67+
[Using a lazy adapter to switch storage backend using an environment variable](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/4-using-lazy-adapter-to-switch-at-runtime.md)

docs/5-using-lazy-adapter-to-switch-at-runtime.md renamed to docs/4-using-lazy-adapter-to-switch-at-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ same way as any other storage:
110110

111111
## Next
112112

113-
[Creating a custom adapter](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/6-creating-a-custom-adapter.md)
113+
[Creating a custom adapter](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/5-creating-a-custom-adapter.md)
File renamed without changes.

tests/DependencyInjection/FlysystemExtensionTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use League\Flysystem\FilesystemOperator;
1919
use PHPUnit\Framework\TestCase;
2020
use Symfony\Component\Dotenv\Dotenv;
21-
use Symfony\Component\HttpKernel\Kernel;
2221
use Tests\League\FlysystemBundle\Kernel\FlysystemAppKernel;
2322

2423
class FlysystemExtensionTest extends TestCase
@@ -27,8 +26,10 @@ public function provideFilesystems()
2726
{
2827
$fsNames = [
2928
'fs_aws',
29+
'fs_custom',
3030
'fs_ftp',
3131
'fs_gcloud',
32+
'fs_lazy',
3233
'fs_local',
3334
'fs_sftp',
3435
];
@@ -95,14 +96,9 @@ private function getClientMocks()
9596
$gcloud = $this->createMock(StorageClient::class);
9697
$gcloud->method('bucket')->willReturn($this->createMock(Bucket::class));
9798

98-
$asyncAws = null;
99-
if (Kernel::VERSION_ID > 50200 && class_exists(AsyncS3Client::class)) {
100-
$asyncAws = $this->createMock(AsyncS3Client::class);
101-
}
102-
10399
return [
104100
'aws_client_service' => $this->createMock(S3Client::class),
105-
'asyncaws_client_service' => $asyncAws,
101+
'asyncaws_client_service' => $this->createMock(AsyncS3Client::class),
106102
'gcloud_client_service' => $gcloud,
107103
];
108104
}

tests/Kernel/config/flysystem.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
flysystem:
22
storages:
3+
fs_asyncaws:
4+
adapter: 'asyncaws'
5+
options:
6+
client: 'asyncaws_client_service'
7+
bucket: '%env(AWS_BUCKET)%'
8+
prefix: 'optional/path/prefix'
9+
310
fs_aws:
411
adapter: 'aws'
512
options:
613
client: 'aws_client_service'
714
bucket: '%env(AWS_BUCKET)%'
815
prefix: 'optional/path/prefix'
916

17+
fs_custom:
18+
adapter: 'custom_adapter'
19+
1020
fs_ftp:
1121
adapter: 'ftp'
1222
options:

tests/Kernel/config/flysystem_asyncaws.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/Kernel/config/services.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ services:
33
public: true
44

55
custom_adapter:
6-
class: 'League\Flysystem\Adapter\NullAdapter'
6+
class: 'League\Flysystem\InMemory\InMemoryFilesystemAdapter'
77

88
# Aliases used to test the services construction
9+
flysystem.test.fs_asyncaws: { alias: 'fs_asyncaws' }
910
flysystem.test.fs_aws: { alias: 'fs_aws' }
11+
flysystem.test.fs_custom: { alias: 'fs_custom' }
1012
flysystem.test.fs_ftp: { alias: 'fs_ftp' }
1113
flysystem.test.fs_gcloud: { alias: 'fs_gcloud' }
14+
flysystem.test.fs_lazy: { alias: 'fs_lazy' }
1215
flysystem.test.fs_local: { alias: 'fs_local' }
1316
flysystem.test.fs_memory: { alias: 'fs_memory' }
1417
flysystem.test.fs_sftp: { alias: 'fs_sftp' }

0 commit comments

Comments
 (0)