Re: Changing the default value of SQLite3::enableExceptions()

From: Date: Sat, 18 May 2019 23:56:15 +0000
Subject: Re: Changing the default value of SQLite3::enableExceptions()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-105753@lists.php.net to get a copy of this message
Hi Christoph Den lør. 18. maj 2019 kl. 13.00 skrev Christoph M. Becker <cmbecker69@gmx.de>: > However, I don't think that we can change the default value in the near > future for BC reasons. Deprecating (7.4) and removing support (8.0) for > calling the method without argument would be the way to go, I think. Yeah I agree here. We could go a similar around to what you proposed for the curl version function, something like (for PHP-7.4): if (ZEND_NUM_ARGS() == 0) { /* E_DEPRECATED: Relying on the default value of $enableExceptions is deprecated as it will change from FALSE to TRUE ...*/ } And for master simply making the parameter required. I suspect the impact of this is very minimal as most users of this would not be affected by this proposal unless its a bug in their code (as I don't expect anyone to call ->enableExceptions() to *disable* them being anything but a bug). > [In a somewhat distant future, we might consider reintroducing support > for argument-less calls, but in this case it might make sense to let the > method work as getter (i.e. without argument, it would return the > current value without changing it).] Currently SQLite3::enableExceptions() will return the old value, I think we should retain this and only change the default value. -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#105753) next »