PHPackages                             yareg/yii2-s3client - 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. yareg/yii2-s3client

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

yareg/yii2-s3client
===================

Amazon S3 / MinIO client component for Yii2 framework

v2.1.3(5y ago)0581MITPHPPHP &gt;=7.0

Since Jul 18Pushed 5y agoCompare

[ Source](https://github.com/yareg-com/yii2-s3client)[ Packagist](https://packagist.org/packages/yareg/yii2-s3client)[ RSS](/packages/yareg-yii2-s3client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (15)Used By (0)

yii2-S3Client
=============

[](#yii2-s3client)

[![Latest Stable Version](https://camo.githubusercontent.com/6ff28d0243b2c1a26da72c261f412bc3ac56f1681ddb26e82a2bd8e2909f5b13/68747470733a2f2f706f7365722e707567782e6f72672f79617265672f796969322d7333636c69656e742f76)](//packagist.org/packages/yareg/yii2-s3client)[![Latest Unstable Version](https://camo.githubusercontent.com/5679d7d504ba683daecac795e22750c3b96e6e10d04d7dac5787e584d79bc15c/68747470733a2f2f706f7365722e707567782e6f72672f79617265672f796969322d7333636c69656e742f762f756e737461626c65)](//packagist.org/packages/yareg/yii2-s3client)[![License](https://camo.githubusercontent.com/4c40910ecdcb6dbe966bbd8e8e66f48f59a33db57ca5524601a5fdde031145fb/68747470733a2f2f706f7365722e707567782e6f72672f79617265672f796969322d7333636c69656e742f6c6963656e7365)](//packagist.org/packages/yareg/yii2-s3client)[![Total Downloads](https://camo.githubusercontent.com/398944a1e002b1e43635f3a9287ff9a5958f2a8edab8f04ea898e89fa8528159/68747470733a2f2f706f7365722e707567782e6f72672f79617265672f796969322d7333636c69656e742f646f776e6c6f616473)](//packagist.org/packages/yareg/yii2-s3client)

Yii2 S3Client based on [klinson/aws-s3-minio](https://github.com/klinson/aws-s3-minio)

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

[](#installation)

Preferred way to install is through [Composer](https://getcomposer.org):

```
php composer.phar require yareg/yii2-s3client:^2
```

Or, you may add

```
"yareg/yii2-s3client": "^2"
```

to the require section of your `composer.json` file and execute `php composer.phar update`.

Configuration
-------------

[](#configuration)

in `web.php`

```
'components' => [
    's3client' => [
        'class'=> 'yareg\S3Client',
        'key' => '',
        'secret' => '',
        'endpoint'=> '',
        'region' => '',
        'debug' => false, // optional
        'http' => [ //optional
            'verify' => false //use false to self-signed certs
        ],
    ],
],
```

Usage
-----

[](#usage)

```
/** @var S3Client $s3client */
$s3client = Yii::$app->s3client;

```

##### Bucket operations

[](#bucket-operations)

```
/**
 * @return array|mixed
 */
$s3client->listBuckets();

/**
 * @param string $bucket
 * @return bool
 */
$s3client->createBucket('test');

/**
 * @param string $bucket
 * @return bool
 */
$s3client->deleteBucket('test');

/**
 * @param string $bucket
 * @return bool
 */
$s3client->publishBucket('test'); // WARNING! Your files will be publicly accessible!

/**
 * @param string $bucket
 * @return bool
 */
$s3client->deleteBucketPolicy('test'); // May be used to unpublish the bucket

```

##### Object operations

[](#object-operations)

```
/**
 * @param string $filePath
 * @param string $bucket
 * @param string $key
 * @param array $meta
 * @param array $tags
 * @param array $args
 * @return bool
 */
$s3client->putFile(string $filePath, string $bucket, string $key, array $meta = [], array $tags = [], array $args = []);

/**
 * @param string $content
 * @param string $bucket
 * @param string $key
 * @param array $meta
 * @param array $tags
 * @param array $args
 * @return bool
 */
$s3client->putContent(string $content, string $bucket, string $key, array $meta = [], array $tags = [], array $args = []);

/**
 * @param string $bucket
 * @param string $key
 * @param string|null $saveAs
 * @return mixed|null
 */
$s3client->getObject(string $bucket, string $key, string $saveAs = null);

/**
 * @param string $bucket
 * @param string $prefix
 */
$s3client->listObjects(string $bucket, string $prefix = null);

/**
 * @param string $bucket
 * @param string $key
 * @return bool
 */
$s3client->objectExists(string $bucket, string $key);

/**
 * @param string $bucket
 * @param array $keys
 * @return bool
 */
$s3client->deleteObjects(string $bucket, array $keys = []);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 95.2% 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 ~26 days

Recently: every ~2 days

Total

14

Last Release

2153d ago

Major Versions

v1.3.0 → v2.0.02020-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/492ce524a0c1ac3db0e1820bc7b102f0b5c894ba81ba0743575ba369eee8a5ab?d=identicon)[yareg](/maintainers/yareg)

---

Top Contributors

[![yareg-com](https://avatars.githubusercontent.com/u/4700107?v=4)](https://github.com/yareg-com "yareg-com (20 commits)")[![grptx](https://avatars.githubusercontent.com/u/6595328?v=4)](https://github.com/grptx "grptx (1 commits)")

---

Tags

yii2PHP7minioyii2-componentss3client

### Embed Badge

![Health badge](/badges/yareg-yii2-s3client/health.svg)

```
[![Health](https://phpackages.com/badges/yareg-yii2-s3client/health.svg)](https://phpackages.com/packages/yareg-yii2-s3client)
```

###  Alternatives

[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[grptx/yii2-firebase

Yii2 Component to connect to Firebase Database

1419.9k](/packages/grptx-yii2-firebase)

PHPackages © 2026

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