Skip to content

Installation

tilttek/journal-bundle

Requirements

  • PHP 8.5 or later, Symfony 8.2, Doctrine DBAL 4.6.
  • tilttek/journal, the journal itself, and tilttek/player-knowledge, whose secrets hide the blocks of an entry.
  • psr/event-dispatcher; FrameworkBundle provides the dispatcher.
  • Optional: doctrine/orm for the schema listener, phil/privacy-bundle for the export and the erasure of a member.

Enabling the bundle

composer require tilttek/journal-bundle
// config/bundles.php
return [
    // …
    Tilttek\JournalBundle\TilttekJournalBundle::class => ['all' => true],
];

Name the store of the campaigns' secrets (Configuration), then let Doctrine write the migration of the tables:

bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate

Without the ORM, create the tables from JournalTables::tables() in a migration of your own: it gives them for the platform of the connection, as The entries in the database describes.

The secrets of the campaigns

Journal reads each block for one reader through Tilttek\PlayerKnowledge\Knowledge. Either name the service that keeps the secrets, an implementation of Tilttek\PlayerKnowledge\Contract\KnowledgeStoreInterface, and the bundle defines Knowledge on it:

tilttek_journal:
    knowledge_store: App\Knowledge\DoctrineKnowledgeStore

or leave knowledge_store null and define Tilttek\PlayerKnowledge\Knowledge in the application's services, with the observer of its own events. The container refuses to compile when neither is done.