You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PHP] 'Generate override' feature assigns the return type in the constructor #9171
When using the ‘generate override’ feature on a class that extends another class, and selecting the constructor, it is created by also assigning the return type, which is not permitted for a constructor.
Language / Project Type / NetBeans Component
PHP project
How to reproduce
In a PHP project, create a class that extends another class.
Right-click on the editor and select ‘Insert code’ to bring up the “Generate” menu, then select ‘Override & implement methods’.
Select "__constructor", then press "Ok" button
The constructor with return type is generated.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Arch Linux
JDK
jdk21-openjdk
Apache NetBeans packaging
Community provided installer
Anything else
The error shown in the screenshot was generated when running PHP version 8.3, but the same error also occurs in version 8.4.
The bug does not occur when ‘Constructor’ is selected in the same ‘Generate’ menu.
Activity
Merge pull request apache#9395 from DamImpr/php_fix_override_constructor