This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268854 - autocompletion suggested code for overriding of wrong PHP version
Summary: autocompletion suggested code for overriding of wrong PHP version
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-05 12:37 UTC by par7133
Modified: 2016-11-05 12:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (116.80 KB, text/plain)
2016-11-05 12:37 UTC, par7133
Details
before (146.34 KB, image/png)
2016-11-05 12:38 UTC, par7133
Details
after (130.93 KB, image/png)
2016-11-05 12:38 UTC, par7133
Details

Note You need to log in before you can comment on or make changes to this bug.
Description par7133 2016-11-05 12:37:52 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Linux version 4.8.4-200.fc24.x86_64 running on amd64
Java; VM; Vendor = 1.8.0_101
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13

Reproducibility: Happens every time

STEPS:
  * I'm coding a project in PHP 5.6.27
  * I want to override the method begin_transaction of the parent class mysqli
  * I start to write "public function be".. and the autocompletion window popup suggesting me
     the syntax to override begin_transaction of mysqli.
  * I accept the suggestion
  * After the suggested code is included in the class, the Editor underline it like an error saying that
      the feature is not compatible with the PHP version used in the project
  * Carefully looking, I get that the the suggested code is PHP 7 code (including the types in the method
     signature). 

ACTUAL:
  the suggested code for the method overriding is PHP 7 code 

EXPECTED:
  the suggested code for the method overriding should be of the version used in the project
Comment 1 par7133 2016-11-05 12:37:59 UTC
Created attachment 162795 [details]
IDE log
Comment 2 par7133 2016-11-05 12:38:56 UTC
Created attachment 162796 [details]
before
Comment 3 par7133 2016-11-05 12:38:59 UTC
Created attachment 162797 [details]
after