Bug #67232 [NEW]: Interface inheritence not possible in interface
| From: | r dot van dot bezooijen at factua dot nl | Date: | Thu, 08 May 2014 07:17:50 +0000 |
| Subject: | Bug #67232 [NEW]: Interface inheritence not possible in interface | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185708@lists.php.net to get a copy of this message | ||
From: r dot van dot bezooijen at factua dot nl
Operating system: Linux
PHP version: 5.4.28
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Interface inheritence not possible in interface
Description:
------------
when overriding and interface method in another interface it's says they
are incompatible with eachother while the overriding method contains a
class/interface which is extended from the class/interface defined in
the parent
I think its also related to bug report 43200, Although it's not exactly
the same problem.
Test script:
---------------
<?php
interface IVisitee
{
public function accept( IVisitor $visitor );
}
interface IVisitor
{
public function visit( IVisitee $visitee );
}
interface IMetadata extends IVisitee
{
public function accept( IValidatorVisitor $visitor );
public function findConstraints( $group );
}
interface IValidatorVisitor extends IVisitor
{
public function validate( $group, $transverse = false, $deep =
false );
public function visit( IMetadata $visitee );
}
Actual result:
--------------
PHP Fatal error: Declaration of IMetadata::accept() must be compatible
with IVisitee::accept(IVisitor $visitor) in /tmp/test.php on line 30
PHP Stack trace:
PHP 1. {main}() /tmp/test.php:0
--
Edit bug report at https://bugs.php.net/bug.php?id=67232&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67232&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67232&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67232&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67232&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67232&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67232&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67232&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67232&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67232&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67232&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67232&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67232&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67232&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67232&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67232&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67232&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67232&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67232&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67232&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67232&r=mysqlcfg