php-integrator-symbol-viewer icon indicating copy to clipboard operation
php-integrator-symbol-viewer copied to clipboard

There is no data to be displayed.

Open dahappy1989 opened this issue 8 years ago • 7 comments

Hey iam getting the message There is no data to be displayed in my class so i did a test Class because i thougt maybe something is wrong with it. But i still get the message with:

<?php
class test {
  public $test1 = "";

  public function sayHello(){
    echo "Hello";
  }
}
 ?>

so i reported the problem like suggested ;)

dahappy1989 avatar Mar 12 '16 12:03 dahappy1989

Hi, thanks for reporting this.

First of all could you confirm that php-integrator-base is working correctly (i.e. go-to-definition from php-integrator-navigation or autocomplete from php-integrator-autocomplete-plus)?

Second could you test if the problem persists if file has a namespace? From php-integrator-base README:

PSR-compliant code - Write code that follows the PSR standards, especially regarding namespacing.

If those tests don't provide any useful information, then I would have to ask you for some way to reproduce the error, i.e on some starter project like symfony-standard (but any other project on GitHub would be just as good).

Cheers, tocjent

m-bobrowicz avatar Mar 12 '16 12:03 m-bobrowicz

okay seems you are right and there is something wrong with my php-integrator-base even if iam not ably to figure out what :-( thanks to navigator i can click on functions like strpos or preg_match but everything else does not function ... even not with the symfony-standart project so seems like i have to live without the php-integrator projects since i not even get anything remotly like an error :-( but thx anyway ...

dahappy1989 avatar Mar 13 '16 00:03 dahappy1989

@dahappy1989 Are you concerned by this bug in php-integrator-base ?

Arcesilas avatar Mar 13 '16 00:03 Arcesilas

okay first since english isnt my native language iam not sure if you really wanted to know if iam concerned like bothered by it or if you wanted to ask if that could be the probelm: so i only have 1 project folder but i run the command that they have in that post and got no errors .. so integrator-base SEEMS to index alright ... but stil not working correctly

dahappy1989 avatar Mar 13 '16 01:03 dahappy1989

Ok, I meant "Do you have this problem". English isn't my native language either, that is why I did not think "concerned" could have other meanings. Sorry about that.

Have you tried disabling all other packages and leave active only php-integrator-base and php-integrator-symbol-viewer ?

Arcesilas avatar Mar 13 '16 01:03 Arcesilas

yap already tried that but liked i saied the other php-integrator packages also not working so probaly rly is something with my integrator-base package whats causing the problem ... but i cant for the life of it not find any problem

dahappy1989 avatar Mar 13 '16 02:03 dahappy1989

Hi,

I've been able to reproduce the bug (don't know if it's the same origin as yours).

I have two files declaring the exact same class, with the same namespace. I know it's not supposed to happen, but there it is. The second file is a "backup" file, while refactoring it in a new one.

  • Create a file with a class in a given namespace (say myclass.php)
  • Copy that file to myclass.bak.php
  • Open myclass.bak.php: There is no data to be displayed
  • Change the class name, save file: Symbols are displayed
  • Rename class to its original name, save again: Symbols are still displayed
  • Go back to myclass.php (it could be open during previous steps, it does not matter): There is no data to be displayed

In this specific case, it's perfectly understandable that php-integrator need to associate one class with one file. However, if the class name is the same in the two files (including namespace), the file path is different, and we could expect php-integrator to display correctly the symbols in that file.

@dahappy1989 If this is not the same cause than your problem, I'll create another issue.

Arcesilas avatar Mar 15 '16 10:03 Arcesilas