I want to integrate Rollbar.com in my Flow app. Rollbar is simple service for reporting errors/exceptions from your app, so it makes sense to initialise it as early as possible.
I tried doing that from Package::boot(), but configuration from @Flow\InjectConfiguration() annotation is not injected at this stage yet.
Any pointers what’s the best approach to achieve that?
Is hooking to finishedCompiletimeRun slot best way to do that (as injecting settings at this stage already works)?
This should probably be:
Initialize it as early as needed but as late as possible
I.e. if there’s nothing to log to Rollbar during a request, why initialize it`?
Instead of initializing it via Signal/Slot in your Package.php you could instead just rename the method to initializeObject() and flow will automatically invoke it as soon as you access that object.