Re: Deprecated functionality & fixes

From: Date: Sun, 28 Aug 2011 10:59:13 +0000
Subject: Re: Deprecated functionality & fixes
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54462@lists.php.net to get a copy of this message
Hi Daniel, On 28.08.2011 14:09, Daniel O'Connor wrote:
It's been a while since I looked at http://ollehost.dk/media/pear-bugs/ but Daniel C's recent emails to the pear-qa list prompted me to. Bascially; on the SVN versions of many packages we're in reasonably good shape when it comes to deprecated behaviour. We had several hundred uses of eregi related code; plus some magic quotes and other bits and pieces. When I looked again; I noticed HTTP_Request2 had re-adopted magic quotes functions - and for good reason when reviewing the bug ( http://pear.php.net/bugs/bug.php?id=16440). So... we've got 36 deprecated bits in a handful of packages - how to we hit 0? Are there some behaviours like what's seen in Bug #16440 we work around further; or draw the line and refuse to support?
I have a feeling that "Deprecated stuff in HTTP_Request2" was extensively discussed before (maybe it was off-list, though), but seems another round is required. 1) get_magic_quotes_runtime() is NOT DEPRECATED. See here: http://www.php.net/manual/en/function.get-magic-quotes-runtime.php 2) set_magic_quotes_runtime() is indeed deprecated and produces a warning when called. HOWEVER, it is called in HTTP_Request2::send() if and only if get_magic_quotes_runtime() returns true. 3) THEREFORE, the only way to get a "deprecated" warning from HTTP_Request2 is to use deprecated functionality beforehand (either enabling magic_quotes_runtime in config file or calling set_magic_quotes_runtime(true)). Frankly, I do not see the point in hiding this warning from the user with either @ or using ini_set() instead (I also think the latter not showing a warning is an oversight that may be fixed sometime). After all he is either aware of the deprecated stuff and hides relevant errors or needs a heads up with it. Of course, if some package uses deprecated functionality unconditionally this should be fixed.

« previous php.pear.dev (#54462) next »