Bug #81405 [Opn->Csd]: Values of PDO::PARAM_ constants have changed
Edit report at https://bugs.php.net/bug.php?id=81405&edit=1
ID: 81405
Updated by: git@php.net
Reported by: me at derrabus dot de
Summary: Values of PDO::PARAM_ constants have changed
-Status: Open
+Status: Closed
Type: Bug
Package: PDO Core
Operating System: macOS 11.5
PHP Version: 8.1.0beta3
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikic
Revision: https://github.com/php/php-src/commit/1e012ecb3f888142cfe6366f4b17219c62a97d60
Log: Fix bug #81405: Restore old PDO::PARAM_* values
Previous Comments:
------------------------------------------------------------------------
[2021-09-01 10:29:20] me at derrabus dot de
Thank you very much!
(TIL: This bugtracker does not support emoji and replaces them with question marks that make my
message look a lot more passive-agressive than I indended it to be <insert laughing emoji with
sweat here>)
------------------------------------------------------------------------
[2021-09-01 09:46:42] nikic@php.net
I've put up https://github.com/php/php-src/pull/7445 for the
code change. Whether we land this or not is up to release managers.
------------------------------------------------------------------------
[2021-09-01 09:34:54] me at derrabus dot de
> In what way do Symfony and Doctrine use hard-coded values for PDO::PARAM_* constants?
Doctrine DBAL has inlined the literal values when they decoupled the library from PDO:
https://github.com/doctrine/dbal/blob/3.1.1/src/ParameterType.php
The effect is that you _could_ still use the PDO constants when using prepared statements with DBAL,
although you _should_ use the ParameterType constants instead.
Symfony accidentally relied on that and I'm about to fix that now:
https://github.com/symfony/symfony/pull/42819
However, my expectation would be that Symfony/Doctrine are not the only codebases where the
assumption was made that those constants' values would perpetually remain the same.
> If you had submitted this issue just one day earlier I'd have simply changed the values.
I've been testing PHP 8.1 for quite a while now, but I literally discovered this issue last
night. Sorry for being late. ????
------------------------------------------------------------------------
[2021-09-01 09:31:19] cmb@php.net
PHP 8.1.0RC1 is not yet *released*; we could re-tag if necessary.
------------------------------------------------------------------------
[2021-09-01 09:14:03] nikic@php.net
In what way do Symfony and Doctrine use hard-coded values for PDO::PARAM_* constants?
If you had submitted this issue just one day earlier I'd have simply changed the values. But
ABI for PHP 8.1 is frozen now, and changing this would result in an ABI break.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81405
--
Edit this bug report at https://bugs.php.net/bug.php?id=81405&edit=1
Thread (7 messages)