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.
if you rename a class and also select an option to rename the file as well, first the file rename is performed and then netbeans tries to find the old file to rename the class but fails and produces an error that the file is no longer valid. Example class UserAliasValidatorTest {} in file UserAliasValidatorTest.php rename the class to AliasValidatorTest and also check "[X] Rename also file with Declaration" Imediatelly you get this error: the file .../AliasValidatorTest.php seams no longer valid! i see that the file was renamed it is now "AliasValidatorTest.php", but the class name inside is still "UserAliasValidatorTest". This started happening after 8.0.1
Works for me in the dev version of NetBeans without any problem. Could you please verify it [1]? Thanks. [1] http://bits.netbeans.org/download/trunk/nightly/latest/ Product Version: NetBeans IDE Dev (Build 20160602-eb3cfce69024) Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14 System: Linux version 4.2.0-36-generic running on amd64; UTF-8; cs_CZ (nb)
works for me too, tested on: Product Version: NetBeans IDE Dev (Build 201606030002) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 But does not work on v8.1: Product Version: NetBeans IDE 8.1 (Build 201510222201) Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1 Java: 1.8.0_73; Java HotSpot(TM) 64-Bit Server VM 25.73-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_73-b02
Thanks for your verification! If you need this functionality, please use dev version of NetBeans. Thanks.
*** Bug 252779 has been marked as a duplicate of this bug. ***
Does not work in NetBeans IDE 8.2 (Build 201609300101) which was the target milestone for this bug. The file is renamed and then the operation fails with the error message "The file [path/to/NewClassName.php] seems no longer valid!". The class and references to it are not refactored. After this operation, Undo stops working. This happens most of the time, but not always. It is weird that it complains about the new filename not being valid, because renaming the file to that new name is the only thing that succeeds in this operation. My files are on a local SSD, no remote/network disk stuff is involved. I saved all files before starting the operation. None of the files are open in other programs. Is there any other information I can supply to help solve this?