PHPackages                             ginkelsoft/laravel-compliance-core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ginkelsoft/laravel-compliance-core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ginkelsoft/laravel-compliance-core
==================================

Shared foundation for the GinkelSoft GDPR/AVG compliance family: tamper-evident hash chain, anonymize strategies, subject hashing, and shared configuration.

v1.0.0(1mo ago)00[5 issues](https://github.com/ginkelsoft-development/laravel-compliance-core/issues)5MITPHPPHP ^8.2CI passing

Since May 28Pushed 1mo agoCompare

[ Source](https://github.com/ginkelsoft-development/laravel-compliance-core)[ Packagist](https://packagist.org/packages/ginkelsoft/laravel-compliance-core)[ RSS](/packages/ginkelsoft-laravel-compliance-core/feed)WikiDiscussions development Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (3)Used By (5)

Ginkelsoft Laravel Compliance Core
==================================

[](#ginkelsoft-laravel-compliance-core)

[![Tests](https://github.com/ginkelsoft-development/laravel-compliance-core/actions/workflows/tests.yml/badge.svg?branch=development)](https://github.com/ginkelsoft-development/laravel-compliance-core/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Laravel](https://camo.githubusercontent.com/255077649ac4ed79e446c4d860d1c53c9764b8ff855456caeb401faf7d250205/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302d2d31332d627269676874677265656e3f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/482d9c7691869be159b0bd042060a220a12a89396d63fa223c22b74affaf42c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532302d2d253230382e352d626c75653f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net)[![PHPStan](https://camo.githubusercontent.com/fa63e0381a93ba9755a46ec197198ef973137dca1643836d06b3d6263c9aa7c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c2532306d61782d627269676874677265656e3f7374796c653d666c61742d737175617265)](phpstan.neon.dist)

Overview
--------

[](#overview)

Shared foundation for the GinkelSoft GDPR / AVG compliance family. This package contains zero AVG controls of its own — it only provides the primitives that every member of the family relies on:

- A deterministic, tamper-evident SHA-256 **hash chain** (`HashChain`).
- A one-way **subject hash** so audit logs can prove "this subject" without storing the identifier (`SubjectHash`).
- The **anonymize strategies** (`null`, `hash`, `placeholder`) and their resolver, shared across every package that anonymizes (`AnonymizeStrategy`, `StrategyResolver`, `NullStrategy`, `HashStrategy`, `PlaceholderStrategy`).
- A single **shared config** with one `log_secret` that signs every chain in the family (`config/compliance.php`).
- BC fallbacks (`LogSecret`, `PlaceholderConfig`) so installations upgrading from the monolithic v1.x `ginkelsoft/laravel-data-retention` package keep verifying their existing chains without renaming env vars.

The family
----------

[](#the-family)

PackageGDPR Article(s)Role[`laravel-compliance-core`](https://github.com/ginkelsoft-development/laravel-compliance-core)art. 5(2) (accountability)Shared primitives — this package[`laravel-data-retention`](https://github.com/ginkelsoft-development/laravel-data-retention)art. 5(1)(e)Storage limitation / time-based sweeps[`laravel-data-right-to-be-forgotten`](https://github.com/ginkelsoft-development/laravel-data-right-to-be-forgotten)art. 17Subject-driven erasure[`laravel-data-subject-access`](https://github.com/ginkelsoft-development/laravel-data-subject-access)art. 15 + 20Read-only subject export (inzageverzoek)[`laravel-data-consent`](https://github.com/ginkelsoft-development/laravel-data-consent)art. 6(1)(a) + 7Consent registry[`laravel-data-breach-registry`](https://github.com/ginkelsoft-development/laravel-data-breach-registry)art. 33 + 34Personal-data breach register, 72-hour deadlines[`laravel-compliance-hub`](https://github.com/ginkelsoft-development/laravel-compliance-hub)art. 5(2)Umbrella: installs the whole family, verifies every chainInstall just the hub to get everything.

Installation
------------

[](#installation)

You do not normally install this package directly — install one of the family members, or the hub, and Composer pulls it in.

For development / direct use:

```
composer require ginkelsoft/laravel-compliance-core
php artisan vendor:publish --tag=compliance-config
```

Then add a secret to `.env`:

```
COMPLIANCE_LOG_SECRET="$(openssl rand -base64 32)"
```

Existing installations of `ginkelsoft/laravel-data-retention` v1.x can keep their `DATA_RETENTION_LOG_SECRET` — the `LogSecret` helper reads it as a fallback so existing hash chains keep verifying after the upgrade.

Hash algorithm contract
-----------------------

[](#hash-algorithm-contract)

The hash algorithms in this package are **frozen**. Changing them would break every already-written audit log on every production database that uses the family. They are version-locked, not implementation details.

**Chained log entry hash:**

```
normalized = ksort + ATOM-format any DateTimeInterface values
serialized = json_encode(normalized, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
hash       = sha256(previousHash + '|' + serialized + '|' + secret)

```

**Subject hash:**

```
sha256('subject|' + subjectId + '|' + secret)

```

**Hash-strategy output (per field, anonymize-time):**

```
sha256(model::class + '|' + field + '|' + stringValue + '|' + secret)

```

A regression test (`tests/Unit/HashChainRegressionTest.php`) pins three end-to-end fixture hashes plus two subject hashes from the v1.x monolithic `laravel-data-retention` package. If any of those fail, an upgrade would break existing production chains and the change must be treated as a major version bump with a documented chain rotation procedure.

Security model
--------------

[](#security-model)

ThreatMitigationRetroactive edit of a log rowEvery row's hash depends on the previous row's hash + the shared secret. Editing a row invalidates every later row, in every chain.Forged row inserted by an attacker without `log_secret`The forged row cannot produce a hash that chains with both its neighbors.Leaking subject identifier from a log`SubjectHash` is one-way and secret-mixed; the original identifier never appears in the forget / access logs (consent\_log is the documented exception).Secret stored next to the data it protects`log_secret` lives in `.env`, not the database — read access to the DB does not let the attacker forge a chain.Compliance notes
----------------

[](#compliance-notes)

- **GDPR art. 5(2)** — Accountability. The hash chain is the evidence; this package is what produces it.

This package is **not legal advice**. Retention periods, consent texts, severity assessments and DPIA judgements are the responsibility of your DPO.

Testing
-------

[](#testing)

```
composer install
vendor/bin/pest
vendor/bin/phpstan analyse --memory-limit=1G
vendor/bin/pint --test
```

See also
--------

[](#see-also)

- [`UPGRADE.md`](UPGRADE.md) — migrating from `laravel-data-retention` v1.x to the family.
- The family packages listed at the top of this README.

Reporting bugs
--------------

[](#reporting-bugs)

Found a bug or unexpected behaviour? We want to hear about it.

**Preferred — open a GitHub issue:**

When opening an issue, please include:

1. **Versions** — PHP, Laravel, and the package version (`composer show ginkelsoft/laravel-compliance-core`).
2. **What you did** — the artisan command, code snippet, or steps that triggered the bug.
3. **What you expected** vs **what actually happened** — include full error output or a stack trace if there is one.
4. **A minimal reproduction** if you can — a failing test or a small code sample beats a long description.

**Security-sensitive findings** (anything that could expose personal data, break a hash-chain, or bypass an audit log) — please **do not**open a public issue. E-mail **** directly with "SECURITY" in the subject line and we will respond privately.

**Not on GitHub?** You can also e-mail **** with the same information.

Contact
-------

[](#contact)

For commercial support, integration questions, or anything that doesn't fit a GitHub issue: **** — .

License
-------

[](#license)

MIT License — see [LICENSE](LICENSE). (c) 2026 Ginkelsoft

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

58d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/165766253?v=4)[ginkelsoft](/maintainers/ginkelsoft)[@GinkelSoft](https://github.com/GinkelSoft)

---

Top Contributors

[![ginkelsoft-development](https://avatars.githubusercontent.com/u/179240029?v=4)](https://github.com/ginkelsoft-development "ginkelsoft-development (3 commits)")

---

Tags

laravelhash-chaingdprcomplianceanonymizeavgginkelsofttamper-evident

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ginkelsoft-laravel-compliance-core/health.svg)

```
[![Health](https://phpackages.com/badges/ginkelsoft-laravel-compliance-core/health.svg)](https://phpackages.com/packages/ginkelsoft-laravel-compliance-core)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k30.2M151](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[flarum/core

Delightfully simple forum software.

211.4M2.4k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
