Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1576

PHP autocompletion partially broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.0, 10.0
    • Next
    • php - Editor

    Description

      It seems that autocompletion partially broken for PHP project.
      In project's properties PHP version 7.2 selected for my example.

      Here is screencast (attached also).
      Screencast was made with NB v10#890, but I'm getting the same troubles with Netbeans 9 (with installed PHP plugin from 8.2 dev) too, so both versions are specified.

      Textual description (in comments):

      <?php
      
          namespace Repo;
          
          use Entity\EntityClass;
          
          /**
           * @method EntityClass[] getAll() 
           */
          class RepoClass
          {
              /**
               * 
               * @param array $params
               * @return EntityClass
               */
              public function findOrCreate(array $params): EntityClass
              {
                  return new EntityClass();
              }
          }
      
          
      <?php
          
          namespace App;
          
          class App
          {
              public function exec()
              {
                  $repo = $magick->getRepo();
                  /* @var $repo \Repo\RepoClass */
                  $obj = $repo->findOrCreate($params);
                  // for now all goes fine, ctrl+space after `->` shows methods 
                  // `getAll()` and  `findOrCreate(array $params)`
      
                  $obj-> // but no autocompletion here :(
              }
          
          }    
      
      Versions

      Product Version: Apache NetBeans IDE Dev (Build incubator-netbeans-linux-890-on-20181029)
      Java: 11.0.1; Java HotSpot(TM) 64-Bit Server VM 11.0.1+13-LTS
      Runtime: Java(TM) SE Runtime Environment 11.0.1+13-LTS
      System: Linux version 4.18.15-1-default running on amd64; UTF-8; ru_RU (nb)

      Attachments

        1. autocompletion_problem_screencast.mp4
          1.35 MB
          Nameless
        2. image-2018-11-03-11-36-48-134.png
          97 kB
          Nameless
        3. image-2018-11-03-15-33-28-173.png
          63 kB
          Nameless
        4. PhpAutocompletionProblems.zip
          2 kB
          Nameless

        Activity

          People

            junichi11 Junichi Yamamoto
            Nameless Nameless
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m