Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining custom labeler breaks audited entities config #58

Open
curtchan opened this issue Jul 30, 2019 · 1 comment
Open

Defining custom labeler breaks audited entities config #58

curtchan opened this issue Jul 30, 2019 · 1 comment

Comments

@curtchan
Copy link

As in subject.

Example on defining labeler (as from docs):

    datadog.event_subscriber.audit:
        class: 'DataDog\AuditBundle\EventSubscriber\AuditSubscriber'
        arguments: ["@security.token_storage"]
        tags:
          - { name: doctrine.event_subscriber, connection: default }
        calls:
            - ['setLabeler', [['\AppBundle\Labeler\AuditLabeler', 'getLabel']]]

debug:config sees config okay
dump inside isEntityUnaudited proves the array of unaudited entities is empty.

@curtchan
Copy link
Author

Quick fix is to define call manually, but it definitely needs to be worked on.


    datadog.event_subscriber.audit:
        class: 'DataDog\AuditBundle\EventSubscriber\AuditSubscriber'
        arguments: ["@security.token_storage"]
        tags:
          - { name: doctrine.event_subscriber, connection: default }
        calls:
            - ['setLabeler', [['\AppBundle\Labeler\AuditLabeler', 'getLabel']]]
            - ['addAuditedEntities', [['AppBundle\Entity\Reservation', 'AppBundle\Entity\Tariff', 'AppBundle\Entity\Parking', 'AppBundle\Entity\User']]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant