Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 16 hours ago
JSON representation

SOLID PHP - Examples with PHP 8.3

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)