Bug #71414 [Com]: Fatal error when using interface trait and inheritance

From: Date: Fri, 16 Dec 2016 12:27:49 +0000
Subject: Bug #71414 [Com]: Fatal error when using interface trait and inheritance
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206059@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71414&edit=1 ID: 71414 Comment by: lisachenko dot it at gmail dot com Reported by: krzysiekpiasecki at gmail dot com Summary: Fatal error when using interface trait and inheritance Status: Closed Type: Bug Package: Class/Object related Operating System: OS X 10.9.5 PHP Version: 7.0.2 Block user comment: N Private report: N New Comment: Looks like this fix introduced behaviour changes for prototype methods, see https://3v4l.org/LLebD Previous Comments: ------------------------------------------------------------------------ [2016-07-20 11:32:43] davey@php.net Automatic comment on behalf of krakjoe Revision: http://git.php.net/?p=php-src.git;a=commit;h=4327370d1308eab3c611fc6994e67048a18f92ef Log: fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error) ------------------------------------------------------------------------ [2016-03-26 23:58:22] bwoebi@php.net Automatic comment on behalf of krakjoe Revision: http://git.php.net/?p=php-src.git;a=commit;h=4327370d1308eab3c611fc6994e67048a18f92ef Log: fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error) ------------------------------------------------------------------------ [2016-03-26 23:55:40] krakjoe@php.net Automatic comment on behalf of krakjoe Revision: http://git.php.net/?p=php-src.git;a=commit;h=4327370d1308eab3c611fc6994e67048a18f92ef Log: fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error) ------------------------------------------------------------------------ [2016-01-19 22:41:53] requinix@php.net Oh, I see what you mean. The trait's method should overwrite the inherited method, and since stuff like https://3v4l.org/dCZ9h works without the trait, using the trait should also be allowed. ------------------------------------------------------------------------ [2016-01-19 22:24:26] krzysiekpiasecki at gmail dot com I wrote, that method Y in TraitY is well defined and it is according to InterfaceY No fatal error when method public y():string is defined in the class body not only in a trait. What's the difference? class Y extends X implements InterfaceY { use TraitY; public function y(): string { } } ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=71414 -- Edit this bug report at https://bugs.php.net/bug.php?id=71414&edit=1

« previous php.bugs (#206059) next »