Skip to content

Commit a9f7fc7

Browse files
committedDec 25, 2024
feature: use adapt for wrapper(because laravel 11 createFileDriver add new params)
1 parent 7193386 commit a9f7fc7

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed
 

‎composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"description": "Webman plugin webman-tech/laravel-filesystem",
66
"require": {
77
"php": ">=7.2",
8-
"illuminate/filesystem": ">=7.0",
8+
"illuminate/filesystem": ">=8.0",
99
"league/flysystem": "^1.1|^3.0"
1010
},
1111
"require-dev": {
1212
"alphasnow/aliyun-oss-laravel": "^3.0|^4.0",
1313
"iidestiny/flysystem-oss": "^2.1|^4.0",
14-
"illuminate/http": ">=7.0",
14+
"illuminate/http": ">=8.0",
1515
"overtrue/flysystem-cos": "^2|^3|^4|^5",
1616
"overtrue/flysystem-qiniu": "^1|^3",
1717
"phpunit/phpunit": "^8|^9",

‎src/FilesystemManager.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,9 @@ public function __construct()
3737
/**
3838
* @inheritDoc
3939
*/
40-
public function createLocalDriver(array $config)
40+
protected function adapt(FilesystemInterface $filesystem)
4141
{
42-
return FilesystemAdapter::wrapper(parent::createLocalDriver($config));
43-
}
44-
45-
/**
46-
* @inheritDoc
47-
*/
48-
public function createFtpDriver(array $config)
49-
{
50-
return FilesystemAdapter::wrapper(parent::createFtpDriver($config));
51-
}
52-
53-
/**
54-
* @inheritDoc
55-
*/
56-
public function createSftpDriver(array $config)
57-
{
58-
return FilesystemAdapter::wrapper(parent::createSftpDriver($config));
59-
}
60-
61-
/**
62-
* @inheritDoc
63-
*/
64-
public function createS3Driver(array $config)
65-
{
66-
return FilesystemAdapter::wrapper(parent::createS3Driver($config));
42+
return FilesystemAdapter::wrapper(parent::adapt($filesystem));
6743
}
6844

6945
/**

0 commit comments

Comments
 (0)