Re: Fix the inconsistent behavior of PDO::PARAM_XXX
| From: | Matteo Beccati | Date: | Sun, 05 Nov 2023 12:31:53 +0000 |
| Subject: | Re: Fix the inconsistent behavior of PDO::PARAM_XXX | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121587@lists.php.net to get a copy of this message | ||
Hi Saki,
Il 04/11/2023 07:59, Saki Takamachi ha scritto:
Hi internals,
As shown in the following issue, the behavior of PDO::PARAM_XXXX is inconsistent and I would like to fix this.
https://github.com/php/php-src/issues/12603
First, I tried fixed pdo_pgsql.
https://github.com/php/php-src/pull/12605
Eventually I plan to make similar changes to all bundled pdos.
What do you think about these? If there is a reason for the current implementation that should not be changed, it would be very helpful if you could tell me why.
I'm sure there are several bugs w/ types in PDO.
Perhaps some can be fixed, but I would be very careful touching that part.
The last time I tried to fix the PDO_PARAM_INT behaviour on pdo_pgsql I broke Laravel and surely many other projects.
I'm afraid that most libraries and projects have now worked around some of the bugs and trying to fix them is going to cause BC problems, or generate a whole new series of bugs and incompatibilities.
See:
https://bugs.php.net/bug.php?id=80892
https://github.com/php/php-src/pull/6801
Cheers
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/