I have a service (for sending error alerts) which is used by multiple other services.
The alert service is injected into those classes via the relevant services.yml files and through their constructors.
However, both classes share the same instance of the service (something I actually didn't realise until now). If I set a property from one class, it's available for the other class to use later.
In some cases this will be great, but in my use case I want each class to start with a fresh instantation of the alert service class.
Is there a way, through services.yml, the constructors, or any other means, to achieve this?