PHPackages                             onekb/hyperf-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. onekb/hyperf-oss

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

onekb/hyperf-oss
================

适配hyperf的阿里云OSS组件

1.0.1(4y ago)222MITPHPPHP &gt;=7.3

Since Dec 7Pushed 4y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

HyperfOSS
=========

[](#hyperfoss)

Aliyun OSS SDK for Hyperf2.X 基于 [aliyuncs/oss-sdk-php](https://github.com/aliyun/aliyun-oss-php-sdk)

安装
--

[](#安装)

```
composer require onekb/hyperf-oss
```

配置
--

[](#配置)

1. 创建配置文件

```
php bin/hyperf.php vendor:publish onekb/hyperf-oss
```

2. 修改 `config/autoload/oss.php` 参数或者修改 .env 环境变量参数。

使用
--

[](#使用)

```
// 方法一：hyperf类里面自动注入
/**
 * @Inject
 * @var HyperfOSS\OSS
 */
protected $oss;

// 方法二：主动new
$oss = new OSS();

// 方法三：在容器里拿出来
$oss = Hyperf\Utils\ApplicationContext::getContainer()->get(OSS::class)

// 直接调用方法
$oss->signUrl('bucket-name', 'filename.pdf', 3600, OssClient::OSS_HTTP_PUT);
// 使用其他配置
$oss->make('other-config')->signUrl('bucket-name', 'filename.pdf', 3600, OssClient::OSS_HTTP_PUT);
```

[方法详情参考官方文档](https://help.aliyun.com/document_detail/32098.html)
----------------------------------------------------------------

[](#方法详情参考官方文档)

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1623d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dd22bce5121cc4cf36876caf143f65734f04c8dc962385887ba9df2ba518e08?d=identicon)[1kb](/maintainers/1kb)

---

Top Contributors

[![onekb](https://avatars.githubusercontent.com/u/16450084?v=4)](https://github.com/onekb "onekb (3 commits)")

---

Tags

phphyperf

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/onekb-hyperf-oss/health.svg)

```
[![Health](https://phpackages.com/badges/onekb-hyperf-oss/health.svg)](https://phpackages.com/packages/onekb-hyperf-oss)
```

###  Alternatives

[hfo4/cloudreve

A program help you build your own cloud in minutes.

27.5k6.5k](/packages/hfo4-cloudreve)[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)

PHPackages © 2026

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