Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63842 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2773 invoked from network); 13 Nov 2012 15:49:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2012 15:49:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:42984] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/90-30200-61C62A05 for ; Tue, 13 Nov 2012 10:49:42 -0500 Received: from [10.1.125.128] (unknown [195.162.88.230]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id A63A265E89; Tue, 13 Nov 2012 16:49:38 +0100 (CET) User-Agent: K-9 Mail for Android In-Reply-To: <8A8A29F9E43E417FB5450D63019B2DDB@NeiRoze> References: <50A10A9D.9070402@oracle.com> <50A1946F.8010407@lerdorf.com> <50A20CCB.8090909@lsces.co.uk> <8A8A29F9E43E417FB5450D63019B2DDB@NeiRoze> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Tue, 13 Nov 2012 17:49:34 +0200 To: Reinis Rozitis ,PHP internals Message-ID: <8f4231fc-6e3c-4a33-af71-2af5e7a95dfd@email.android.com> Subject: Re: [PHP-DEV] RFC: ext/mysql deprecation From: johannes@schlueters.de (=?ISO-8859-1?Q?Johannes_Schl=FCter?=) Reinis Rozitis wrote: >> Rewriting perfectly functional mysql code to use mysqli is not a >trivial >> move, just as are the problems of re-writing PHP5.2 code to work >cleanly >> on 5.4. ISP's are stuck between keeping customers - who are most >likely >> not even very computer literate - working while fighting the problems >that >> changes such as removing mysql will cause them. > > >I wonder if there have been any plans or suggestions (while dropping >the >old ext/mysql code) to provide some sort of seamless >migration/alternatives >(similar way it has been done in case of libmysql and mysqlnd)? >In short - just aliasing the old mysql_* to mysqli_* functions (as most >used >like _query, _fetch_row/assoc have just mixed variable order)? > Reimplementing ext/mysql inside PHP makes no sense. The result of this would be (almost) the exact same code as we have. (ext/mysql is a exremely small wrapper over libmysql/mysqlnd only special thngs are pconnect, auto connect and reusage of default connection) What one might try to do is changing ext/mysql to not use a resource but an mysqli object, then users might swich module by module, instead of breaking the application completely. But I fear we will introduce many bugs that way as this is a quite huge patch. An alternative approach might be to reimplement mysql_* functions using PHP userland code based on mysqli. Then users can load that lib (php.ini autoprepend_file) for compatibility and bugs can be fixed relatively simple (no C needed, no PHP release needed, ...) but again: writing such a lib is a relatively huge project. In my opinion we tell users as good as we can that ext/mysql is deprecated for some time, if we really want to get rid of it, we have to add E_DEPRECATED and then remove it.Waiting a year more won't change much, there will always people who hit it. johannes