facebook / facebook/hhvm

Persistent PDO resources might be wrong w.r.t. PDO::ATTR_STATEMENT_CLASS

未關閉
#5,202 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
php5 incompatibility probably easy
主要語言
C++
星號
18.7k
分支
3.1k
平均合併
1 小時 47 分鐘
30 天內合併 PR
2

描述

According to the PHP manual, persistent PDO resources don't support PDO_ATTR_STATEMENT_CLASS (http://php.net/manual/en/pdo.setattribute.php).

HHVM's implementation of PDO seems to want to agree with this behavior, since there's a check for an `is_persistent' in the implementation of setattribute; however, that flag is not actually ever set anywhere.

This shouldn't be too complicated to resolve:
1/ Make sure PHP5's behavior agrees with the doc; if not, we can probably just keep the behavior also.
2/ If so, check for persistence another way (or set `is_persistent').
3/ A bunch of cleanup is possible if we match this behavior; e.g., we can probably kill persistent saving/restoring of the actual PDOResource objects, we can move the clsname field out of PDOConnection and into PDOResource as a runtime data structure, etc.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。