matiux / broadway-sensitive-serializer
Serializer implementation with support for data sensitization
Requires
- php: ^7.4|^8
- ext-json: *
- ext-openssl: *
- adbario/php-dot-notation: ^3.1
- ramsey/uuid: ^4.2
- symfony/polyfill-php81: ^1.24
Requires (Dev)
- bmitch/churn-php: ^1.5
- broadway/broadway: ^2.4
- friendsofphp/php-cs-fixer: ^3.5
- matiux/php-project-autopilot: dev-master
- mockery/mockery: ^1.5
- phpunit/phpunit: ^9.5
- psalm/plugin-mockery: ^1.0
- psalm/plugin-phpunit: ^0.19
- roave/security-advisories: dev-latest
- symfony/var-dumper: ^5.3|^6.0
- vimeo/psalm: ^5.0
Suggests
- broadway/broadway-bundle: Symfony bundle for broadway/broadway
- broadway/event-store-dbal: Event store implementation using doctrine/dbal
- dev-master
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.3.1
- v0.3.0
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.23
- v0.1.22
- v0.1.21
- v0.1.20
- v0.1.19
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-develop
- dev-feature/infection
This package is auto-updated.
Last update: 2024-11-29 12:44:16 UTC
README
The idea behind this project is to make a CQRS+ES system compliant, specifically implemented through the Broadway library, with the General Data Protection Regulation (GDPR), in particular with the right to be forgotten.
Normal Broadway event payload
{ "class": "SensitiveUser\\User\\Domain\\Event\\UserRegistered", "payload": { "id": "b0fce205-d816-46ac-886f-06de19236750", "name": "Matteo", "surname": "Galacci", "email": "m.galacci@gmail.com", "occurred_at": "2022-01-08T14:22:38.065+00:00" } }
Example of a payload with the extension active
{ "class": "SensitiveUser\\User\\Domain\\Event\\UserRegistered", "payload": { "id": "b0fce205-d816-46ac-886f-06de19236750", "name": "Matteo", "surname": "#-#2Iuofg4NKKPLAG2kdJrbmQ==:bxQo+zXfjUgrD0jHuht0mQ==", "email": "#-#OFLfN9XDKtWrmCmUb6mhY0Iz2V6wtam0pcqs6vDJFRU=:bxQo+zXfjUgrD0jHuht0mQ==", "occurred_at": "2022-01-08T14:22:38.065+00:00" } }
The symfony bundle exists to simplify integration with the framework here
Read the doc for more information.
Install
composer require matiux/broadway-sensitive-serializer
Setup for development
git clone https://github.com/matiux/broadway-sensitive-serializer.git && cd broadway-sensitive-serializer cp docker/docker-compose.override.dist.yml docker/docker-compose.override.yml rm -rf .git/hooks && ln -s ../scripts/git-hooks .git/hooks
This repository uses GitHub actions to perform some checks. If you want to test the actions locally you can use act. For example if you want to check the action for static analysis
act -P ubuntu-latest=shivammathur/node:latest --job static-analysis
Interact with the PHP container
You can interact with the PHP container through the makefile
Some uses:
make upd
make enter
make phpunit
make psalm
make coding-standard-fix-staged
make build-php ARG="--no-cache"
make build-docs
Check out here for all the options.
Install dependencies to run test or execute examples
make build-php ARG="--no-cache" make upd make composer ARG="install"
Run test
make build-php ARG="--no-cache"
make upd
make phpunit
Example code
Read the examples section