12:58
I wish there was a cleaner way to extend a __construct in a inherited class without importing the trillion upstream dependencies
I'm using DI, that's why my constructors have so many dependencies on some parts of the code, like REST API endpoints, I have an abstract REST API endpoint class with dependencies like auth, logging, etc, and whenever I need a new dependency in a concrete instance I need to explicitly re-import everything and call parent::__construct() with all the dependencies...
I also have sub-types of endpoints, like "abstract class UploadEndpoint", that a few concrete REST API endpoints that handle upload extend, and the upload endpoint has things like ZipValidator, so when I need to inject a new dependency in a concrete class of UploadEndpoint, the constructor gets very verbose
On one hand, it's nice because it's exposing the relationships, on the other, I just want to add a new dependency without adding 15 lines of upstream code to my class
3 hours later…
17:17
5 hours later…
« first day (4900 days earlier) ← previous day next day → last day (273 days later) »