Page 1 of 1

Script to find dependencies

Posted: Thu Nov 17, 2005 12:35 pm
by decepticon
Hi everyone,

I'm new to this forum...so I hope I can explain myself well, without sounding like a total idiot..but:

I was just wondering if there was an existing script out there, that will go through a bunch of php files, and find dependencies?

Reason being, is I am creating a UML diagram, and I just need to find out what script is dependant on what function(s) or script(s), and what that function is dependant on and vice versa.

So for example, if scriptA is modified or removed, ScriptC will be affected, which will then affect ScriptX, and so on....

Any help would be appreciated..

thanks!

Posted: Thu Nov 17, 2005 12:49 pm
by Roja
Interesting question. Just replying so its on my watched threads list, sorry.

Posted: Thu Nov 17, 2005 2:04 pm
by pickle
Roja wrote:Interesting question. Just replying so its on my watched threads list, sorry.
FYI: There is a Watch this topic for replies link.


In other news, I haven't heard of a script that does that, but it wouldn't be too hard to do. Just open the root file, parse it for any occurrences of include(), include_once(), require(), require_once(), and record the files passed. Then, open up each of those files and search them for dependencies the same way - you could make a nice tree that way.

Posted: Thu Nov 17, 2005 2:48 pm
by Roja
pickle wrote:
Roja wrote:Interesting question. Just replying so its on my watched threads list, sorry.
FYI: There is a Watch this topic for replies link.
Yeah, but that does a totally different thing. I usually browse during the day with "Your Posts", which is quick. When I have time I expand my view to "Posts since you last visited". The watch the topic for replies I believe makes it PM you when there are updates, which I *absolutely* do not want.

Or put another way, thanks but I prefer my method. :P