Renaming file results in error

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

Renaming file results in error

Postby lvw » September 6th, 2018, 3:15 pm

Hi,

When renaming a file through the Solution Explorer it asks to perform a rename in this project of all references to the code element.

When pressing Yes it always throws me an error:
Identifier does not match element at given position.
Parameter name: oldValue

Then pressing (the only option) OK, it doesn't actually update anything in code.

PHP Tools 1.29.10924.2017
VS Enterprise 2017 15.8.2
lvw
 
Posts: 7
Joined: September 6th, 2018, 2:52 pm

Re: Renaming file results in error

Postby Miloslav Beno » September 24th, 2018, 9:46 am

Hi,

Thanks for reporting this. I've just tried it and was unable to replicate. Does it happen to you regularly in all the files or just in some particular file?

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1228
Joined: January 7th, 2012, 8:36 pm

Re: Renaming file results in error

Postby lvw » September 24th, 2018, 10:24 am

Thank for your reply, this happens when renaming files that contain a class or interface only, not when renaming files that contain loose scripts.

I think it tries to rename the class/interface name and the references in code to this class/interface but fails to do so. The actual file is renamed in the end.

See attachment for steps i take.

This also happens in other projects i have
You do not have the required permissions to view the files attached to this post.
lvw
 
Posts: 7
Joined: September 6th, 2018, 2:52 pm

Re: Renaming file results in error

Postby Miloslav Beno » September 24th, 2018, 12:12 pm

Thanks so much!

I've been able to reproduce. This happens when the class is in a namespace. We will fix that.

I will ping you once it's done.

Cheers,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1228
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 6 guests

User Control Panel

Login

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 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 6 guests
Phalanger