Skip to content

Commit 7bb9d60

Browse files
committed
feat: Separate code
1 parent dc4af7c commit 7bb9d60

File tree

14 files changed

+108
-281
lines changed

14 files changed

+108
-281
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ jobs:
2424
- name: PHPCSFixer check
2525
run: composer check-style
2626

27-
# phpstan:
28-
# runs-on: ubuntu-18.04
29-
# steps:
30-
# - uses: actions/checkout@v2
31-
#
32-
# - name: Setup PHP environment
33-
# uses: shivammathur/setup-php@v2
34-
# with:
35-
# php-version: '8.0'
36-
#
37-
# - name: Install dependencies
38-
# run: composer install --prefer-dist --no-progress
39-
#
40-
# - name: PHP Static Analysis
41-
# run: composer phpstan
27+
phpstan:
28+
runs-on: ubuntu-18.04
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: Setup PHP environment
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: '8.0'
36+
37+
- name: Install dependencies
38+
run: composer install --prefer-dist --no-progress
39+
40+
- name: PHP Static Analysis
41+
run: composer phpstan
4242

4343
phpunit:
4444
strategy:

.scrutinizer.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
filter:
2-
excluded_paths:
3-
- 'tests/*'
41
checks:
52
php: true
6-
coding_style:
7-
php: { }
3+
84
build:
95
environment:
106
php:
11-
version: 8.0
12-
tests:
13-
override:
14-
-
15-
command: 'vendor/bin/phpunit --coverage-clover=some-file'
16-
coverage:
17-
file: 'some-file'
18-
format: 'clover'
7+
version: '8.0.2'
8+
variables:
9+
XDEBUG_MODE: coverage
10+
nodes:
11+
analysis:
12+
tests:
13+
override:
14+
- php-scrutinizer-run
15+
16+
tools:
17+
external_code_coverage:
18+
timeout: 600

README-CN.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Laravel 的阿里云对象存储 Storage 扩展
5050
'use_ssl' => env('OSS_SSL', false), // Optional, 是否使用HTTPS
5151
'prefix' => env('OSS_PREFIX', ''), // Optional, 统一存储地址前缀
5252
"reverse_proxy' => env('OSS_REVERSE_PROXY', false), // Optional, 域名是否使用NGINX代理绑定
53-
'signature_expires' => env('OSS_SIGNATURE_EXPIRES', 3600), // Optional, 临时域名的默认过期时间, 单位秒
5453
],
5554
// ...
5655
]
@@ -81,7 +80,6 @@ Storage::disk('oss')->put('dir/path/download.txt', 'Download content', ["headers
8180
#### 读取
8281
```php
8382
Storage::disk('oss')->url('dir/path/file.txt');
84-
Storage::disk('oss')->temporaryUrl('dir/path/file.txt');
8583
Storage::disk('oss')->temporaryUrl('dir/path/file.txt', \Carbon\Carbon::now()->addMinutes(30));
8684

8785
Storage::disk('oss')->get('dir/path/file.txt');

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ This package is a wrapper bridging [aliyun-oss-flysystem](https://github.com/alp
5050
'use_ssl' => env('OSS_SSL', false), // Optional, Whether to use HTTPS
5151
'prefix' => env('OSS_PREFIX', ''), // Optional, The prefix of the store path
5252
"reverse_proxy' => env('OSS_REVERSE_PROXY', false), // Optional, Nginx reverse proxy domain
53-
'signature_expires' => env('OSS_SIGNATURE_EXPIRES', 3600), // Optional, Default expiration time for temporary url
5453
],
5554
// ...
5655
]
@@ -81,7 +80,6 @@ Storage::disk('oss')->put('dir/path/download.txt', 'Download content', ["headers
8180
#### Read
8281
```php
8382
Storage::disk('oss')->url('dir/path/file.txt');
84-
Storage::disk('oss')->temporaryUrl('dir/path/file.txt');
8583
Storage::disk('oss')->temporaryUrl('dir/path/file.txt', \Carbon\Carbon::now()->addMinutes(30));
8684
8785
Storage::disk('oss')->get('dir/path/file.txt');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^8.0.2",
15-
"alphasnow/aliyun-oss-flysystem": "^3.0"
15+
"alphasnow/aliyun-oss-flysystem": "^3.2"
1616
},
1717
"require-dev": {
1818
"mockery/mockery": "^1.5",

config/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"options" => [
1919
// \OSS\OssClient::OSS_CHECK_MD5 => false,
2020
],
21-
"reverse_proxy" => env('OSS_REVERSE_PROXY', false),
22-
'signature_expires' => env('OSS_SIGNATURE_EXPIRES', 3600),
2321
'internal' => env('OSS_INTERNAL', null), // For example: oss-cn-shanghai-internal.aliyuncs.com
2422
'domain' => env('OSS_DOMAIN', null), // For example: oss.my-domain.com
23+
"reverse_proxy" => env('OSS_REVERSE_PROXY', false),
24+
2525
'macros' => []
2626
];

phpunit.xml.dist

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
11-
<testsuites>
12-
<testsuite name="Application Test Suite">
13-
<directory>./tests/</directory>
14-
</testsuite>
15-
</testsuites>
16-
<filter>
17-
<whitelist>
18-
<directory suffix=".php">src/</directory>
19-
<exclude>
20-
<directory suffix="ServiceProvider.php">src/</directory>
21-
<directory suffix="Exception.php">src/</directory>
22-
</exclude>
23-
</whitelist>
24-
</filter>
25-
<php>
26-
<env name="APP_ENV" value="testing"/>
27-
<env name="OSS_ACCESS_KEY_ID" value="access_id" />
28-
<env name="OSS_ACCESS_KEY_SECRET" value="access_secret" />
29-
<env name="OSS_BUCKET" value="bucket" />
30-
<env name="OSS_ENDPOINT" value="endpoint.com" />
31-
<env name="OSS_PREFIX" value="tests" />
32-
</php>
33-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">./src/</directory>
6+
</include>
7+
<exclude>
8+
<directory suffix="ServiceProvider.php">./src/</directory>
9+
<directory suffix=".php">./macros/</directory>
10+
</exclude>
11+
</coverage>
12+
<testsuites>
13+
<testsuite name="Tests">
14+
<directory>./tests/</directory>
15+
</testsuite>
16+
</testsuites>
17+
<php>
18+
<env name="APP_ENV" value="testing"/>
19+
<env name="OSS_ACCESS_KEY_ID" value="access_id" />
20+
<env name="OSS_ACCESS_KEY_SECRET" value="access_secret" />
21+
<env name="OSS_BUCKET" value="bucket" />
22+
<env name="OSS_ENDPOINT" value="endpoint.com" />
23+
<env name="OSS_PREFIX" value="tests" />
24+
</php>
25+
</phpunit>

src/AliyunAdapter.php

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

src/AliyunConfig.php

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

0 commit comments

Comments
 (0)