Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-damian/solid-php
SOLID PHP - Examples with PHP 8.3
https://github.com/s-damian/solid-php
dependency-inversion-principle interface-segregation-principle liskov-substitution-principle open-closed-principle php php8 php83 single-responsibility-principle solid solid-principles
Last synced: about 1 month ago
JSON representation
SOLID PHP - Examples with PHP 8.3
- Host: GitHub
- URL: https://github.com/s-damian/solid-php
- Owner: s-damian
- Created: 2021-04-22T09:37:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-03T08:16:12.000Z (10 months ago)
- Last Synced: 2024-10-13T13:02:24.245Z (2 months ago)
- Topics: dependency-inversion-principle, interface-segregation-principle, liskov-substitution-principle, open-closed-principle, php, php8, php83, single-responsibility-principle, solid, solid-principles
- Language: PHP
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SOLID - Examples with PHP 8.3
Here there is an example of SOLID in PHP 8
## Author
[![PHP Developer](https://raw.githubusercontent.com/s-damian/medias/main/s-damian-logo-full-stack.webp)](https://github.com/s-damian)
## SOLID
S :
**Single Responsibility Principle** - A class must have one and only one responsibility.O :
**Open Closed Principle** - A class must be open to extension, but closed to modification.L :
**Liskov Substitution Principle** - An instance of type T must be able to be replaced by an instance of type G, such as G subtype of T, without this modifying the consistency of the program.I :
**Interface Segregation Principle** - Prefer several specific interfaces for each client rather than a single general interface.D :
**Dependency Inversion Principle** - Depend on abstractions, not implementations.## Examples
* [Single Responsibility Principle](https://github.com/s-damian/solid-php/tree/master/src/1_single-responsibility-principle)
* [Open Closed Principle](https://github.com/s-damian/solid-php/tree/master/src/2_open-closed-principle)
* [Liskov Substitution Principle](https://github.com/s-damian/solid-php/tree/master/src/3_liskov-substitution-principle)
* [Interface Segregation Principle](https://github.com/s-damian/solid-php/tree/master/src/4_interface-segregation-principle)
* [Dependency Inversion Principle](https://github.com/s-damian/solid-php/tree/master/src/5_dependency-inversion-principle)