Skip to content

Commit 2608116

Browse files
committed
init
0 parents  commit 2608116

File tree

9 files changed

+936
-0
lines changed

9 files changed

+936
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# phpstorm project files
2+
.idea
3+
4+
# netbeans project files
5+
nbproject
6+
7+
# zend studio for eclipse project files
8+
.buildpath
9+
.project
10+
.settings
11+
12+
# windows thumbnail cache
13+
Thumbs.db
14+
15+
# Mac DS_Store Files
16+
.DS_Store
17+
18+
# phpunit itself is not needed
19+
phpunit.phar
20+
21+
# local phpunit config
22+
/phpunit.xml
23+
24+
# composer vendor dir
25+
/vendor
26+
27+
# composer itself is not needed
28+
composer.phar
29+
composer.lock
30+
31+
# Node.js modules
32+
node_modules/
33+
package-lock.json
34+
35+
# Bower components
36+
bower_components
37+
/package-lock.json

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: php
2+
3+
os: linux
4+
dist: xenial
5+
6+
php:
7+
- 7.2
8+
- 7.3
9+
- 7.4
10+
11+
cache:
12+
timeout: 3
13+
directories:
14+
- $HOME/.cache
15+
16+
install: travis_retry composer install --no-suggest --optimize-autoloader --no-progress --no-interaction
17+
18+
script: vendor/bin/phpunit --verbose

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Peter
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# laravel-flysystem-qiniu
2+
3+
This is a Flysystem adapter for the Qiniu
4+
5+
[![Build Status](https://travis-ci.com/larvacent/laravel-flysystem-qiniu.svg?branch=master)](https://travis-ci.com/larvacent/laravel-flysystem-qiniu)
6+
7+
8+
## Installation
9+
10+
```bash
11+
composer require larva/laravel-flysystem-qiniu -vv
12+
```
13+
14+
## for Laravel
15+
16+
This service provider must be registered.
17+
18+
```php
19+
// config/app.php
20+
21+
'providers' => [
22+
'...',
23+
Larva\Flysystem\Qiniu\QiniuServiceProvider::class,
24+
];
25+
```
26+
27+
edit the config file: config/filesystems.php
28+
29+
add config
30+
31+
```php
32+
'qiniu' => [
33+
'driver' => 'qiniu',
34+
'access_key' => env('QINIU_ACCESS_KEY'),
35+
'secret_key' => env('QINIU_SECRET_KEY'),
36+
'region' => env('QINIU_RQGION'),
37+
'bucket' => env('QINIU_BUCKET'),
38+
'prefix' => env('QINIU_PREFIX'), // optional
39+
'url' => env('QINIU_BUCKET_URL'),
40+
'visibility' => 'private',
41+
],
42+
```
43+
44+
change default to oss
45+
46+
```php
47+
'default' => 'qiniu'
48+
```
49+
50+
## Use
51+
52+
see [Laravel wiki](https://laravel.com/docs/5.6/filesystem)

composer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "larva/laravel-flysystem-qiniu",
3+
"description": "This is a Flysystem adapter for the Qiniu.",
4+
"keywords": [ "flysystem", "qiniu", "larva" ],
5+
"type": "library",
6+
"license": "MIT",
7+
"require": {
8+
"php": "^7.2 | ^8.0",
9+
"illuminate/support": "^6.0 || ^7.0 || ^8.0",
10+
"league/flysystem": "^1.0",
11+
"qiniu/php-sdk": "^7.3"
12+
},
13+
"require-dev": {
14+
"phpunit/phpunit": "^8.0"
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"Larva\\Flysystem\\Qiniu\\": "src"
19+
}
20+
},
21+
"autoload-dev": {
22+
"psr-4": {
23+
"Larva\\Flysystem\\Qiniu\\Tests\\": "tests"
24+
}
25+
},
26+
"extra": {
27+
"branch-alias": {
28+
"dev-master": "1.0-dev"
29+
},
30+
"laravel": {
31+
"providers": [
32+
"Larva\\Flysystem\\Qiniu\\QiniuServiceProvider"
33+
]
34+
}
35+
},
36+
"prefer-stable": true
37+
}

phpunit.xml.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
backupGlobals="false"
5+
backupStaticAttributes="false"
6+
bootstrap="vendor/autoload.php"
7+
colors="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
11+
processIsolation="false"
12+
stopOnFailure="false">
13+
<testsuites>
14+
<testsuite name="Application Test Suite">
15+
<directory>./tests/</directory>
16+
</testsuite>
17+
</testsuites>
18+
<filter>
19+
<whitelist>
20+
<directory suffix=".php">src/</directory>
21+
</whitelist>
22+
</filter>
23+
</phpunit>

0 commit comments

Comments
 (0)