completion not working

Hi there,

I don't understand why completion is not working ...
when i press ctrl+space i haven't suggestion about a class which exists
Example in the screenshot: From the StoreService i want to import Customer class (that is located into Entity\Customer). Usually phpStorm purpose dropdown with a list of the classes including Entity\Customer.
But since few days, i don't get any project classes!



Attachment(s):
Capture d'écran - 13012014 - 17:33:20.jpg
17 comments

Hi there,

1) What version of PhpStorm do you use exactly (Help | About) ?

2) Will it (the desired class) be there (in completion list) if you invoke it (Ctrl+Space) just after @return tag (e.g. @return [CTRL+SPACE]) ?

3) Have you tried "File | Invalidate Caches..." yet ?

0

Hi,

1) I'm using phpStorm v7.0 PS-131-374 with JRE 1.7.0_45

2) No, the completion list contain only the classes declared by 'use' at the top of the file

3) Yes, i have tested but nothing changed

0

No real idea then.

Could be due to some conflict with 3rd party plugin, although unlikely (please disable all of them .. and try it like that).

But 7.1 is out for a while now -- please try it:

0

Strange, i never be informed about 7.1 ^^"

I've installed phpStorm 7.1 in /opt, which reside on my SSD hard drive.
Because home is located on a different less speed drive, i can't install phpStorm in my home folder.
But i've give my user right to the entire /opt/phpStorm.

So, after installed 7.1, i retrieve completion

Thanks

0

I just upgraded to 7.1.1 build 133.679 and i get problem again.
Invalidate cache don't change anything
I can see that into the PHP Structure Panel phpStorm is loading permanetly without find methods & properties.



Attachment(s):
Capture d'écran - 24012014 - 09:53:21.png
0

There is the last log, i think there are several errors about completion



Attachment(s):
idea.log.zip
0

Ok, just as I suspected.
This regression (around @method array) was introduced in last biuld and is fixed for next.
You can revert to back to 7.1 in the meantime or wait couple of days.

0

I've installed the latest EAP version 7.1.2
it seems problem gones

Thanks :)

0

Hi the probleme appear again. I'm using now the build 138.84 and when i press ctrl+space i don't get the completion working :(



Attachment(s):
idea.log.zip
0

Please try File | invalidate caches and restart at first. Let me know if it helps.

0

I already tried that but nothing change ...
I add some details:
The completion is working when i start to type some characters (but not in comments docblock)

0

It's not the initial problem.

I explain:

If i start to type @var someClass in method vars declaration, completion not working even if i type ctrl+space:

/**
** @var SomeClass $myVar
**/
function someThing($myVar) {
// Inside the method completion is working except if i "force" ctrl+space
// Ex start to type something
new SomeCl ... completion automaticaly open, but if i press escape then try ctrl+space, completion window not open
}

This morning i tried to remove completely the .WebIde80 folder but nothing changed ...

EDIT: I found that completion is working inside method (not comment) if i use ctrl+alt+space Oo
So i've been in settings to see if the keymap changed, but no, in the keymap the basic completion is setted to ctrl+space

0

Finally the problem disapear even in comments!

I don't know what i did but everything work now!

0

Hi,
Your problem may be more related to name scope resolution and good old search paths.  I develop using the Laravel framework, are you zend?  Laravel tries to dynamicaly resolve in many cases as part of it architecture.  But you can include search paths,
sort of like JAVA class paths or LIBRARY_LD_PATHs.  

In Laravels case I created a subdir under the framework application dir called lib and add my libs there.

This is in my composer.json file:

       "psr-0": {
           "dbutils": "app/lib"

Laravel will include this in its name resolution search path.

Then I include those files I need:

<?php
    use dbutils\utils\SQL;
    use dbutils\query\Select;
    use dbutils\query\ResultSet;
    use dbutils\utils\ResultSetArray;
    use dbutils\database\mysql\MySQLConnection;
    use dbutils\database\mysql\MySQL;

    use dbutils\query\Table;
    use dbutils\query\Column;
    use dbutils\query\JoinType;
    use dbutils\query\ColType;


...  blah blah for a simple Laravel Controller

which uses the library...

    class CoverageCat
    {
        private $sql = null;

        public function __construct(MySQLConnection $sql)
        {
            $this->sql = $sql;

        }

        public function index()
        {
            $ret = "EMPTY";
            $select = new Select();
            $tbl_cat = new Table("test.climet_cvg_category", "cat");
            $select->addColumn("cat.cvg_cat_long_nm")->addColumn("cat.cvg_cat_key")
                ->addFrom($tbl_cat);
            $result = $this->sql->doQuery($select->toString());
            if (SQL::isSQL($result, 'ResultSet'))
            {.......


Everybody and Storm knows who we are referring to.  No Red Blobs !!! :)

And to test code directly in the Storm IDE I do this....


    use dbutils\query\ResultRows;
    use dbutils\query\ResultRow;
    use dbutils\query\ResultColumn;

    spl_autoload_extensions('.php');
    print "<p>" . get_include_path() . "</p>";
    //set_include_path(get_include_path().PATH_SEPARATOR.'../app/lib/');
    print "<p>" . get_include_path() . "</p>";
    spl_autoload_register();
    //spl_autoload_register(null, false);

    /*** specify extensions that may be loaded ***/
    //spl_autoload_extensions('.php, .class.php');

    /*** class Loader ***/
    function classLoader($class)
    {
        $filename = strtolower($class) . '.php';
        $file ='../app/lib/' . $filename;
        if (!file_exists($file))
        {
            return false;
        }
        include_once $file;
    }

    /*** register the loader functions ***/
    //spl_autoload_register(array('spl_autoload', 'classLoader'));

    $sql = new MySQLConnection();
    // ************* Define Tables ****************
    $tbl_employee = new Table("test.tbhrsemp", "e");
    $tbl_coverage = new Table("test.climet_ml_coverage_team", "cvg");
    $tbl_symbol = new Table("test.is_institution", "i");


And I can test code snips and logic right in the Storm IDE and debug locally...

Attached my Laravel Project Image from Storm 7.1.3  they look sort of like your projects...

Hope this helps if You are using Zend.  Humbly, blame plugins and versions is a last ditch attempt.  Try to figure out how things work, humbly said.
If you got version issues, the IDE and PHP system will let you know real quick.

Me still getting to understand PHP naming vodoo!! :)



Attachment(s):
project-2.JPG
project-1.JPG
0

Thanks for your answer.
Yes i'm zend, I didn't know Laravel Framework, seems interesting ^^
Before the problem dispear, if i putted the use statement, the completion was not working anyway.
I think it was a real phpStorm bug ...

0

Please sign in to leave a comment.