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

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

Reply via email to