I have some libraries in my 'framework' like routing, config, logger,... I want them to be independent of each other, like some of well known PHP frameworks make them.
I understand all the principles of loose coupling, but I have no clue how to follow both loose coupling and DRY principles. If I make routing library that config and logger, then I don't repeat myself, but if I want to use router on its own it won't work. Similarly if I write logging and config code into my routing library, I would repeat myself.