Skip to content

Add governance, REST API and typed settings (phases 4 and 5) - #10

Merged
imanimanyara merged 4 commits into
mainfrom
feat/phase-4-governance
Nov 10, 2026
Merged

imanimanyara merged 4 commits into
mainfrom
feat/phase-4-governance

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Summary

Phase 4 and Phase 5 of the settings design (Amendment A, §16), built as one branch:

  • 4a: service classes moved to src/Services/ (old names kept via class_alias, deprecated until 1.0, recorded in the audit), value history with history(), rollback() and historyDiff(), 11 events, built-in listeners, and alert notifications that never carry values.
  • 4b: approval workflow (settings_change_requests behind the approvals.table schema switch, stale-request detection, min approvals, expiry), export/import/diff by slug and identity, importers for spatie, toolkit and akaunting, reencrypt, rescope, a fuller doctor, and opt-in persisted configuration.
  • 4c: the REST API, off by default: 39 routes under api/settings/v1, ETag/If-Match (412), 202 for approvals, idempotency keys, cursor pagination, RFC 9457 problem details, and an OpenAPI 3.1 document checked against real responses.
  • 5: typed settings classes (load/save/register, attributes) and settings migrations.

Behaviour changes

  • On stores that can hold change requests, writes to settings that need approval now open a request instead of throwing.
  • SetSetting, ForgetSetting, LockSetting and UnlockSetting return the opened change request, or null.
  • The Settings contract gains seven methods. Nothing is tagged yet.

Verification (local)

  • Pest: 646 passed; coverage 96.8 %
  • PHPStan max: no errors; Rector and Pint clean; composer audit clean
  • Full schema matrix: 4,609 passed

… alerts (phase 4a)

Move every service class into Services\ (19 classes, old names kept through
class_alias until 1.0). Add settings_history behind the history.enabled schema
switch, written in each change's transaction, with history(), rollback() and
historyDiff() on the Settings contract and the laranail::settings.history and
prune-history commands. Add lock, rollback, category, maintenance and refusal
events, the built-in alert and log listeners, and rule-based, throttled alerts
through Laravel notifications that never carry a value.
Copilot AI balanced review requested due to automatic review settings November 10, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@imanimanyara
imanimanyara merged commit 0fa0903 into main Nov 10, 2026
15 checks passed
@imanimanyara
imanimanyara deleted the feat/phase-4-governance branch November 11, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants