As I understand YAGNI says that we need to extract an interface only if we need. So if we don't need polymorphism and have only one implementation right now we don't need use interface. But DIP says:
A. High-level modules should not depend on low-level modules. Both should depend on abstractions.
B. Abstractions should not depend on details. Details should depend on abstractions.
Looks like some discrepancy between YAGNI and option B. of DIP.
Also if we want to apply OCP we need to invert the control of dependency and extract abstraction to have ability to extend a type without modifications of that type.
Also some technologies require to extract an abstraction to have ability to unit test the type clients. But e.g. in java we don't need it. So I want to know do I need to extract an abstraction if I have only one implementation right now?