kicaj / revision
Revision plugin for CakePHP
Installs: 193
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- cakephp/cakephp: ^4.0
This package is auto-updated.
Last update: 2025-01-21 07:45:08 UTC
README
NOTE: It's still in development mode, do not use in production yet!
Requirements
It is developed for CakePHP 3.x.
Installation
You can install plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require kicaj/revision dev-master
Load the Behavior
Load the Behavior in your src/Model/Table/YourTable.php (or if You have AppTable.php). Your table should have two additionals columns: revision_id
and revision_hash
.
public function initialize(array $config)
{
parent::initialize($config);
$this->addBehavior('Revision.Revision');
}
The field revision_id
should have the same type like primary key of table.
TODOs
- Block updating
modified
field when highest parent is deleted - Check with complex conditions
- Check configuration
- Exceptions for missing fields/columns
- Create history view
- Revert method
- Field with hash should check unique before save (recurring)
- Set excluded fields