Naming changes.

From: Date: Thu, 28 Dec 2000 12:03:31 +0000
Subject: Naming changes.
Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-42382@lists.php.net to get a copy of this message
Hi after the recent discussion I thought Id trawl the source and list all non standard function names. Even if we do not remove these perhaps we can get aliases to their correct names before the next release and also get the documentation updated. What I would suggest (as someone did before) is somthing like the following: actual function is named/renamed properly, We then basically define a new alias per release, somthing like PHP_ALIAS_404_DEPRECIATED(function_name) this alias issues a notice saying this function is depreciated you should use real_function_name. After a decent number of releases it is then changed to issue a warning then finally when we begin to phase it out rather than removing the function totally we report an E_ERROR() telling them about the error in their script and they should change the function call rather than just ending up with lots of bugs saying mysqlsomefunc has started telling me it is an undefined function... then for PHP 4.0.5 we have PHP_ALIAS_405_DEPRECIATED(anotherfunctionname) and this starts doing the same thing. The other option is to define PHP_ALIAS_DEPREICATED_WARNING, PHP_ALIAS_DEPRECIATED_NOTICE.. and use these to phase out different functions over different amounts of time (IE undocumented functions can be depreciated a lot quicker than the MySQL ones). Although we could leave the functions in there for ever it just seems silly to me as we will get more and more old functions lying about and its probably much better in the long run to have an efficient way of killing of legacy function names. And there are lots of them, I have made a list of about 1/2 of them so far and will continue and finish it if people think that this is the right thing (tm) to do. James -- James Moore PHP Quality Assurance Team jmoore@php.net

« previous php.dev (#42382) next »