Closed adeanzan closed 2 years ago
@adeanzan Thanks for the report, I'll have a look at this issue
@adeanzan Would you mind sharing a working example that reproduce the issue please? That would speed up the fix.
@DamienHarper - Sure thing, I'll work on getting something together!
@DamienHarper - I've created a fork of the demo application that reproduces the problem: https://github.com/adeanzan/auditor-bundle-demo/tree/auditor-issue-101
auditor-issue-101
composer install
and ./reload.sh
Expected: The most recent Author entry doesn't have a change for updatedAt
since it's supposed to be ignored
Actual: updatedAt
field appears in the audit log
If I copy the updatedAt
property and accessors into Author.php
then the ignore works like I expect it to.
Relevant Files:
Thanks for looking into it!
@adeanzan could you please test PR #107
@adeanzan I finally merged #107 which fixes the issue. Feel free to re-open if needed. Anyway, thanks for the fork, it helped ;)
@DamienHarper Thank you for the fix!
auditor
versionSummary
The
Ignore
attribute is not respected when it's on a private property in a parent class and a field was changed in a child class.Current behavior
Here is my class hierarchy:
I have an
updatedAt
property defined as follows:When making changes to a
PizzaOrder
the changes toupdatedAt
appear in the audit log.How to reproduce
See above, please let me know if you'd like a working code sample.
Expected behavior
Ignore
annotation can be defined in parent classes on private variables. Note that it does work as expected for protected variables.