Repository navigation
Releases
Releases · Particle-Academy/fancy-compliance
v0.1.2
Fixed
- The Inertia prop went missing again under Pest's in-process browser server. 0.1.1
pushedShareInertiaPropsonto the router'swebgroup. In a Laravel 11+ app the HTTP
kernel owns the groups, and itssyncMiddlewareToRouter()rewrites the router's groups
from its own, so the next sync dropped the middleware and the prop was absent from the
second request on. The provider now adds it with the kernel'sappendMiddlewareToGroup()
when the kernel has awebgroup, and falls back to the router otherwise. The kernel
skips a middleware the group already has, so a host that also declares it gets one entry.
Consumer action: none. If you worked around 0.1.1 by declaringShareInertiaPropsin
bootstrap/app.php, you can keep it or remove it.
v0.1.1
Fixed
- The Inertia prop is shared on every request, so Octane keeps it. The provider shared
fancyComplianceonce, inboot(). Inertia'sResponseFactoryis a singleton, and
long-lived servers (Octane, an in-process Pest browser server) flush its shared props
between requests, so from the second request the client got no prop and
useConsentControllerthrew onundefined.routes. A new middleware,
FancyCompliance\Http\ShareInertiaProps, now shares it per request and is pushed onto
thewebgroup. The boot-time share stays for routes outsidewebon a classic server.
Nothing to do unless your Inertia pages live outside thewebgroup and you run
Octane: then addShareInertiaProps::classto that group.inertia.shareand
inertia.keywork as before.
v0.1.0
Added
- Consent categories from config. Keys, label and description translation keys, and
purposes.necessaryis always present and always required, whatever the config says.
English text ships for the defaults (necessary,analytics,marketing). - An append-only consent ledger (
fancy_compliance_consents): one row per decision,
withdrawal or login link, with the subject (user id, or the SHA-256 of a random guest
token), granted and refused categories, policy version, source and time. The model
refuses updates and deletes. No IP address or user agent is stored. - Guests are identified by a random token in an HttpOnly first-party cookie, set only
after their first decision. On login, a guest's decision is appended to the user unless
the user has a newer one. - Re-consent on a new
policy_version. - The server gate:
Consent::allows(), theConsentGatecontract, the
consent:<category>[,drop]middleware and the@consentBlade block. Unknown
categories fail closed. - Props for the UI, shared with Inertia as
fancyCompliancewhen Inertia is installed,
printed by@fancyCompliancePropson Blade pages, and served by
GET /fancy-compliance/consent.POST /fancy-compliance/consentand
POST /fancy-compliance/consent/withdrawrecord and withdraw, in the host'swebgroup.
Input is bounded and validated against the configured categories. fancy-compliance:prune, off by default: ledger rows are kept because they are the
evidence of consent. Never removes a subject's latest row.- Tests: Pest 5 on a hand-built Laravel 13 kernel, no testbench.
laravel/frameworkis a
dev dependency under the estate's carve-out for the framework a package integrates with.
Consumer action: new package. Install, migrate, and add a throttle to
fancy-compliance.routes.middleware; rate limiting is the host's.