A guide to using auditor-bundle.
auditor
provides a convenient command that helps you cleaning audit tables.
Open a command console, enter your project directory and execute:
# symfony < 3.4
app/console audit:clean
# symfony >= 3.4
bin/console audit:clean
By default it cleans audit entries older than 12 months. You can override this by providing the number of months you want to keep in the audit tables. For example, to keep 18 months:
# symfony < 3.4
app/console audit:clean 18
# symfony >= 3.4
bin/console audit:clean 18
It is also possible to bypass the confirmation and make the command non-interactive if you plan to schedule it (ie. cron)
# symfony < 3.4
app/console audit:clean --no-confirm
# symfony >= 3.4
bin/console audit:clean --no-confirm