Replace dependency injection and mocking with algebraic effects

The main idea is, instead of injecting what you need, you ask for it using an effect . If you don’t know what an algeabraic effect is, you can read about it on StackOverflow or Wikipedia . To quote the Stackoverflow answer: In short, algebraic effects are an exception mechanism which lets the throwing function continue its operation. Since PHP does not support effects, I’m using fibers to simulate…