Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Christian Schneider
Am 26.01.2021 um 07:57 schrieb Alexandru Pătrănescu : > There will be other parts that will require testing, whatever you do. Trying > to optimize this to reduce the 1 line quick fix that could be easily read in > the documentation at https://www.php.net/manual/en/migration81.php >

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Alexandru Pătrănescu
On Mon, Jan 25, 2021 at 7:33 PM Christian Schneider wrote: > Am 25.01.2021 um 18:22 schrieb G. P. B. : > > And yes I'm basically advocating for people to add > mysqli_report(MYSQLI_REPORT_ERROR) (or even > mysqli_report(MYSQLI_REPORT_OFF) if they fancy) to their setup, I'm even > advocating for t

Re: [PHP-DEV] [RFC] var_representation() : readable alternative to var_export()

2021-01-25 Thread Rowan Tommins
On 25/01/2021 14:40, tyson andre wrote: I'm concerned PHP may indefinitely keep the default behavior of `array (`, `NULL`, etc. in var_export. I agree that that's likely, but I don't find it concerning, unless "array()" is deprecated or "null" becomes case sensitive. You have proposed no

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Christian Schneider
Am 25.01.2021 um 18:22 schrieb G. P. B. : > And yes I'm basically advocating for people to add > mysqli_report(MYSQLI_REPORT_ERROR) (or even mysqli_report(MYSQLI_REPORT_OFF) > if they fancy) to their setup, I'm even advocating for them to do it right > now such that they can catch anything ahead

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread G. P. B.
On Mon, 25 Jan 2021 at 16:25, Christian Schneider wrote: > Am 25.01.2021 um 16:59 schrieb G. P. B. : > > The BC break is totally minimal as it's a one line of code that needs to > be added (and for all intent and purposes should already be done). > > That does not change the fact that it is a BC

[PHP-DEV] Proposal: Automatically inheriting functions from parent namespaces

2021-01-25 Thread Samuel Štancl
I think it would be useful if namespaced *functions* automatically propagated to all child namespaces as well. An example use case of this would be packages having their own helpers like this: namespace MyPackage {     function foo() {}     function bar() {} } And being able to use them in MyPac

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2021-01-25 Thread G. P. B.
On Mon, 25 Jan 2021 at 02:29, Larry Garfield wrote: > Aside from some nitpicking around reflection and possibly fiddling with > the naming of "Scalar Enum" et al, we're closing in on the final version. > It will probably go to a vote in the not too distant future. > > --Larry Garfield > > -- > PH

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Björn Larsson
Den 2021-01-25 kl. 17:25, skrev Christian Schneider: Am 25.01.2021 um 16:59 schrieb G. P. B. : The BC break is totally minimal as it's a one line of code that needs to be added (and for all intent and purposes should already be done). That does not change the fact that it is a BC break which

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Christian Schneider
Am 25.01.2021 um 16:59 schrieb G. P. B. : > The BC break is totally minimal as it's a one line of code that needs to be > added (and for all intent and purposes should already be done). That does not change the fact that it is a BC break which should be treated accordingly. You are basically ad

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Benjamin Morel
> > Moreover, I'd rather we get rid of the warning modes all together as they > make the least sense to me. > Either you're handling the failures explicitly anyway and you use the > silent mode, or you don't and want it to throw with the exception mode. > The warning mode is literally the worst of

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread G. P. B.
On Mon, 25 Jan 2021 at 15:41, Christian Schneider wrote: > Am 21.01.2021 um 23:46 schrieb Kamil Tekiela : > > In fact, I don't really see this as a major breaking change. If any > project > > really needs the mysqli errors silenced then they can just set the error > > mode back to OFF. The change

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Christian Schneider
Am 21.01.2021 um 23:46 schrieb Kamil Tekiela : > In fact, I don't really see this as a major breaking change. If any project > really needs the mysqli errors silenced then they can just set the error > mode back to OFF. The change is aimed at new users, not existing projects. > Silenced error repor

Re: [PHP-DEV] [RFC] var_representation() : readable alternative to var_export()

2021-01-25 Thread tyson andre
Hi Rowan, > > If a php developer is learning the language through php's official manual, > > official language reference, or through an online tutorial, > > that would have sections showing the different scalar types, examples > > involving objects and/or arrays, etc. > > Those use var_export/va

Re: [PHP-DEV] [RFC] var_representation() : readable alternative to var_export()

2021-01-25 Thread tyson andre
Hi Dusk, > There's an interesting edge case where this does become useful. If an > evaluable representation of a data structure is written to a file (wrapped > with ` can be stored in opcache. This is dramatically faster than unserialize() or > json_decode(), especially for large structures. >

[PHP-DEV] [VOTE] Array unpacking with string keys

2021-01-25 Thread Nikita Popov
Hi internals, I've opened the vote on https://wiki.php.net/rfc/array_unpacking_string_keys. Voting closes in two weeks, on 2021-02-08. Regards, Nikita

Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode

2021-01-25 Thread Nikita Popov
On Thu, Jan 21, 2021 at 12:05 AM Kamil Tekiela wrote: > Hi Internals, > > Following my earlier announcement in > https://wiki.php.net/rfc/improve_mysqli > I decided to submit a dedicated RFC for the first proposal. > > This RFC proposes to change the default mysqli error reporting mode to > excep