twine-net / laravel-raven

Sentry (Raven) error monitoring for Laravel 4 & 5 with send in background
17 stars 2 forks source link

Allow processor objects to be passed to the processors list #10

Closed tremby closed 9 years ago

tremby commented 9 years ago

Once https://github.com/Seldaek/monolog/issues/540 is fixed, it'd be nice to allow processor objects to be passed in the configuration. This would allow a given processor to be configured.

In this case I'm thinking it'd be good to allow configuration of the UserDataProcessor, for example to only allow through specific fields, or to block specific fields.

(The user can already do this by overriding toArray in their User object to return only particular fields, or by adding them to the $hidden attribute of the model, but this is still a desirable feature.)

tremby commented 9 years ago

It turns out this is already working, since processors clasess declare the __invoke method, which makes is_callable respond with true.