Hello, i'm opening a new topic because this feat could solve also other problem than my actual issues.
I haven't found a way to reset DI shared services already instantiated.
Debuggin my app i discovered that Phalcon use the DI to store also services not initially registered. For example it seems the Response service in added to DI after an MVC action return. That response service is set as a Shared service and there is no way to remove or reset it. I tried everything
- add a New response object as single or shared
- remove and then re-add a new instance
The only solution is to create a new DI (not desirable)... It could be a cool feature to be able to reset/clear instantiated shared services. The first thing it could help is Unit testing (i'm actually involved with)