Releases: DamienHarper/auditor-bundle
Releases · DamienHarper/auditor-bundle
3.2.2
What's Changed
- Fixed documentation related to
@Security
annotation by @jean-gui in #135 - Fixed pagination when the pager has a lot of pages by @DamienHarper in #137
New Contributors
References
Full Changelog: 3.2.1...3.2.2
3.2.1
What's changed
- Restored
AuditReader::getAuditsCount()
which was removed by error in3.2.0
by @DamienHarper in 6bfc118
References
Full Changelog: 3.2.0...3.2.1
3.2.0
What's Changed
- Symfony 5 support by @DamienHarper in #134
- Ensures DoctrineSubscriber is registered first (fixes audit not capturing some entity mutation coming from other Doctrine linteners/subscribers) by @DamienHarper in #130
References
Full Changelog: 3.1.0...3.2.0
3.1.0
What's Changed
- Fix table layout for long data in the timeline by @Jonathan-Lathiere in #121
- Fix Doctrine deprecations by @DamienHarper in #125
- Allow to filter audits using multiple filter values in
AuditReader::filterBy()
by @DamienHarper in #127 - Ensure compatibility with doctrine/dbal <2.10.0
References
Full Changelog: 3.0.0...3.1.0
3.0.0
What's new
- Annotation support: audit configuration (audited entities, ignored columns, etc) can be done mostly
using annotations in entities. - Audit events: an audit event is dispatched for every audit entry opening the doors to add
custom behavior on audit entry creation. - Security controls: audit access can be now restricted to specific roles.
- The bundle now supports non numeric IDs for the
User
objects (thanks to @Gonzalo1987). - A transaction hash is now stored in audit tables and makes it easier to identify all operations performed
in the same transaction.- The timeline now displays a transaction hash for each element. By clicking a transaction hash,
you get a complete overview of all the operations included into the transaction. AuditReader::getAudits()
now accepts a transaction hash as fifth parameter to return audits
logged in the given transaction for the given entity.AuditReader::getAuditsByTransactionHash()
accepts a transaction hash as parameter and returns
all the audits logged in the given transaction.
- The timeline now displays a transaction hash for each element. By clicking a transaction hash,
- Better single table (
SINGLE_TABLE
) inheritance support.AuditReader::getAudits()
now accepts a boolean as sixth parameter to return either audits
for the given entity only or audits for the given entity hierarchy.
- Add class table (
JOINED
) inheritance support (thanks to @versh23). - Performance enhancements when saving a lot of entities at once (thanks to @acanicatti).
- Removed deprecation messages (thanks to @maxhelias).
- Fixed an issue with
audit:schema:update
command when run against a database with no audit table. - A few icons have been added in the timeline.
- Revamped documentation.
Breaking changes
- The structure of audit tables has changed so you have to run the migration command right after updating
AuditEntry::getUserId()
now return astring
ornull
instead of anint
.- When using a secondary database Doctrine's
doctrine:schema:update
command do not create
audit tables automatically anymore (this command cannot work with multiple databases simultaneously),
use the bundled migration command instead which supports the same options as Doctrine's command.bin/console audit:schema:update --dump-sql
prints SQL queries that need be executed.bin/console audit:schema:update --force
executes relevant SQL queries.
- Configuration has changed to use a secondary database: you now only need to declare the dedicated
entity manager in configuration file as described here. - The bundle requires
mbstring
extension (cf. https://www.php.net/manual/en/mbstring.installation.php).
How to upgrade?
Either update your composer.json
file manually to include "damienharper/doctrine-audit-bundle": "^3.0"
or run
composer require damienharper/doctrine-audit-bundle ^3.0
Due to internal changes requiring new columns and blame_id
column type change, run the migration command after updating the bundle to update the structure of your current audit tables.
bin/console audit:schema:update --force
Changes
- Nested LoggerChains causing big call stack by @acanicatti in #72
- Change Id int to string by @Gonzalo1987 in #80
- Revision reference to see all changes made in one transaction by @DamienHarper in #82
- Various fixes regarding "issues" reported scrutinizer. by @DamienHarper in #83
- Remove deprecated and manage the compatibility by @maxhelias in #84
- Problem with doctrine by @Gonzalo1987 in #86
- Multi-db support by @DamienHarper in #88
- Single table inheritance support by @DamienHarper in #89
- Audit transaction by @DamienHarper in #90
- Schema update by @DamienHarper in #93
- Bring back the schema listener and restrict its usage to single database setups by @DamienHarper in #94
- CreateSchemaListener refactoring by @DamienHarper in #95
- UpdateSchemaCommand displays a progress bar by @DamienHarper in #96
- Annotation support by @DamienHarper in #97
- Security annotation by @DamienHarper in #99
- Revamped documentation by @DamienHarper in #100
- Storage Configuration by @DamienHarper in #101
- [BUG] make sure target is defined and not null by @n3o77 in #103
- Audit event by @DamienHarper in #102
- Icons in the timeline by @DamienHarper in #107
- PHP-CS-Fixer by @DamienHarper in #108
- Changed the way decimal values are processed (cf issue #106) by @DamienHarper in #109
- symfony/lock required in non-dev by @n3o77 in #104
- EventDispatcher compatibility pre and post Symfony 4.3 by @DamienHarper in #112
- add joined inheritance by @versh23 in #115
- Annotations lazy loading by @versh23 in #117
New Contributors
- @acanicatti made their first contribution in #72
- @n3o77 made their first contribution in #103
- @versh23 made their first contribution in #115
References
Full Changelog: 2.5.0...3.0.0
2.5.0
Changelog
- Add an option to globally enable/disable auditing from configuration file (thanks to @MylesKingsnorth01)
- Allow to use a custom entity manager/secondary database for audits (thanks to @pawello92)
Warning: Using a custom entity manager/secondary database breaks atomicity because audited entity operation and audit storage are performed into different transactions.
2.4.0
Changelog
- Fix deprecated usage of
spaceless
tag (thanks to @maxhelias) - Timezone can be set from configuration file. It affects audit entries creation date and defaults to UTC (thanks to @MylesKingsnorth01)
2.3.2
2.3.1
2.3.0
Changelog
- Add a way to globally enable and disable audit at runtime (#61 thanks to @webmasterMeyers)
- Fixed a Windows compatibility issue regarding URLs including backslashes (fixes #62)