PHPackages                             cwbit/cakephp-revisions - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cwbit/cakephp-revisions

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

cwbit/cakephp-revisions
=======================

A revision-tracking plugin for CakePHP 3. Developed at CakeFest2015.

71.2k1[2 issues](https://github.com/cwbit/cakephp-revisions/issues)PHP

Since May 30Pushed 10y ago2 watchersCompare

[ Source](https://github.com/cwbit/cakephp-revisions)[ Packagist](https://packagist.org/packages/cwbit/cakephp-revisions)[ RSS](/packages/cwbit-cakephp-revisions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

cakephp-revisions
=================

[](#cakephp-revisions)

CakePHP Revisions plugin (CakeFest 2015)

A Plugin for CakePHP 3.x that allows you to track Revisions to Tables (at the entity level) in your Application

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

[](#requirements)

- [CakePHP 3.x](http://cakephp.org)

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

[](#installation)

*\[Using [Composer](http://getcomposer.org/)\]*

Add the plugin to your project's `composer.json` - something like this:

```
{
	"require": {
		"cwbit/cakephp-revisions": "dev-master"
	}
}

```

Because this plugin has the type `cakephp-plugin` set in it's own `composer.json` composer knows to install it inside your `/plugins` directory (rather than in the usual 'Vendor' folder). It is recommended that you add `/plugins/Revisions` to your cake app's .gitignore file. (Why? [read this](http://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).)

*\[Manual\]*

- Download and unzip the repo (see the download button somewhere on this git page)
- Copy the resulting folder into `plugins`
- Rename the folder you just copied to `Revisions`

*\[GIT Submodule\]*

In your `app` directory type:

```
git submodule add -b master git://github.com/cwbit/cakephp-revisions.git plugins/Revisions
git submodule init
git submodule update

```

*\[GIT Clone\]*

In your `plugins` directory type:

```
git clone -b master git://github.com/cwbit/cakephp-revisions.git Revisions

```

### Enable plugin

[](#enable-plugin)

In 3.0 you need to enable the plugin your `config/bootstrap.php` file:

```
    Plugin::load('Revisions');

```

If you are already using `Plugin::loadAll();`, then this is not necessary.

Usage
-----

[](#usage)

Add the Behavior to any Table you want to track versions of

1. [Track any/all Revisions](#basic-implementation)
2. [Explicity watch for changes to certain fields (whitelist)](#watched-implementation)
3. [Ignore changes made to certain fields (blacklist)](#ignored-implementation)

#### Basic Implementation

[](#basic-implementation)

The Basic Implementation will fire any time any field on the entity is modified.

```
	public function initialize(){
		parent::initialize();

		$this->addBehavior('Revisions.Revisions');
	}
```

#### WATCHed Implementation

[](#watched-implementation)

You can also explicitly tell the Plugin to only trigger version control if specific field(s) have been modified.

```
	public function initialize(){
		parent::initialize();

		$this->addBehavior('Revisions.Revisions', [
			'watch' => [
				'name', # trigger if,
				'foo',  # and only if,
				'bar'	# any of these fields are changed
				],
			]);
	}
```

#### IGNOREd Implementation

[](#ignored-implementation)

You can also explicitly tell the Plugin to ignore modifications to certain fields. The version control will only trigger if at least one other (non-ignored) field has been changed.

```
	public function initialize(){
		parent::initialize();

		$this->addBehavior('Revisions.Revisions', [
			'ignore' => [
				'bigBlob',  # only trigger if something
				'created',  # OTHER than these fields
				'modified', # was changed
				],
		]);
	}
```

### Adding Revision Review

[](#adding-revision-review)

The Plugin also comes with the ability to view all revisions and restore to any given point in time.

To enable this functionality, add and customize the following line in any view

```

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/474fb8a03f077a57b5421dcc5b93a8c30f16e0ecbf0f17a239e46a0ebd8ab5f7?d=identicon)[cwbit](/maintainers/cwbit)

---

Top Contributors

[![cwbit](https://avatars.githubusercontent.com/u/6501207?v=4)](https://github.com/cwbit "cwbit (20 commits)")

### Embed Badge

![Health badge](/badges/cwbit-cakephp-revisions/health.svg)

```
[![Health](https://phpackages.com/badges/cwbit-cakephp-revisions/health.svg)](https://phpackages.com/packages/cwbit-cakephp-revisions)
```

###  Alternatives

[arara/process

Provides a better API to work with processes on Unix-like systems

16861.7k2](/packages/arara-process)[ezsystems/ezautosave-ls

Content editing autosave extension for eZ Publish legacy

22423.2k3](/packages/ezsystems-ezautosave-ls)[copyleaks/php-plagiarism-checker

Copyleaks detects online plagiarism and checks content distribution. Use Copyleaks to find out if textual content is original and where it has been used before. This package shows how to integrate with the Copyleaks cloud to search for copyright infringement.

5066.4k](/packages/copyleaks-php-plagiarism-checker)[teknomavi/tcmb

T.C. Merkez Bankası üzerinden güncel döviz kurlarını çeker

7019.2k](/packages/teknomavi-tcmb)[silverstripe/multiform

SilverStripe forms with multiple steps, flow control and state persistence

3156.0k3](/packages/silverstripe-multiform)[kinglozzer/multiselectfield

A sortable multiple select field for managing many-to-many relations

1341.2k2](/packages/kinglozzer-multiselectfield)

PHPackages © 2026

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