[php-src] Issue #18837: Automatic Method Signature Inheritance for Abstract Classes in PHP

From: Date: Wed, 11 Jun 2025 22:28:55 +0000
Subject: [php-src] Issue #18837: Automatic Method Signature Inheritance for Abstract Classes in PHP
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250246@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/18837 Author: mohammadMghi ### Description I’ve noticed something in PHP that could really improve the language if added as a feature. Imagine this scenario: You have an abstract class with a method called funcA(param1), and there are 40 subclasses that implement this method. Now, suppose you want to add a second parameter, so funcA becomes funcA(param1, param2). Updating all 40 subclasses manually becomes tedious and error-prone. It would be incredibly helpful if you could just update the method signature in the abstract class, and have all subclasses inherit the change automatically — without needing to modify each one individually. This would make code much more maintainable and extensible.

« previous php.bugs (#250246) next »