Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26341 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49734 invoked by uid 1010); 5 Nov 2006 13:06:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49719 invoked from network); 5 Nov 2006 13:06:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2006 13:06:14 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.42 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.42 darkcity.gna.ch Linux 2.5 (sometimes 2.4) (4) Received: from [195.226.6.42] ([195.226.6.42:42169] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/58-24806-3C1ED454 for ; Sun, 05 Nov 2006 08:06:12 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id EF343D0FD4; Sun, 5 Nov 2006 14:06:07 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXaQtbIX; Sun, 5 Nov 2006 14:06:04 +0100 (CET) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id A1221A461C; Sun, 5 Nov 2006 14:06:04 +0100 (CET) Message-ID: <454DE1B7.2090808@cschneid.com> Date: Sun, 05 Nov 2006 14:05:59 +0100 User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Marcus Boerger CC: php internals LIST References: <7.0.1.0.2.20061024085428.053f9cf8@zend.com> <7f3ed2c30610240757v28702861r8d5f22f7e3047e60@mail.gmail.com> <7.0.1.0.2.20061024170856.0583dd20@zend.com> <1838975922.20061024205524@marcus-boerger.de> <71B5B01C-EDC5-46B0-8747-0706B2C7DF1F@prohost.org> <454B60E8.8010305@cschneid.com> <1227362691.20061103191138@marcus-boerger.de> <454CBC2C.8020204@cschneid.com> <702235698.20061104190502@marcus-boerger.de> In-Reply-To: <702235698.20061104190502@marcus-boerger.de> Content-Type: multipart/mixed; boundary="------------010507020901050800020800" X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] Why 5.2 should not be delayed for E_DEPRECATED From: cschneid@cschneid.com (Christian Schneider) --------------010507020901050800020800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Marcus Boerger wrote: >>> Liskov applies to static methods as soon as calls via objects are common >>> which is true for PHP. > >> This is common in PHP and you consider this good practice? Interesting, >> wasn't what I would have expected... > > I didn't say it is good practice, god behave :-) So you're adding a warning to something useful (factory methods) to help people doing something dubious? ;-) > Language developers copy from each other. Copy in the sense of looking > at the ideas and experience from others and taking them over, in a > fashion that suites their own language. As PHP has a C like syntax and Just make sure you don't fall into the trap of not seeing the great potential PHP has *because* it is different from the other languages. PLEASE NOTE: I don't expect you to reply to the above points as my email is just meant as food for thought and we're discussing language design *philosophy* here which would take too much space with little hope of getting to an agreement. But that's ok, I accept your opinion and you're much more in charge of PHP than I am. >> What help is needed, compiling the list of E_NOTICE/E_STRICT to be >> convert to E_DEPRECATED? Or giving input on how to convert the >> individual messages? I'm willing to help. > > Yes such a list would be very helpfull. If you think individual messages > need to be altered other then changing the severity than we might need to > discuss that as well. Having the list of such messages would help anyway. I don't consider the text of the messages itself as that crucial. I attached a little script which greps for error types and outputs a file to quickly visit those places in the source files. Hope this helps, - Chris --------------010507020901050800020800 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="errorlist.php.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="errorlist.php.txt" "; $lines = array(); exec("egrep -n '^PHP_FUNCTION|((php_error_docref|zend_error).*($errortypes))' $file", $lines); foreach ($lines as $line) { list($linenumber, $message) = explode(":", $line, 3); $message = trim($message); if (preg_match('/^PHP_FUNCTION\(\s*(\w+)\s*\)/', $message, $regs)) $function = $regs[1]; else echo "$editor +$linenumber $file\t# $function: $message\n"; } } --------------010507020901050800020800--