Docs / Outputs / In-memory

In-memory

Keep the entries in memory, for your tests.

Overview

PackageReadsPurgeSetup
-YesNoNo

The output keeps the entries of the current process only. Each new request starts with no entry. Do not use it in production. See Outputs.

Enable the output

Enable it in the test environment, and disable your other outputs:

config/packages/test/symfonycorp_audit_log.yaml
symfonycorp_audit_log:
    silent_failures: false
    outputs:
        dbal: false     # one line for each output of your main config
        in_memory: ~

The output has no option.

Assertions

AuditLogAssertionTrait reads this output to check the entries that your code creates. See Tests.