From:             j dot henge-ernst at interexa dot de
Operating system: linux
PHP version:      5.3Git-2012-07-02 (Git)
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:implementing two interfaces with same signature no longer gives 
a fatal error

Description:
------------
having two different interfaces with same method no longer causes a fatal
error like in php 5.3.8. With fix for bug #43200 (my guess) it is now
possible to inherit another interface which has the same method signature
as a previous interface.

implementing an interface with methods which collide with a method name
which is already implemented by another interface should cause an error.

>From my point of OOP it does not make sense as the meaning of the colliding
interface method do not express the same, else both interfaces with the
same signature part should extend that base interface.

It's the opposite of bug #46705

Such a change of the language should not be done in a minor release.

Test script:
---------------
<?php

interface AInterface {
    public function getLogicalKey();
}
interface BInterface {
    public function getLogicalKey();
}
class AClass implements AInterface {
    public function getLogicalKey() { return 1; }
}
class BClass extends AClass implements BInterface { }


Expected result:
----------------
Fatal error: Can't inherit abstract function BInterface::getLogicalKey()
(previously declared abstract in AInterface) in x.php on line 12



-- 
Edit bug report at https://bugs.php.net/bug.php?id=62464&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62464&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62464&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62464&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62464&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62464&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62464&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62464&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62464&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62464&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62464&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62464&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62464&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62464&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62464&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62464&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62464&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62464&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62464&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62464&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62464&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62464&r=mysqlcfg

Reply via email to