#34157 [NEW]: Abstract methods in interfaces break class-relations

From: Date: Tue, 16 Aug 2005 19:07:59 +0000
Subject: #34157 [NEW]: Abstract methods in interfaces break class-relations
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83657@lists.php.net to get a copy of this message
From: jami dot pekkanen at ateco dot fi Operating system: Linux PHP version: 5.0.4 PHP Bug Type: Class/Object related Bug description: Abstract methods in interfaces break class-relations Description: ------------ If interface contains abstract method, direct implementor isn't reported as subclass of the interface. However, if one has abstract class in the inheritance hierarchy, implementing classes are reported as subclasses of the interface. Should abstract methods in interfaces even exist? Reproduce code: --------------- <?php interface SomeInterface { abstract public function Foo(); } class BrokenImplementor implements SomeInterface { public function Foo() {} } abstract class DummyParent implements SomeInterface {} class WorkingImplementor extends DummyParent { public function Foo() {} } var_dump(is_subclass_of('WorkingImplementor', 'SomeInterface')); var_dump(is_subclass_of('BrokenImplementor', 'SomeInterface')); ?> Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) bool(false) -- Edit bug report at http://bugs.php.net/?id=34157&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34157&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34157&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34157&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34157&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34157&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34157&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34157&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34157&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34157&r=support Expected behavior: http://bugs.php.net/fix.php?id=34157&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34157&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34157&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34157&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34157&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34157&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34157&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34157&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34157&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34157&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34157&r=mysqlcfg

« previous php.bugs (#83657) next »