Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

VALID_FETCH_MODES lists three entries that are not usable fetch modes

オープン
#199 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@simon-mundy がすでに取り組んでいます。

2026年9月29日 から。

評価

この issue はまだ評価されていません。

説明

bug confirmed

Result::VALID_FETCH_MODES contains three entries that cannot work through fetch():

  • PDO::FETCH_FUNC — PDO permits it only in fetchAll(). Result only ever calls fetch(), so it always raises ValueError: Can only use PDO::FETCH_FUNC in PDOStatement::fetchAll().
  • PDO::FETCH_PROPS_LATE (1048576) and PDO::FETCH_CLASSTYPE (262144) — bit flags to be OR'd with FETCH_CLASS, as the comments beside them in the source already note. Passed alone, PDO ignores them and falls back to the default mode, so accepting them as standalone modes is misleading.

Reproduced against SQLite in memory. ResultSetFetchModeTest covers all three: FETCH_FUNC under the modes that throw, the two flags under the modes that silently fall back.

Removing them is a BC break, so it wants a deprecation rather than a straight removal.

主要言語
PHP
スター
18
フォーク
8
平均マージ
6日 11時間
マージ済み PR(30日)
14

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php-db/phpdb のほかの issue

php-db/phpdb の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。