Spotting a missing function is quite easy, your script simply
    won't work and give a clear error.. :)
Well, not exactly :) It might just not work anymore at some time in the future (as you know you never really have 100% code coverage, even with unit testing and stuff. it's way less than 100%, actually ).

I don't understand why you can't simply have a special DEPRECATELOG (or just entries in the CHANGELOG) which mention which functions have been deprecated due to which reasons, and which talks about possible "fixes"/replacements, tho- a simple (and hypothetical) example:

[PHP 4.3.5]

- strlen(): removed, as it would be redundant now that count() is
  polymorphic.

So, when upgrading, you just go through the new entries, and grep your source files for occurences - no big deal.

Where's the missing point? ;)

Cheers,
Michael

Maybe the best way to proceed with deprecation is to first start giving the error message warning it's deprecated and in
some version remove the functionality and replace the error
with one that says something along the lines of:
"This function is not here anymore, use foobar() instead."
And later remove that too..
--Jani



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



Reply via email to