yharahuts / php-followthemoney
PHP library to work with Follow the Money entities
v1.2.2
2023-11-21 02:30 UTC
Requires
- php: >=8.0
- ext-json: *
- ext-yaml: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~3.13
- phpunit/phpunit: ^9.5.10
- tareq1988/wp-php-cs-fixer: dev-master
- vimeo/psalm: 5.x-dev
- yharahuts/space-inside-array-braces-fixer: dev-master
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-29 21:57:37 UTC
README
Little lib to handle FollowTheMoney data format.
Methods and interfaces probably will be rewritten at some time.
Demo
Pack statements to model:
cat demo/statements.jsonl | docker compose run --rm -T php-cli php demo/statements-to-model.php
Unpack model to statements:
cat demo/model.json | docker compose run --rm -T php-cli php demo/model-to-statements.php
Benchmark
Random sample of 1M entities from a FtM dump:
docker compose run --rm php-cli shuf -n 1000000 -o ingest/sample-1m.ftm.json ingest/opensanctions-ru_egrul-entities.ftm.json
Time of EntitySchema::fromArray(), unpack and pack per entity (schema dir is optional, defaults to the submodule):
docker compose run --rm php-cli php -d pcov.enabled=0 benchmark/statements.php ingest/sample-1m.ftm.json [schema dir]