New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP CodeIntel does not load interfaces #176

Closed
garak opened this Issue Apr 15, 2015 · 16 comments

Comments

Projects
None yet
4 participants
@garak

garak commented Apr 15, 2015

If I try to autocomplete a namespace, only classes are shown, while I expect to see interfaces also.
Example: try to write use Doctrine\Common\Collections\, the autocomplete does not show Collection (that is an interface), while it shows classes in the same namespace.

(I'm on Komodo IDE 9.0.0)

@Naatan Naatan added this to the Backlog milestone Apr 15, 2015

@garak

This comment has been minimized.

garak commented May 20, 2015

Addendum: even Traits are undetected.

I wonder how you can classify this issue as "Enhancement" 😢, it looks more like a regression (it was working in previous versions of Komodo)

@garak

This comment has been minimized.

garak commented Nov 4, 2015

I know that bumping up is not so nice, but I opened this issue when Komodo were at 9.0, now 9.3 is about to be released and this is still in backlog. Maybe it's because it's labeled as an enhancement? As already told, it's indeed a regression, since in Komodo < 9 it was working.

@Naatan Naatan modified the milestones: 9.4, Backlog Nov 4, 2015

@Naatan

This comment has been minimized.

Member

Naatan commented Nov 4, 2015

Thanks for reminding us :) @mitchell-as can you evaluate the complexity and bump to 10.0 if this is too much for 9.4? thanks

@Naatan

This comment has been minimized.

Member

Naatan commented Nov 13, 2015

This was addressed in #751

@Naatan Naatan closed this Nov 13, 2015

@Naatan Naatan removed this from the 9.4 milestone Nov 13, 2015

@garak

This comment has been minimized.

garak commented Jan 13, 2016

@Naatan I just received 9.3.2 upgrade and I see this bug is still there 😞

@mitchell-as mitchell-as reopened this Jan 13, 2016

@mitchell-as mitchell-as modified the milestones: 9.3.3, 10.0 Jan 13, 2016

@mitchell-as mitchell-as self-assigned this Jan 13, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jan 13, 2016

Thanks for following up. I've reopened the ticket.

@garak

This comment has been minimized.

garak commented Jan 13, 2016

Any chance to get this done before 10.0?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jan 13, 2016

This issue has been marked as an "enhancement" and we do not add enhancements in bugfix releases. Since the next non-bugfix milestone is 10, that is where I've slated this enhancement in.

@garak

This comment has been minimized.

garak commented Jan 13, 2016

Too bad.
I can't say nothing more than to my previous comment

@Defman21

This comment has been minimized.

Contributor

Defman21 commented Jan 13, 2016

It's not an Enhancement for sure. Probably a Regression or a Bug :(

@Naatan Naatan modified the milestones: 9.3.3, 10.0 Jan 13, 2016

@Naatan

This comment has been minimized.

Member

Naatan commented Jan 13, 2016

It was marked as enhancement because originally my impression was that we outright did not support this.

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jan 25, 2016

@garak Will you please give me a minimal example that does not work anymore? I don't know much PHP and I need the example to write test cases before fixing this issue. Many thanks.

@garak

This comment has been minimized.

garak commented Jan 26, 2016

Is not easy providing a minimal example, since this issue is about autocompleting namespaces.
As I already told in my first message, you can try to install Doctrine (via composer install doctrine/common) and try to use Doctrine's classes. As long as you use classes, you see them autocompleted by Komodo, but the same is not true for interfaces.
So, for example, use Doctrine\Common\Collections\ArrayCollection; is autocompleted, while use Doctrine\Common\Collections\Collection; is not (being ArrayCollection a class and Collection an interface

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jan 29, 2016

I understand, but not having an example at hand will slow down the progress of this ticket. I would very much appreciate it if you are able to provide an example. (When I say minimal, I don't mean as small as possible; just a case that demonstrates the problem that I can put in our test suite. Doctrine classes/interfaces are not appropriate for that medium.)

@garak

This comment has been minimized.

garak commented Jan 29, 2016

OK, here it is: I created a project with the following files:

<?php
// file foo.php

namespace Foo;

class Foo
{
}
<?php
// fie bar.php

namespace Foo;

interface Bar
{
}
<?php
// file baz.php

namespace Baz;

use Foo\Foo;  // this is autocompleted
use Foo\Bar; // this is not

I tried to record a short video, unfortunately it's a bit blurry, but you can see that writing Foo\, I only get one suggestion (the Foo\Foo class), while I should get two (the Foo\Foo class and the Foo\Bar interface)

y6xzmj

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jan 29, 2016

You are awesome! Thanks so much. I confirm that "Bar" is not autocompleted.

mitchell-as added a commit that referenced this issue Feb 1, 2016

fix: codeintel: Complete PHP interfaces in "use" statements - fixes #176


rn=

(integrated from master branch change 9.2.1-809-ga9177ca by Mitchell <mitchellb@activestate.com>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment