PHPackages                             fusic/reincarnation - 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. fusic/reincarnation

ActiveCakephp-plugin

fusic/reincarnation
===================

CakePHP Reincarnation

3.0.0(2y ago)3169.6k↓38.5%3[1 issues](https://github.com/fusic/Reincarnation/issues)MITPHPPHP &gt;=8.1.0

Since Feb 16Pushed 2y ago14 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (18)Used By (0)

Reincarnation
=============

[](#reincarnation)

Description
-----------

[](#description)

Soft delete plugin for CakePHP 5.x.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1.\*
- CakePHP &gt;= 5.\*

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

[](#installation)

```
$ composer install

```

Usage
=====

[](#usage)

Create users table.

```
CREATE TABLE users
(
  id serial NOT NULL,
  username text,
  password text,
  created timestamp without time zone,
  modified timestamp without time zone,
  delete_flg boolean DEFAULT false,
  deleted timestamp with time zone,
  CONSTRAINT users_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
```

UsersTable.php

```
class UsersTable extends Table
{
    public function initialize(array $config)
    {
        // Case 1
        // default
        //   table field name
        //     boolean:deleted
        //     timestamp:delete_date
        $this->addBehavior('Reincarnation.SoftDelete');

        // Case 2
        // field name custom
        //   table field name
        //     boolean:delete_flg
        //     timestamp:deleted
        $this->addBehavior('Reincarnation.SoftDelete', ['boolean' => 'delete_flg', 'timestamp' => 'deleted']);

        // Case 3
        // boolean only
        //   table field name
        //     boolean:delete_flg
        //     timestamp:none
        $this->addBehavior('Reincarnation.SoftDelete', ['boolean' => 'delete_flg', 'timestamp' => false]);

        // Case 4
        // timestamp only
        //   table field name
        //     boolean:none
        //     timestamp:deleted
        $this->addBehavior('Reincarnation.SoftDelete', ['boolean' => false, 'timestamp' => 'deleted']);
    }
}
```

UsersController.php

```
class UsersController extends AppController
{
    public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $user = $this->Users->get($id);
        if ($this->Users->softDelete($user)) {
        //第二引数がtrueの場合、Entityのassociate先もあわせて削除します
        //if ($this->Users->softDelete($user, true)) {
            $this->Flash->success(__('The data has been deleted.'));
        } else {
            $this->Flash->error(__('The data could not be deleted. Please, try again.'));
        }
        return $this->redirect('action' => 'index');
    }
}
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~162 days

Total

17

Last Release

917d ago

Major Versions

1.2.0 → 2.0.02020-03-26

1.2.1 → 2.0.22021-12-10

1.x-dev → 2.0.32022-08-09

2.x-dev → 3.0.02023-11-14

PHP version history (2 changes)2.0.0PHP &gt;=7.2.0

3.0.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/652f68b858e7c4e520b8b1982d9aae9548627c9a1ea87d10f59d6dbf070ac9b9?d=identicon)[fusic](/maintainers/fusic)

---

Top Contributors

[![tsukabo](https://avatars.githubusercontent.com/u/2483308?v=4)](https://github.com/tsukabo "tsukabo (34 commits)")[![satthi](https://avatars.githubusercontent.com/u/738095?v=4)](https://github.com/satthi "satthi (32 commits)")[![kozo](https://avatars.githubusercontent.com/u/285535?v=4)](https://github.com/kozo "kozo (3 commits)")[![k1LoW](https://avatars.githubusercontent.com/u/57114?v=4)](https://github.com/k1LoW "k1LoW (1 commits)")[![tutida](https://avatars.githubusercontent.com/u/9247486?v=4)](https://github.com/tutida "tutida (1 commits)")

---

Tags

cakephpsoft-delete

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fusic-reincarnation/health.svg)

```
[![Health](https://phpackages.com/badges/fusic-reincarnation/health.svg)](https://phpackages.com/packages/fusic-reincarnation)
```

###  Alternatives

[cakephp/bake

Bake plugin for CakePHP

11211.2M158](/packages/cakephp-bake)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308850.3k14](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M27](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)[cakephp/queue

Queue plugin for CakePHP

36257.9k12](/packages/cakephp-queue)

PHPackages © 2026

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