Installation
tilttek/activity-bundleRequirements
- PHP 8.5 or later, Symfony 8.2 (Config and DependencyInjection), Doctrine DBAL 4.5.
tilttek/activity,phil/resourceandpsr/clock, required.- A
clockservice, which FrameworkBundle registers. - Optional:
doctrine/ormand DoctrineBundle for the tables in the migrations,symfony/consolefor the commands,phil/privacy-bundlefor the export and the erasure of a member.
Enabling the bundle
// config/bundles.php
return [
// ...
Tilttek\ActivityBundle\TilttekActivityBundle::class => ['all' => true],
];
With no configuration, the journal is kept on the default DBAL connection, every verb is accepted, and the
projections follow the journal as it is written.
The migration
When the ORM is installed, the bundle adds its two tables to the schema the ORM generates for the journal's connection:
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
Without the ORM, create the tables from ActivityTables::configure() in the application's own migration tool:
foreach ($platform->getCreateTablesSQL(ActivityTables::configure(new Schema())->getTables()) as $sql) {
$connection->executeStatement($sql);
}