Bug #70710 [NEW]: Method compatible declaration issue with parent of class when using trait
From: wouter at wouter0100 dot nl
Operating system:
PHP version: Irrelevant
Package: Class/Object related
Bug Type: Bug
Bug description:Method compatible declaration issue with parent of class when using trait
Description:
------------
When you extend a class and use a trait with the same method, you'll get
a declaration error. Only by overwriting the extended classes method
within the class itself, this is fixed.
Test script:
---------------
Method test: https://3v4l.org/gMEGg
Declaration error: https://3v4l.org/IJoio
Current workaround: https://3v4l.org/gIq0E
Expected result:
----------------
That the (strict) warning isn't being shown and I'm able to execute
$this->execute for the parents method and $this->executeTrait for the
trait's method.
Actual result:
--------------
See tests.
--
Edit bug report at https://bugs.php.net/bug.php?id=70710&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70710&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70710&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70710&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70710&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70710&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70710&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70710&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70710&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70710&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70710&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70710&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70710&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70710&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70710&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70710&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70710&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70710&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70710&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70710&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70710&r=mysqlcfg
Thread (3 messages)
- wouter at wouter0100 dot nl