Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42134 invoked from network); 20 Aug 2010 13:00:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2010 13:00:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=wim@godden.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=wim@godden.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain godden.net from 217.71.118.164 cause and error) X-PHP-List-Original-Sender: wim@godden.net X-Host-Fingerprint: 217.71.118.164 brussels3.firstlinknetworks.com Linux 2.6 Received: from [217.71.118.164] ([217.71.118.164:36718] helo=brussels3.firstlinknetworks.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/22-31015-58C7E6C4 for ; Fri, 20 Aug 2010 09:00:54 -0400 Received: (qmail 30422 invoked by uid 89); 20 Aug 2010 13:00:51 -0000 Received: from unknown (HELO ?192.168.1.14?) (wim@godden.net@192.168.1.14) by brussels3.firstlinknetworks.com with ESMTPA; 20 Aug 2010 13:00:50 -0000 Message-ID: <4C6E7C7C.10701@godden.net> Date: Fri, 20 Aug 2010 15:00:44 +0200 Organization: FirstLink Networks User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Sebastian Bergmann CC: internals@lists.php.net References: <4C62EC4A.9020106@sugarcrm.com> <7.0.1.0.2.20100811214923.1540f9a0@zend.com> <4C63C544.4020800@php.net> <4C67EEB8.2060401@cu.be> <4C6CB61B.2070208@php.net> In-Reply-To: <4C6CB61B.2070208@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] back to 5.4 alpha From: wim@godden.net (Wim Godden) 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