NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
5963: PHP class interface handling bug


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
Hello.

The PHP intelli-sense does not offer methods from PHP interfaces - i.e. if class X implements InterfaceX, the methods from class X are offered, but methods from InterfaceX are not offered.

What more, even the Ctrl+click on a method from the interface does not work - it should bring me to the function definition in the interface, but it does nothing.

Since this is a serious bug, could you please fix this ASAP?

Thank you.
View user's profileFind all posts by fibizaSend private message


Joined: 22 Oct 2007
Posts: 16
Reply with quote
Hmm i concur Mad
View user's profileFind all posts by BBralaSend private messageVisit poster's websiteMSN Messenger


Joined: 06 Oct 2010
Posts: 2
Reply with quote
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

Code:

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 Smile

regards, Troy
View user's profileFind all posts by vitalviralSend private message


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
@ vitalviral
I have an open ticket for a few moths now on phpEd's support about this, but no timeframe about fixing this was given. Since there are other issues affecting more users, I'd say it would be a luck if it is fixed within a year from now. Sad
View user's profileFind all posts by fibizaSend private message
5963: PHP class interface handling bug
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic