detecting bad --CLEAN-- sections

From: Date: Thu, 16 Apr 2009 13:25:23 +0000
Subject: detecting bad --CLEAN-- sections
Groups: php.internals 
Request: Send a blank email to internals+get-43718@lists.php.net to get a copy of this message
hi, I've noticed that it is very difficult to tell if your --CLEAN-- sections are actually working, so I wonder if it might be possible to brainstorm ways of fixing this. A couple of options come to mind that could be considered - append this code to the end of the .clean.php file: ?><?php echo "--CLEAN-- works"; ?> and capture the output, then check to make sure that we see "--CLEAN-- works" in the output. This would detect fatal errors (which is the most common problem I find, especially when a --CLEAN-- section includes a helper file). - add a --REMOVEFILES--/--REMOVEDIRS-- section where one can specify relative paths to files or whole directories that should be nixed, and have run-tests do the removal The most common usage for --CLEAN-- is to remove files, so I like the second option personally. Thanks, Greg

« previous php.internals (#43718) next »