yapro / history-data
Installs: 968
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yapro/history-data
Requires
- php: >=7.4.0
- ext-pdo_sqlite: *
- yapro/helpers: *
Requires (Dev)
This package is not auto-updated.
Last update: 2025-10-16 02:34:12 UTC
README
Run tests:
vendor/bin/phpunit tests/Functional/
How to configure Symfony
Add to config/services.yaml
YaPro\Helper\: resource: '../vendor/yapro/helpers/src/*' YaPro\HistoryData\: resource: '../vendor/yapro/history-data/src/*' yapro.pdo.sqlite: class: YaPro\HistoryData\HistoryDataManager factory: ['YaPro\HistoryData\HistoryDataManager', 'getPdo'] arguments: ['%env(FILE_PATH_TO_SQLITE_DB)%',] YaPro\HistoryData\HistoryDataManager: arguments: ['@yapro.pdo.sqlite',]
File mydb.sq3 is ready for use.
But, if you want to have own sqlite db - make it:
sudo apt install sqlite3 sqlite3 mydb.sq3
Tip: https://www.sqlite.org/cli.html
And make the table in sqlite db:
create table history_data
(
createdAt INTEGER default CURRENT_TIMESTAMP not null,
ipAddress TEXT not null,
userAgent TEXT not null,
operationName TEXT not null,
entityName TEXT not null,
entityId TEXT not null,
jsonData TEXT not null
);
And don`t forgеt, almost every sqlite table has a hidden AUTOINCREMENT column rowid:
SELECT rowid, * FROM history_data