Refactor/rename php code variables/functions

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
avent
Posts: 19
Joined: Mon May 14, 2007 9:06 pm

Refactor/rename php code variables/functions

Post by avent »

I' suggest a tool to rename (refactor) php variables/function names
in a single file or in all files in the project
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Refactor/rename php code variables/functions

Post by Aivars »

Refactoring in PHP isn't fool-proof due to fact that it's a dynamic language. Not only due to all kinds of magic methods but also how the files are included (i.e. you don't write <include modulename> but include($any_string_variable_you_want)). We could probably add some basic refactoring but it can never be nearly as good as in static languages.
Blumentals Software Programmer
avent
Posts: 19
Joined: Mon May 14, 2007 9:06 pm

Re: Refactor/rename php code variables/functions

Post by avent »

yes,
a very simple feature could be very usefull,
simply to rename variable and function.
A little more powerfull and comfortable then the replace function of editor.
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Refactor/rename php code variables/functions

Post by Aivars »

It's too late for anything like that in this version, but I'll add it to suggestions for the next version.
Blumentals Software Programmer
avent
Posts: 19
Joined: Mon May 14, 2007 9:06 pm

Re: Refactor/rename php code variables/functions

Post by avent »

Ok thanks for consideration.

is not a vital feature of course, but useful, at least for me.

So with my poor english a tell some other indication:

Now I'm developing with webuilder (that is the best in his genre)
but in the final step of the project (when the php scripts work almost fine) always I've a dirty code with messy comment and many function and variables
with names that are no more consistent with their functionality that, in many cases, is changed during the project
so, to clean the code, I treat the project with an other tool that let me:
- see the usage of function and variables in the project
- rename function and variables in all the project
- build quickly a comment block for functions (also for a single function/variable) with the format as phpdocumentor

and an other small utility to do a simple encryption/obfuscation of some small script of the project where are coded reserved data (password, bank data, credential ecc.)
or critical code like algorithms to make it difficult (not impossible, I know, but enough in most of cases) to see/change the source.

That's all... :)
Post Reply