Bug #54327 [NEW]: Interface extending problem
From:
Operating system: OSX
PHP version: 5.3.6
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Interface extending problem
Description:
------------
PHP can't seem to find an interface when it's extended by another one and
implemented by a class located in a different namespace (when stored in 1
single
file).
Test script:
---------------
I do have 3 examples:
Example 1:
test.php
namespace A;
class B implements \A\B\C, \Countable {
public function count() {
return 1;
}
}
namespace A\B;
interface C {}
everything is OK!
-----------------
Example 2:
test.php
namespace A\B;
interface C extends \Countable {}
namespace A;
class B implements \A\B\C {
public function count() {
return 1;
}
}
everything is OK!
-----------------
Example 3:
test.php
namespace A;
class B implements \A\B\C {
public function count() {
return 1;
}
}
namespace A\B;
interface C extends \Countable {}
Fatal error
Expected result:
----------------
No fatal error ;)
Actual result:
--------------
Fatal error: Interface 'A\B\C' not found in...
--
Edit bug report at http://bugs.php.net/bug.php?id=54327&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54327&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54327&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54327&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54327&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54327&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54327&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54327&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54327&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54327&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54327&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54327&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54327&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54327&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54327&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54327&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54327&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54327&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54327&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54327&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54327&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54327&r=mysqlcfg
Thread (4 messages)
- j dot verloop at gmail dot com