Bug #81497 [NEW]: Multiple traits can not be aliased since PHP 8.0

From: Date: Sun, 03 Oct 2021 13:00:10 +0000
Subject: Bug #81497 [NEW]: Multiple traits can not be aliased since PHP 8.0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236996@lists.php.net to get a copy of this message
From: michael dot vorisek at email dot cz Operating system: any PHP version: 8.0.11 Package: Scripting Engine problem Bug Type: Bug Bug description:Multiple traits can not be aliased since PHP 8.0 Description: ------------ demo https://3v4l.org/eT0Aj (same as test case below) Test script: --------------- <?php trait ATrait { public function __isset(string $name): bool { return false; } } trait BTrait { public function __isset(string $name): bool { return false; } } class Model { use ATrait { __isset as private __a_isset; } use BTrait { __isset as private __b_isset; } public function __isset(string $name): bool { return false; } } Expected result: ---------------- no fatal error Actual result: -------------- Fatal error: An alias was defined for method __isset(), which exists in both ATrait and BTrait. Use ATrait::__isset or BTrait::__isset to resolve the ambiguity in /in/eT0Aj on line 17 -- Edit bug report at https://bugs.php.net/bug.php?id=81497&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81497&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81497&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81497&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81497&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81497&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81497&r=support Expected behavior: https://bugs.php.net/fix.php?id=81497&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81497&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81497&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81497&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81497&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81497&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81497&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81497&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81497&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81497&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81497&r=mysqlcfg

« previous php.bugs (#236996) next »