Edit report at https://bugs.php.net/bug.php?id=80722&edit=1
ID: 80722
Updated by: requinix@php.net
Reported by: fakhar_anwar123 at hotmail dot com
Summary: Missing support for Dependency Inversion Principle
and for serving the purpose
-Status: Not a bug
+Status: Suspended
Type: Feature/Change Request
Package: *Extensibility Functions
Operating System: All
PHP Version: 8.0.2
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2021-02-07 12:29:44] rtrtrtrtrt at dfdfdfdf dot dfd35
> When we ask for support of a feature,
> it should be taken as a support for the
> platform (PHP), not criticism
for the sake of god: https://wiki.php.net/rfc/howto
------------------------------------------------------------------------
[2021-02-07 12:27:29] fakhar_anwar123 at hotmail dot com
Refined Concept: Uptil PHP8.0, PHP does not support "Interface Variables" which allows to
comply with two core Principles of Software Development
A) Dependency Inversion Principle DIP, and
B) Interface Segregation Principle (ISP)
(These are principles
Why Interface Variables Are Need Feature:
The "Interface Segregation Principle (ISP)" is not just about breaking down larger
interface into smaller interfaces, its actual purpose is to expose/offer (to the Consumers
client-class code) different subsets of the functions of a Serving-entity (Class), in the form of
small Packages / Deals (aka Interfaces)
(...hiding the Mechanism; details of how those Services are produced, internally, by the
Serving-entity)
Consumers (Client-side code) can then consume needed subset/s of functions/services of the Serving
Entity; Class in the form of packages / deals (Interfaces).
Benefit / Purpose:
The Serving-end can extend services of a package (Interface), if needed, without effecting other
exposed Packages (Interfaces) which means without effecting the Consumers consuming those packages
(Interfaces).
Example:
See P-15 and P-13 for better understanding.
https://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners
------------------------------------------------------------------------
[2021-02-07 12:23:25] fakhar_anwar123 at hotmail dot com
Ahh okay so are a user, i assumed you are a C++ developer behind PHP.
My brother i have submitted a strong case along with proper references. But the speed of your
respnse clearly shows that you are in haste and not reading thoroughly.
When we ask for support of a feature, it should be taken as a support for the platform (PHP), not
criticism.
I am an architect with 20 years experience in Object-oriente Design, and a critical analytical
researcher, technology analyst.
------------------------------------------------------------------------
[2021-02-07 12:16:33] rtrtrtrtrt at dfdfdfdf dot dfd35
> response of a represntative of PHP Community
i am not, i am a user
how did you come to the conclusion that "rtrtrtrtrt@dfdfdfdf.dfd35" is a
"represntative of PHP Community"?
> be defensive and asking questions like "How PHP survived"
i just pointed out that what you call "core principles" others don't care and you
wasn't able to back your position by anything other than your opinion
------------------------------------------------------------------------
[2021-02-07 12:11:05] fakhar_anwar123 at hotmail dot com
Again, i am not looking for a Design Patter, but support for a core Design Principle which all
Object-oriented languages enable through the use of Interface.
I am myself a PHP user, with 15 years experience. I have remained a strong advocator of PHP and PHP
Frameworks. However, it is very disppointing to see the response of a represntative of PHP Community
that instead of promising the support for this very basic and needful feature, you are adopting to
be defensive and asking questions like "How PHP survived". I can provide you a beneiftting
answer to it, please do no understimate me.
The question today is "Why other technologies like NodeJS and Go dented the market of PHP in
past few years", but i do not want to go into that detail.
Please, tell me when Interface variables are not supported ? When PHP will start adhering to the
CORE PRINCIPLES (not design patterns) of Software Engineering?
A) Dependency Inversion Principle
B) (purpose behind) Interface Segregation Principle
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80722
--
Edit this bug report at https://bugs.php.net/bug.php?id=80722&edit=1