Re: [RFC][DISCUSSION] - Throwables error code's type generalization
| From: | Marco Pivetta | Date: | Sun, 18 Dec 2016 10:49:52 +0000 |
| Subject: | Re: [RFC][DISCUSSION] - Throwables error code's type generalization | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97437@lists.php.net to get a copy of this message | ||
Fix one library or fix all of them: good luck with the second one. 😉
Anyway, the type change (on the property, in this case) can be applied to
any interface change reducing return type strictness: it is a BC break.
On 18 Dec 2016 11:47 a.m., "Wes" <netmo.php@gmail.com> wrote:
> Yo, Marco :P I don't need to add any contextual data, I'm just trying
> improve consistency by formalizing what PHP already does. I think it's the
> right way to fix this because I don't think changing PDO is ever going to
> happen. You either special case PDO in your code or formalize the special
> case so that it becomes the norm. Again, there is no actual formal type
> restriction right now, existing code that assumes
int is wrong,
> even if
> it's not their fault. If you are making that assumption your code is broken
> already.
>