PHPackages                             alphasnow/aliyun-oss-flysystem - 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. alphasnow/aliyun-oss-flysystem

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

alphasnow/aliyun-oss-flysystem
==============================

Flysystem adapter for the Aliyun storage

3.5.0(2w ago)15293.7k↓30.5%113MITPHPCI passing

Since Jun 9Pushed 2w ago1 watchersCompare

[ Source](https://github.com/alphasnow/aliyun-oss-flysystem)[ Packagist](https://packagist.org/packages/alphasnow/aliyun-oss-flysystem)[ Docs](https://alphasnow.github.io/aliyun-oss-flysystem/)[ RSS](/packages/alphasnow-aliyun-oss-flysystem/feed)WikiDiscussions 3.x Synced 2w ago

READMEChangelog (4)Dependencies (16)Versions (50)Used By (3)

Aliyun OSS Flysystem
====================

[](#aliyun-oss-flysystem)

💾 Flysystem Adapter for [Aliyun Object Storage Service](https://www.alibabacloud.com/help/en/object-storage-service).

[![Latest Stable Version](https://camo.githubusercontent.com/47fffa0ade9724ed9de0737df77dac071ce35bf17ac39075ac882502b789ca53/68747470733a2f2f706f7365722e707567782e6f72672f616c706861736e6f772f616c6979756e2d6f73732d666c7973797374656d2f762f737461626c65)](https://packagist.org/packages/alphasnow/aliyun-oss-flysystem)[![Total Downloads](https://camo.githubusercontent.com/249a8fabeb48b71be414ab9f99aaa68528b255b89917ea4aec9b648f5eb38801/68747470733a2f2f706f7365722e707567782e6f72672f616c706861736e6f772f616c6979756e2d6f73732d666c7973797374656d2f646f776e6c6f616473)](https://packagist.org/packages/alphasnow/aliyun-oss-flysystem)[![License](https://camo.githubusercontent.com/388cb44d96fc28999812452fcb1396947045a050d2578b13a4938d517b41190b/68747470733a2f2f706f7365722e707567782e6f72672f616c706861736e6f772f616c6979756e2d6f73732d666c7973797374656d2f6c6963656e7365)](https://packagist.org/packages/alphasnow/aliyun-oss-flysystem)[![tests](https://github.com/alphasnow/aliyun-oss-flysystem/actions/workflows/tests.yml/badge.svg?branch=3.x)](https://github.com/alphasnow/aliyun-oss-flysystem/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/3e3e5f682434b142a64f36b3e352aa9f2ebe4da4ab75ea667e0b38785b5a7e7a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c706861736e6f772f616c6979756e2d6f73732d666c7973797374656d2f62616467652e7376673f6272616e63683d33)](https://coveralls.io/github/alphasnow/aliyun-oss-flysystem?branch=3)

Compatibility
-------------

[](#compatibility)

**flysystem****aliyun-oss-flysystem****readme**^3.0^3.0[readme](https://github.com/alphasnow/aliyun-oss-flysystem/blob/3.x/README.md)^2.0^2.0[readme](https://github.com/alphasnow/aliyun-oss-flysystem/blob/2.x/README.md)^1.0^1.0[readme](https://github.com/alphasnow/aliyun-oss-flysystem/blob/1.x/README.md)~1.0.0^0.3[readme](https://github.com/alphasnow/aliyun-oss-flysystem/blob/0.x/README.md)Installation
------------

[](#installation)

```
composer require "alphasnow/aliyun-oss-flysystem"
```

Usage
-----

[](#usage)

### Initialize

[](#initialize)

```
use OSS\OssClient;
use AlphaSnow\Flysystem\Aliyun\AliyunFactory;

$config = [
    "access_key_id" => "**************",             // Required, YourAccessKeyId
    "access_key_secret" => "********************",   // Required, YourAccessKeySecret
    "endpoint" => "oss-cn-shanghai.aliyuncs.com",    // Required, Endpoint
    "bucket" => "bucket-name",                       // Required, Bucket
];

$flysystem = (new AliyunFactory())->createFilesystem($config);

$flysystem->write("file.md", "contents");
$flysystem->writeStream("foo.md", fopen("file.md", "r"));

$fileExists = $flysystem->fileExists("foo.md");
$flysystem->copy("foo.md", "baz.md");
$flysystem->move("baz.md", "bar.md");
$flysystem->delete("bar.md");
$has = $flysystem->has("bar.md");

$read = $flysystem->read("file.md");
$readStream = $flysystem->readStream("file.md");

$flysystem->createDirectory("foo/");
$directoryExists = $flysystem->directoryExists("foo/");
$flysystem->deleteDirectory("foo/");

$listContents = $flysystem->listContents("/", true);
$listPaths = [];
foreach ($listContents as $listContent) {
    $listPaths[] = $listContent->path();
}

$lastModified = $flysystem->lastModified("file.md");
$fileSize = $flysystem->fileSize("file.md");
$mimeType = $flysystem->mimeType("file.md");

$flysystem->setVisibility("file.md", "private");
$visibility = $flysystem->visibility("file.md");
```

### Options

[](#options)

```
$flysystem->write("file.md", "contents", [
    "options" => ["checkmd5" => false]
]);
$flysystem->write("bar.md", "contents", [
    "headers" => ["Content-Disposition" => "attachment;filename=bar.md"]
]);
$flysystem->write("baz.md", "contents", [
    "visibility" => "private"
]);
```

Reference
---------

[](#reference)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance96

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~38 days

Recently: every ~207 days

Total

50

Last Release

20d ago

Major Versions

1.5.1 → 2.0.02022-07-30

0.x-dev → 1.5.22022-07-30

1.5.2 → 2.x-dev2022-07-30

2.0.1 → 3.2.82022-07-30

1.x-dev → 3.3.02022-11-21

PHP version history (5 changes)0.2.4PHP &gt;=5.5.9

1.2.3PHP &gt;=7.0

3.0.0PHP ^8.0

3.0.2PHP ^8.0.2

2.0.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/90877a466dd664c9a6b4ccd2a9ccf46e54427307198fa11201976aac968f5fca?d=identicon)[alphasnow](/maintainers/alphasnow)

---

Top Contributors

[![alphasnow](https://avatars.githubusercontent.com/u/8286647?v=4)](https://github.com/alphasnow "alphasnow (115 commits)")[![aspirantzhang](https://avatars.githubusercontent.com/u/24559988?v=4)](https://github.com/aspirantzhang "aspirantzhang (1 commits)")[![ChinaMoli](https://avatars.githubusercontent.com/u/39550254?v=4)](https://github.com/ChinaMoli "ChinaMoli (1 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")[![gokure](https://avatars.githubusercontent.com/u/88591?v=4)](https://github.com/gokure "gokure (1 commits)")[![nnmer](https://avatars.githubusercontent.com/u/1620737?v=4)](https://github.com/nnmer "nnmer (1 commits)")

---

Tags

aliyunflysystemossphpsdkfilesystemadapteraliyunoss

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k293.8M1.2k](/packages/league-flysystem-aws-s3-v3)[iidestiny/flysystem-oss

Flysystem adapter for the Oss storage.

95653.2k29](/packages/iidestiny-flysystem-oss)[luoyy/ali-oss-storage

aliyun oss filesystem storage for laravel 10+

1431.3k1](/packages/luoyy-ali-oss-storage)[aobozhang/aliyun-oss-adapter

Use Aliyun oss as Storage for Laravel 5.0+

141.0k](/packages/aobozhang-aliyun-oss-adapter)

PHPackages © 2026

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