Autocompletion of $_SERVER[] keys

I downloaded the trial version of PHPStorm 4.0 but it does not autocomplete the keys of $_SERVER

Is it supposed to work ?

I tried with both windows 7 an linux.

8 comments
Comment actions Permalink

Hi Daniele,

Works fine here.

Please describe how you trying to autocomplete keys (step by step) and where (e.g. provide some simple but complete php file and show where it does not work).

Here is how I do:

  • type $_SERVER['']
  • place cursor inside single (in this case) quotes
  • start typing, e.g. "RE" (or skip this step completely -- I'm using it to shorten the list for completion, since I know what I am after)
  • manually invoke code completion popup (Ctrl+Space)
  • choose the value from the list (e.g. REMOTE_ADDR)
0
Comment actions Permalink

Do you always have to manually invoke code completion popups? is there anyway to set the IDE to popup after like 2 letters (something)?

Oh (back to the OP) I am seeing $_SERVER[]. Other arrays I don't. But the system array's I do.

0
Comment actions Permalink

I do the way how it is convenient for me and I'm used to such manual invocation for years now (old habit from other IDEs/tools) -- I do not like to see these here-let-me-help-you-straight-in-your-face popups -- it's very annoying and rather distracts than helps.

In any case -- there is no setting to configure it based on number of characters -- only the delay.

0
Comment actions Permalink

OK I tried your steps but it does not work, when I click control+space the popup says "No suggestions"
I will try to reinstall phpstorm

0
Comment actions Permalink

Please show the exact code where you have tried it (try it in empty project) specifying exact place where you have tried to invoke code completion -- maybe (just maybe) you are doing something wrong/differently.

0
Comment actions Permalink

The code is

<?php

  $a = $_SERVER['...'];


New project with new install of phpstorm 4.02


EDIT:

I tried on my pc in office under linux and it works, there must be something broken on the pc with windows... I will try again this evening and I'll report if it works

0
Comment actions Permalink

Well -- to start with finding the issue -- try "File | Invalidate Caches..."

0
Comment actions Permalink

For PhpStorm 2017.1.3 (possibly earlier too) I have to press ctrl+space twice to get global variables, it says so in small at the bottom of the suggestion list.

I know it's an old topic, but it was first on my Google search.

0

Please sign in to leave a comment.