You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to check PDO::ATTR_STRINGIFY_FETCHES configuration #12969
Fatal error: Uncaught PDOException: SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute in /app/pdo.php on line 3
But I expected this output instead:
int(0);
It seems like I cannot verify how PDO is configured regarding this option. When $pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true) is used, true is returned and the behaviour changes. This behaviour applies for at least mysql, pgsql and sqlite.
This is a known issue. In #12793 I made a fix for this issue on master. I targeted the master branch for changes because there were some other existing behavior changes.
@Girgias
At least regarding the part of getting PDO::ATTR_STRINGIFY_FETCHES with getAttribute(), I don't think it will cause a BC break even if we backport it. What do you think?
Activity
SakiTakamachi commentedon Dec 18, 2023
This is a known issue. In #12793 I made a fix for this issue on master. I targeted the master branch for changes because there were some other existing behavior changes.
@Girgias
At least regarding the part of getting
PDO::ATTR_STRINGIFY_FETCHESwithgetAttribute(), I don't think it will cause a BC break even if we backport it. What do you think?janedbal commentedon Dec 18, 2023
Thx, I'd love to see this backported!
Currently I'm working on phpstan-doctrine feature that attempts to autodetect stringification behaviour and this is blocking issue for me.
SakiTakamachi commentedon Dec 18, 2023
I have created the backport PR to 8.2 for the time being.
#12970
Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FE…
Merge branch 'PHP-8.2' into PHP-8.3
Merge branch 'PHP-8.3'
janedbal commentedon Dec 22, 2023
Thanks!