Re: dependency check
| From: | Nilesh Govindarajan | Date: | Fri, 22 Jul 2011 12:17:18 +0000 |
| Subject: | Re: dependency check | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314150@lists.php.net to get a copy of this message | ||
On 07/22/2011 11:21 AM, Andreas Moroder wrote:
> Hallo,
>
> I have a PHP application made of many files ( php, images etc. )
> I have a strong suspicion that many of the files in the application
> directory are no more in use, because of changes made on the application.
> Is there a tool that, starting from the entry point of the application,
> scans the files recursively for included/used files and lists them ?
> With this list I could delete the remaining files.
>
> Thanks
> Andreas
>
>
You could write a python or even php script to do that, storing all the
files an array/list and then finding files (regex) which are not
included in any of the php files.
Of course, this applies if and only if you haven't used __autoload() magic.
--
Regards,
Nilesh Govindarajan
@nileshgr on twitter/identica