setono/consent-contracts
Framework-agnostic PHP contracts for consent management. setono/consent-contracts defines the interfaces your app and third-party consent providers implement, keeping cookie and GDPR consent logic decoupled, testable, and easy to swap between implementations.
Architecture fit: This is a contracts-only package — interfaces, enums, and possibly small value objects describing consent (categories/purposes, vendors, consent state) with no runtime implementation. That makes it a natural anti-corruption layer between Laravel application code and a CMP (Cookiebot, OneTrust, Usercentrics, Axeptio, etc.). Application code depends on the contracts; an adapter per CMP satisfies them. No framework coupling, no service provider required unless we author one to bind implementations into the container.
Integration feasibility: High, but v1.1.0 is a vocabulary release, not a feature release. "Changes some wording to match mainstream CMP platforms" means public identifiers — interface names, method names, enum cases, constants, maybe array keys — were likely renamed or added alongside aliases. Feasibility hinges on whether those renames are additive (new names + deprecated aliases) or hard renames. A minor bump signals BC intent, but in PHP an interface or method rename is breaking for every implementer regardless of semver.
Technical risk: Low blast radius (no runtime code, no I/O, no dependencies of consequence), moderate ecosystem risk. Risk concentrates in three places: (1) upgrade-time renames rippling across implementers, (2) persisted or serialized consent payloads where category/purpose strings are stored — a rename can silently orphan audit records, and (3) supply-chain/vendor maturity: small maintainer base, thin changelog, wording churn suggesting the domain model is not yet settled.
Key questions:
Caveat: the release notes are a single sentence; this assessment assumes the package's contracts-only scope and should be re-validated against the actual diff.
Stack fit: Composer package, installs cleanly alongside Laravel 10–12. It slots in as a set of container-resolvable contracts: bind concrete adapters in a ConsentServiceProvider, inject the interfaces, keep CMP SDK types out of domain code. No middleware, config, or migration footprint.
Migration path: Treat v1.1.0 as a vocabulary migration, not a version upgrade.
composer.lock and freeze the current integration.Compatibility: Check whether renames are aliased. If yes, adopt the new names now, keep implementing/consuming only through our own internal interface, and delete alias reliance at the next major. If renames are hard in a minor release, pin v1.0.0 and raise the semver concern upstream before adopting. Confirm PHP constraint compatibility with the oldest runtime in the fleet.
Sequencing: Inventory → adapter renames + persisted-data mapping → test updates → rollout behind a flag with consent-record reconciliation → adopt in new code only after a subsequent release confirms naming stability. Do not adopt mid-sprint on a compliance-sensitive path.
Maintenance: Near-zero runtime upkeep, non-trivial upgrade upkeep. Every wording release becomes a codebase-wide rename for implementers. Mitigate by wrapping the package behind one internal interface so upstream vocabulary changes stop at a single file. Budget a small recurring cost per minor release rather than a one-off.
Support: Tiny vendor, no SLA, changelog-as-documentation. Support burden lands on our team; capture upstream naming intent and rationale in an internal vocabulary doc so future upgrades aren't archaeological.
Scaling: No scaling impact — no runtime footprint beyond autoload. Scales with the number of consuming services and repos, not with traffic. The fan-out cost of a rename grows linearly with adoption; centralizing behind an internal contract keeps that flat.
Failure modes:
Ramp-up: Low — an engineer reads the contracts in under an hour. The real ramp-up is domain knowledge: mapping our consent purposes to the CMP's categories and understanding audit requirements. Onboarding should center on the vocabulary mapping doc and the adapter boundary, not the package itself.
How can I help you explore Laravel packages today?