Skip to content

Releases

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 07 Nov 20:13

Fixed

  • The Inertia prop went missing again under Pest's in-process browser server. 0.1.1
    pushed ShareInertiaProps onto the router's web group. In a Laravel 11+ app the HTTP
    kernel owns the groups, and its syncMiddlewareToRouter() 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's appendMiddlewareToGroup()
    when the kernel has a web group, 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 declaring ShareInertiaProps in
    bootstrap/app.php, you can keep it or remove it.

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 07 Nov 19:53

Fixed

  • The Inertia prop is shared on every request, so Octane keeps it. The provider shared
    fancyCompliance once, in boot(). Inertia's ResponseFactory is 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
    useConsentController threw on undefined.routes. A new middleware,
    FancyCompliance\Http\ShareInertiaProps, now shares it per request and is pushed onto
    the web group. The boot-time share stays for routes outside web on a classic server.
    Nothing to do unless your Inertia pages live outside the web group and you run
    Octane: then add ShareInertiaProps::class to that group. inertia.share and
    inertia.key work as before.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 07:29

Added

  • Consent categories from config. Keys, label and description translation keys, and
    purposes. necessary is 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(), the ConsentGate contract, the
    consent:<category>[,drop] middleware and the @consent Blade block. Unknown
    categories fail closed.
  • Props for the UI, shared with Inertia as fancyCompliance when Inertia is installed,
    printed by @fancyComplianceProps on Blade pages, and served by
    GET /fancy-compliance/consent. POST /fancy-compliance/consent and
    POST /fancy-compliance/consent/withdraw record and withdraw, in the host's web group.
    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/framework is 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.