Req #80722 [NEW]: Missing support for Dependency Inversion Principle and for serving the purpose

From: Date: Sun, 07 Feb 2021 11:01:32 +0000
Subject: Req #80722 [NEW]: Missing support for Dependency Inversion Principle and for serving the purpose
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231977@lists.php.net to get a copy of this message
From:             fakhar_anwar123 at hotmail dot com
Operating system: All
PHP version:      8.0.2
Package:          *Extensibility Functions
Bug Type:         Feature/Change Request
Bug description:Missing support for Dependency Inversion Principle and for serving the purpose 

Description:
------------
---
From manual page: https://php.net/language.oop5.interfaces
---
We do not have Interface variables in PHP, which means the client-side
code (consumer) can not point to abstraction. That means PHP does not 
adheres to A) Dependency Inversion Principle (DIP) and B) it also does
not serve the actual purpose behind Interface Segregation Principle ('I'
in S.O.L.I.D).

Those are two powerful techniques for extensibility with flexibility.

Can you please add support to that syntax like through a separate module
in Swoole ?

As example please See P-13 and P-15 in that blog
https://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners

Test script:
---------------
N/A


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80722&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80722&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80722&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80722&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80722&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80722&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80722&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80722&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80722&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80722&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80722&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80722&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80722&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80722&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80722&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80722&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80722&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80722&r=mysqlcfg


Thread (16 messages)

« previous php.bugs (#231977) next »