PHPackages                             xxtime/flysystem-aliyun-oss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. xxtime/flysystem-aliyun-oss

ActiveLibrary[File &amp; Storage](/categories/file-storage)

xxtime/flysystem-aliyun-oss
===========================

AliYun OSS adapter for flysystem. Support PHP8. aliyuncs/oss-sdk-php ~2.6

1.7.1(2y ago)51505.3k—9.6%9[2 issues](https://github.com/xxtime/flysystem-aliyun-oss/issues)[1 PRs](https://github.com/xxtime/flysystem-aliyun-oss/pulls)20MITPHPPHP &gt;=8.0

Since Jul 11Pushed 2y ago3 watchersCompare

[ Source](https://github.com/xxtime/flysystem-aliyun-oss)[ Packagist](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[ Docs](https://github.com/xxtime/flysystem-aliyun-oss)[ RSS](/packages/xxtime-flysystem-aliyun-oss/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (12)Used By (20)

Aliyun OSS Adapter For Flysystem.
---------------------------------

[](#aliyun-oss-adapter-for-flysystem)

[![Latest Stable Version](https://camo.githubusercontent.com/39a16cdb3b1e06ba31818853b4c7a6e7e27221378ae3605e83e8dd4f0a6d31ec/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f762f737461626c65)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![Build Status](https://camo.githubusercontent.com/51ce9de00d43a7bd6c2a341598016bd952cf719974ab27c1836607f5a2f5e7f3/68747470733a2f2f7472617669732d63692e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xxtime/flysystem-aliyun-oss)[![Total Downloads](https://camo.githubusercontent.com/e5651f98154fc655d0840777c0379b463da25b85dcbb1bd7e1b644418f774716/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f646f776e6c6f616473)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![License](https://camo.githubusercontent.com/e627d05fe77551b5494274e60967024e5bbab47d330823c12b4502dc0aeb1383/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f6c6963656e7365)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![Author](https://camo.githubusercontent.com/c98d4fe6bdaf1e53098bedf58e5c6c09dad29a2aa734501226fc037acc57b075/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d4a6f652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.xxtime.com)[![Code Climate](https://camo.githubusercontent.com/c771691b4574096cefabee726fdd5ecf9484e3a2ebba4f21aa00a88838daf962/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f6261646765732f6770612e737667)](https://codeclimate.com/github/xxtime/flysystem-aliyun-oss)

AliYun OSS Storage adapter for flysystem - a PHP filesystem abstraction.

Installation
------------

[](#installation)

composer require xxtime/flysystem-aliyun-oss

Logs
----

[](#logs)

##### 1.3.0

[](#130)

1. some args name changed
2. default region oss-cn-hangzhou

##### 1.7.0

[](#170)

1. support flysystem v3
2. support oss-sdk-php 2.6
3. support PHP8

Usage
-----

[](#usage)

```
use League\Flysystem\Filesystem;
use Xxtime\Flysystem\Aliyun\OssAdapter;

$aliyun = new OssAdapter([
    'accessId'       => '',
    'accessSecret'   => '',
    'bucket'         => '',
    'endpoint'       => '',
    // 'timeout'        => 3600,
    // 'connectTimeout' => 10,
    // 'isCName'        => false,
    // 'token'          => '',
]);
$filesystem = new Filesystem($aliyun);

// Write Files
$filesystem->write('path/to/file.txt', 'contents');
// get RAW data from aliYun OSS
$raw = $aliyun->supports->getFlashData();

// Write Use writeStream
$stream = fopen('local/path/to/file.txt', 'r+');
$filesystem->writeStream('path/to/file.txt', $stream);

// Update Files
$filesystem->update('path/to/file.txt', 'new contents');

// Check if a file exists
$exists = $filesystem->has('path/to/file.txt');

// Read Files
$contents = $filesystem->read('path/to/file.txt');

// Delete Files
$filesystem->delete('path/to/file.txt');

// Rename Files
$filesystem->rename('filename.txt', 'newname.txt');

// Copy Files
$filesystem->copy('filename.txt', 'duplicate.txt');

// list the contents (not support recursive now)
$filesystem->listContents('path', false);
```

```
// 说明：此方法返回从阿里云接口返回的原生数据，仅可调用一次
// DESC: this function return AliYun RAW data
$raw = $aliyun->supports->getFlashData();
```

Document
--------

[](#document)

1. [Region And Endpoint Table](https://help.aliyun.com/document_detail/31837.html)
2. [Aliyun OSS PHP SDK Document](https://help.aliyun.com/document_detail/85580.html)

Reference
---------

[](#reference)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~260 days

Recently: every ~420 days

Total

10

Last Release

890d ago

PHP version history (3 changes)1.1.0PHP &gt;=5.5.0

1.6.0PHP &gt;=7.2

1.7.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d98ca75291ed585ef10c792c72d0da28ae541c80e172f123acaf35f0aacd9b5?d=identicon)[zlab](/maintainers/zlab)

---

Top Contributors

[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (2 commits)")[![53caiyu](https://avatars.githubusercontent.com/u/14135790?v=4)](https://github.com/53caiyu "53caiyu (1 commits)")[![JoeByte](https://avatars.githubusercontent.com/u/4596910?v=4)](https://github.com/JoeByte "JoeByte (1 commits)")

---

Tags

aliyun-ossflysystemregionFlysystemaliyun-ossflysystem-aliyun-oss

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/xxtime-flysystem-aliyun-oss/health.svg)

```
[![Health](https://phpackages.com/badges/xxtime-flysystem-aliyun-oss/health.svg)](https://phpackages.com/packages/xxtime-flysystem-aliyun-oss)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40129.5M87](/packages/league-flysystem-bundle)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[league/flysystem-ftp

FTP filesystem adapter for Flysystem.

2820.8M101](/packages/league-flysystem-ftp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
