Introduction

SOLID, this acronym was coined by Michael Feathers, it represents the five basic principles of object-oriented programming developed by Uncle Bob.

Most programmers probably know this acronym. But it seems to me that a minority can decode it.

Is it wrong? Not exactly, I think that writing clean and simple code is more important than knowing the theory. But don't completely ignore the theory. How else will you pass on knowledge to someone? How do you justify your code in a discussion during the code review? Your code has to be based on theory and generally accepted standards.

It's essential to know the basics of what clean and simple code looks like. SOLID principles can be used in any object-oriented programming language. I work in Symfony on a daily basis, so I will show some principles in PHP.

So let's go through the five SOLID principles together.