aichadigital/lara-privacy-core
Composer 安装命令:
composer require aichadigital/lara-privacy-core
包简介
Dependency-free GDPR core for lara-privacy: the LegallyRetainable contract and a pure legal-hold decision (no Eloquent, no side effects, no jurisdiction).
README 文档
README
The dependency-free, framework-free core of
lara-privacy: a universal
contract for legal data-retention obligations and a pure decision over it.
No Eloquent, no side effects, no jurisdiction, no domain assumptions. A domain package (billing, medical, HR…) implements the contract; the privacy layer reads it to decide whether a record may be touched.
Governing rule: lara-privacy defines privacy contracts. Domain packages implement them. No domain package — and no jurisdiction — defines the shape of the core.
Install
composer require aichadigital/lara-privacy-core
Requires PHP 8.3+. That is the only requirement — there are no runtime dependencies.
What it ships
Contracts\LegallyRetainable— one method,retainedUntil(): ?DateTimeInterface: the instant until which an object must be kept, ornullwhen it carries no retention obligation.CheckLegalHold— a pure, clock-injected decision: is a subject under an active retention hold at a given$now? (retainedUntil > now).
Quick example
use AichaDigital\LaraPrivacyCore\Contracts\LegallyRetainable; use AichaDigital\LaraPrivacyCore\CheckLegalHold; use DateTimeImmutable; use DateTimeInterface; final class AccountingDocument implements LegallyRetainable { public function __construct( private readonly ?DateTimeImmutable $fiscalYearEnd, // null = not booked private readonly int $years, ) {} public function retainedUntil(): ?DateTimeInterface { return $this->fiscalYearEnd?->modify("+{$this->years} years"); } } $held = (new CheckLegalHold)->isUnderRetention($document, new DateTimeImmutable);
Documentation
- Implementing
LegallyRetainable— the contract, three neutral domain examples, and what does not belong in it.
The Laravel integration (the read-only hold gate, jurisdictional retention
presets, and worked adapters) lives in the
aichadigital/lara-privacy
package.
License
MIT. See LICENSE.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-21