Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9154 invoked by uid 1010); 18 Nov 2005 01:08:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9139 invoked from network); 18 Nov 2005 01:08:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2005 01:08:48 -0000 X-Host-Fingerprint: 68.142.198.213 smtp114.sbc.mail.mud.yahoo.com Received: from ([68.142.198.213:32303] helo=smtp114.sbc.mail.mud.yahoo.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 22/01-07637-F992D734 for ; Thu, 17 Nov 2005 20:08:48 -0500 Received: (qmail 42306 invoked from network); 18 Nov 2005 01:08:44 -0000 Received: from unknown (HELO 192.168.2.101) (jabouillei@69.237.227.39 with plain) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 18 Nov 2005 01:08:43 -0000 Reply-To: truth@proposaltech.com To: internals@lists.php.net In-Reply-To: <437D2486.6070305@lerdorf.com> References: <437B530A.5050105@prohost.org> <437CF6B4.5080207@web.de> <437CF943.7090800@lerdorf.com> <437D0D08.8060805@web.de> <437D0E22.7080006@lerdorf.com> <437D11B7.7090102@web.de> <437D1361.5080504@prohost.org> <1132274666.8441.175.camel@notebook> <437D2486.6070305@lerdorf.com> Content-Type: text/plain Date: Thu, 17 Nov 2005 17:08:40 -0800 Message-ID: <1132276120.8441.192.camel@notebook> Mime-Version: 1.0 X-Mailer: Evolution 2.0.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Upgrading php From: truth@proposaltech.com (Todd Ruth) On Thu, 2005-11-17 at 16:47 -0800, Rasmus Lerdorf wrote: > Todd Ruth wrote: ... > > It would be so wonderful to throw all my code at a tool that would > > change everything that can be easily changed and give me a list of > > spots I need to look at manually. A lot of the changes don't take > > an overwhelming amount of time to do myself, but when you think > > about the thousands of users all doing the same conversions, it just > > makes sense for there to be a tool. It might also have the side > > benefit of reducing long threads about breaking old code. > > > > Perhaps this already exists and I've missed it. Perhaps it will > > never exist because it isn't enough fun to write. Just an idea... > > This is what the E_STRICT messages are for. If you turn them on (in PHP > 5) you will get very specific messages about language-level issues in > your code. > > -Rasmus I appreciate those messages. There are probably things that come up at runtime for which the E_STRICT messages are the only good option. (My guess is that it would be too much trouble to make a version of php that rewrites my source code on the fly. ;) ) On the other hand, my current upgrade approach is: - go to the new version - try to use all of my code paths and copy and paste the notices to a file - sed the file into a list of vi commands that take me to every line that generated a message - after recognizing the pattern for the simple fixes, define macros to do most of the work - Try to maintain consciousness while applying the macros over and over again. If I weren't nearly the last person on the planet to upgrade, it would be useful for me to at least post my vi macros somewhere. Perhaps if other people are following a similar approach, they could post whatever they use to get them over hurdles. The hope in my original email is that if php is clever enough to give me a message, it might be clever enough to just make the change too. I appologize again for bringing this up without providing any tools. I just wanted to make sure it was considered. Maybe there could be a spot on php.net where people are encouraged to post (or at least post links to) what helped them get through php transitions. Thanks again, Todd