dereuromark / cakephp-bouncer
CakePHP plugin for approval workflow - users propose changes, admins approve or reject before publishing
Package info
github.com/dereuromark/cakephp-bouncer
Type:cakephp-plugin
pkg:composer/dereuromark/cakephp-bouncer
Requires
- php: >=8.2
- ext-json: *
- cakephp/orm: ^5.0.0
- sebastian/diff: ^6.0 || ^7.0 || ^8.0 || ^9.0
Requires (Dev)
- cakephp/cakephp: ^5.1.0
- cakephp/migrations: ^4.0.0
- dereuromark/cakephp-templating: ^0.2.7
- php-collective/code-sniffer: dev-master as 0.4.6
- phpunit/phpunit: ^11.5.42 || ^12.4.0
Suggests
- dereuromark/cakephp-audit-stash: Integrates seamlessly to provide complete audit trail of approval workflow
- jfcherng/php-diff: For enhanced word-level diff rendering in BouncerHelper (falls back to sebastian/diff if not installed)
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-cake6
- dev-maintenance/cake6-template-escaping
- dev-maintenance/cake6-runtime
- dev-maintenance/released-subclass-contracts
- dev-ci/i18n-lint
- dev-maintenance/admin-authorization-redirect
- dev-maintenance/cake5-docs-cleanup
This package is auto-updated.
Last update: 2026-10-11 23:08:03 UTC
README
This branch is for CakePHP 5. See version map for details.
Approval workflow for CakePHP: users propose changes, admins/moderators review and approve or reject before the changes hit the live database. Built for content-management systems, user-generated content moderation, data-entry quality control, and multi-stage editorial workflows.
Features
- Drop-in approval workflow — single behavior on a Table turns saves into pending drafts; original record stays untouched until approved.
- Admin diff viewer — built-in UI for the queue with side-by-side and inline diffs (word-level via
jfcherng/php-diff), filters, status badges, and one-click approve / reject with reasons. - 3-way merge: proposals that became stale because the source record changed independently auto-merge non-overlapping edits; conflicts can keep the proposed value, so review the documented merge rules.
- Draft-safe re-edits — users editing the same record see and update their own pending draft instead of stacking duplicates; auto-supersede keeps the queue focused.
- Flexible bypass — exempt user lists, custom bypass callbacks, or per-save
bypassBouncerflag — integrate with policies, roles, or admin tooling. - Pairs with AuditStash — Bouncer logs the approval workflow; cakephp-audit-stash logs the data changes the approvals apply.
- Transaction-safe — atomic apply on approval; failures roll back cleanly and leave the queue intact.
Reverts are out of scope. Bouncer is the gate before changes ship. To roll a record back after it shipped, use AuditStash's Revert / Restore feature.
Documentation
Full docs: https://dereuromark.github.io/cakephp-bouncer/
- Installation
- Getting Started: behavior setup, controller wiring, proposal review
- Configuration — behavior options and
Bouncer.*app config - Usage — controller patterns, draft re-edit, programmatic approval
- View Helper — render proposals in your own templates
- Features overview — admin UI, approval workflow, 3-way merge, advanced patterns, AuditStash integration
Demo
https://sandbox.dereuromark.de/sandbox/bouncer-examples
Contributing
See CONTRIBUTING.md.