|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69084 Unclear error message when not implementing a renamed abstract trait function
Submitted: 2015-02-19 21:00 UTC Modified: 2020-03-03 11:11 UTC
From: Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.6.5 OS: n/a
Private report: No CVE-ID: None
 [2015-02-19 21:00 UTC]
It reports that the non-renamed function has not been implemented, even when it has. eg

Test script:

trait Foo {
    abstract public function doStuff();
    public function main() {

class Bar {
    use Foo {
        Foo::doStuff as doOtherStuff;
    public function doStuff() {

$b = new Bar();

Expected result:
Complaint about doOtherStuff not being implemented.

Actual result:
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doStuff) in /in/vDEP9 on line 19


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-03 11:11 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 19:01:25 2023 UTC