PHPackages                             digisin/yii2-softdelete - 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. [Framework](/categories/framework)
4. /
5. digisin/yii2-softdelete

ActiveYii2-behavior[Framework](/categories/framework)

digisin/yii2-softdelete
=======================

Soft delete behavior for Yii2.

1.1.0(9y ago)075BSD-3-ClausePHP

Since Jun 20Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (6)Used By (0)

Yii2 Soft Delete
================

[](#yii2-soft-delete)

Soft delete behavior for Yii2.

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

[](#installation)

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

Either run

```
$ composer require digisin/yii2-softdelete "*"

```

or add

```
"digisin/yii2-softdelete": "*"

```

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

Usage
-----

[](#usage)

In your ActiveRecord class:

```
public function behaviors() {
    return [
        \digisin\softdelete\SoftDeleteBehavior::className(),
        // or
        [
            'class' => \digisin\softdelete\SoftDeleteBehavior::className(),
            'attribute' => 'deleted_time',
            'value' => new \yii\db\Expression('NOW()'), // for sqlite use - new \yii\db\Expression("date('now')")
        ],
    ];
}
```

In your ActiveQuery class:

```
public function behaviors() {
    return [
        \digisin\softdelete\SoftDeleteQueryBehavior::className(),
        // or
        [
            'class' => \digisin\softdelete\SoftDeleteQueryBehavior::className(),
            'attribute' => 'deleted_time',
        ],
    ];
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~158 days

Total

5

Last Release

3395d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2979466?v=4)[Nicola](/maintainers/nonzod)[@nonzod](https://github.com/nonzod)

---

Top Contributors

[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (44 commits)")[![davidjeddy](https://avatars.githubusercontent.com/u/6232455?v=4)](https://github.com/davidjeddy "davidjeddy (1 commits)")[![elvenpath](https://avatars.githubusercontent.com/u/1319068?v=4)](https://github.com/elvenpath "elvenpath (1 commits)")

---

Tags

yii2soft-delete

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digisin-yii2-softdelete/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[yiisoft/yii2-app-advanced

Yii 2 Advanced Project Template

1.7k960.6k5](/packages/yiisoft-yii2-app-advanced)[yiisoft/yii2-redis

Redis Cache, Session and ActiveRecord for the Yii framework

44912.1M264](/packages/yiisoft-yii2-redis)[yiisoft/yii2-httpclient

HTTP client extension for the Yii framework

43011.4M323](/packages/yiisoft-yii2-httpclient)[yiisoft/yii2-debug

The debugger extension for the Yii framework

20324.2M616](/packages/yiisoft-yii2-debug)[yiisoft/yii2-app-basic

Yii 2 Basic Project Template

6761.8M8](/packages/yiisoft-yii2-app-basic)

PHPackages © 2026

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