This is a simple project to explain how to use/applicate the SOLID principles in symfony's project sample
-
Single responsibility principle: a class should only have one responsibility. Furthermore, it should only have one reason to change.
-
Open/Closed principle: Classes should be open for extension but closed for modification. In doing so, we stop ourselves from modifying existing code and causing potential new bugs in an otherwise happy application.
-
Liskov substitution principle: if class A is a subtype (Child) of class B (Parent), we should be able to replace B with A without disrupting the behavior of our program.
-
Interface segregation principle: Larger interfaces should be split into smaller ones. By doing so, we can ensure that implementing classes only need to be concerned about the methods that are of interest to them.
-
Dependency inversion principle: The principle of dependency inversion refers to the decoupling of software modules. This way, instead of high-level modules depending on low-level modules, both will depend on abstractions.
Project Requirements:
- Symfony 7.0.* (last stable version in date of 28/04/2024)
- PHP 8.2
- Makefile
- Docker
Project : Docker List commands
- make help : Display commands list - help screen
- make build : Builds the Docker images
- make up : Start the docker hub in detached mode
- make start : Build and start the containers
- make down : Stop the docker hub
- make logs : Show live logs
- make sh : Connect to the FrankenPHP container
- make bash : Connect to the FrankenPHP container via bash so up and down arrows go to previous commands
- make create-project : init symfony project - last stable version v7.0.*