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

Summary: autocompletion suggested code for overriding of wrong PHP version
Product: php Reporter: par7133
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log
before
after

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