PHPackages                             maddoger/yii2-filebehavior - 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. maddoger/yii2-filebehavior

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

maddoger/yii2-filebehavior
==========================

File behavior for Yii2.

v1.1.2(10y ago)01.4k13PHP

Since Mar 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/maddoger/yii2-filebehavior)[ Packagist](https://packagist.org/packages/maddoger/yii2-filebehavior)[ Docs](https://github.com/maddoger/yii2-filebehavior)[ RSS](/packages/maddoger-yii2-filebehavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (6)Used By (3)

yii2-filebehavior
=================

[](#yii2-filebehavior)

File field behavior for Yii 2

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist maddoger/yii2-filebehavior "*"

```

or add

```
"maddoger/yii2-filebehavior": "*"

```

to the require section of your `composer.json` file.

In model behaviors:

```
[
    'class' => 'maddoger\filebehavior\FileBehavior',
    'attribute' => 'file_attribute',
    'deleteAttribute' => 'deleteFile',
    'fileName' => function ($model, $file, $index) {
        return md5($file->name).'.'.$file->extension;
    },
    'basePath' => '@webapp/uploads/files',
    'baseUrl' => '@web/uploads/files',
    'overwriteFile' => false,
],
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~92 days

Total

5

Last Release

3693d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09bde1fb9f0bb0ef7e7b4e6d7d1e346b2c2f1b076bd757ef85722abb37a98000?d=identicon)[maddoger](/maintainers/maddoger)

---

Top Contributors

[![maddoger](https://avatars.githubusercontent.com/u/6214206?v=4)](https://github.com/maddoger "maddoger (8 commits)")

### Embed Badge

![Health badge](/badges/maddoger-yii2-filebehavior/health.svg)

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

###  Alternatives

[mihaildev/yii2-elfinder

Yii2 ElFinder

169658.8k52](/packages/mihaildev-yii2-elfinder)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)

PHPackages © 2026

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