Bug #78776 [NEW]: Abstract method implementation in trait

From: Date: Mon, 04 Nov 2019 07:38:20 +0000
Subject: Bug #78776 [NEW]: Abstract method implementation in trait
Groups: php.standards 
Request: Send a blank email to standards-+get-1464@lists.php.net to get a copy of this message
From: mozafar dot gholami at gmail dot com Operating system: Win 10 PHP version: 7.3.11 Package: PHP Language Specification Bug Type: Bug Bug description:Abstract method implementation in trait Description: ------------ abstract methods should be implemented by child class and should not be static but when the implementation comes from a trait it cloud be static and code continue running without any problem. Test script: --------------- <?php abstract class A { abstract public function createApp(); } class B extends A { use C; } trait C { public static function createApp() { echo "You should not be here"; } } B::createApp(); Expected result: ---------------- Error for not implementing abstract method -- Edit bug report at https://bugs.php.net/bug.php?id=78776&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78776&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78776&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78776&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78776&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78776&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78776&r=support Expected behavior: https://bugs.php.net/fix.php?id=78776&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78776&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78776&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78776&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78776&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78776&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78776&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78776&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78776&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78776&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78776&r=mysqlcfg

« previous php.standards (#1464) next »