Sebastian Bergmann wrote:
Am 15.08.2010 15:42, schrieb Wim Godden:
Looking forward to any feedback !

 Have you looked at http://github.com/troelskn/php-tracer-weaver? It is
 similar to what you are doing (though not integrated with PHPUnit).
First time I came across this. But there's a significant difference : it generates docblocks based on runtime analysis, which is exactly what you don't want to be doing (unless you have an old project which has no docblocks and you don't want to go over the code manually to see which types would be appropriate in which function/method). Additionally, it will work on single PHP files, but (as far as I can tell) it won't work on anything that has more than a 1-on-1 relationship between file and generated page.

The only other tool I discovered that did some sort of type validation is Phantm (see http://www.colder.ch/news/08-18-2010/38/phantm-continued.html), which does static analysis, but again only in single files... and it uses Scala (java required) to do all this.

I've been thinking about building a tool that just uses Xdebug output on a development or testing environment to detect type issues on the actual runtime code, but that's just plain idiotic : it creates massive files if you run it using frameworks and unless you built the entire codebase from scratch while having the system enabled, even a single external library will throw tons of warnings. That's basically why I wrote it as a PHPUnit patch. Too bad I can't actually build it as a true pluggable extension.

Do you see this as having a possible future within PHPUnit ?


Kind regards,

Wim


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to