Bump
I was using 5.9 and upgraded to the latest today, partially hoping that this would be fixed. Alternatively maybe I am doing something wrong.
I have iDatabaseV1 implementing a set of functions
so if I have
interface iDatabaseV1
{
function A
}
interface iDatabaseV2 extends iDatabaseV1
{
function B
}
class db implements iDatabaseV1
class db2 extends db implements iDatabaseV2
|
I want to be able to use in another class __construct(iDatabaseV2 $DB)
But type hinting inside the class only shows function B
The only solution seems to be to redeclare all the V1 methods inside the V2 interface but this is (seems obvious to me) not desirable.
While searching exisiting posts, I did see but couldn't find again, something about using the phpdoc hints to help the autocomplete - is there something along those lines that would help here? I can't imagine what.
Anyway, this is my first time on the forum despite using and loving PhpED for a couple of years so this is in no way a big complaint, I just feel 'wrong' breaking what I see as normalisation rules and losing the benefits of extends just to make type hinting work. But type hinting is soooo useful
regards, Troy