Issue w/ Renaming Files

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Issue w/ Renaming Files

Postby AndyM84 » October 16th, 2018, 2:56 pm

When I go to rename a PHP file while it is open AND I have VS try to "update the references", I receive the following popup:

you-shall-not-rename.png


It then lets me try renaming the file again without the prompt and completes the operation successfully.
You do not have the required permissions to view the files attached to this post.
User avatar
AndyM84
 
Posts: 69
Joined: August 6th, 2012, 3:24 pm
Location: Boston, MA, USA

Re: Issue w/ Renaming Files

Postby maros.beno » October 17th, 2018, 9:06 am

Hi,
thank you for your feedback.
What was the name of class/file you were renaming from and what was the name you were renaming it into please? I was unable to reproduce. When I try to rename simple file/class Class1 to Class2 everything works out great. Does this simple rename works for you as well and it only shows this error for some particular ones? Maybe when this class name is used in some particular place in other files?

Thanks again, have a nice day.
Maroš Beňo
User avatar
maros.beno
 
Posts: 39
Joined: October 12th, 2016, 12:11 pm

Re: Issue w/ Renaming Files

Postby AndyM84 » October 17th, 2018, 5:28 pm

Let's see...

- I was renaming a file called 'LoginKey.php' to 'LoginKey.cls.php'
- The file in question was still new and hadn't been referenced anywhere yet
- This is probably the first time I've ever seen and/or chosen to use the "update references" dialog during a file rename
- Were you renaming the file it was open in the editor as well?

I'll try and reproduce again today at some point and let you know.
User avatar
AndyM84
 
Posts: 69
Joined: August 6th, 2012, 3:24 pm
Location: Boston, MA, USA

Re: Issue w/ Renaming Files

Postby maros.beno » October 18th, 2018, 2:06 pm

Hi,
the problem seems to be that PHP Tools was trying to rename "LoginKey" class to "LoginKey.cls" class. Strange is that it did not show me any errors when I tried to rename it. Yes i had the file open. But it results to invalid code after the renaming, because there will be "class LoginKey.cls" and such. Tell us if you manage to reproduce the error message somehow and I will take a look at it closer then. Next time just say no to renaming when class name really didn't change.
Thanks, Have a nice day.
Maroš Beňo
User avatar
maros.beno
 
Posts: 39
Joined: October 12th, 2016, 12:11 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 5 guests

cron

User Control Panel

Login

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 5 guests
Phalanger