Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions reference/pdo/configure.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<!-- $Revision$ -->
<!-- EN-Revision: 1cc1b815cd0a2a579fb79bc2ab0c1202574696bc Maintainer: takagi Status: ready -->
<!-- EN-Revision: 6e58d11156926ea75109693d63306092320b63fe Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka -->
<section xml:id="pdo.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.install;
Expand Down Expand Up @@ -47,10 +47,7 @@ extension=pdo
<step>
<para>
PDO はデフォルトで有効になっています。
php_pdo.dll をはじめに指定し、
さらにその他のデータベース固有の DLL について、実行時に
<function>dl</function> で読み込むか
&php.ini; の中でそれらを指定します。
必要に応じて、データベース固有のドライバを &php.ini; で有効にします。
たとえば <link linkend="ref.pdo-sqlite">PDO_SQLITE</link>
ドライバを読み込み、<link linkend="ref.pdo-odbc">PDO_ODBC</link>
をコメントアウトしたままにするには、以下のようにします:
Expand All @@ -61,11 +58,11 @@ extension=pdo_sqlite
]]>
</screen>
</para>
<para>
これらの DLL は、システムの
<simpara>
対応する拡張モジュールのファイルが
<link linkend="ini.extension-dir">extension_dir</link>
になければなりません。
</para>
</simpara>
</step>
</procedure>
<note>
Expand Down
13 changes: 12 additions & 1 deletion reference/pdo/pdo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 603435cd84951fc720eded819c62ef2466d21b5c Maintainer: shimooka Status: ready -->
<!-- EN-Revision: e16d04c436e9801627139c67c1cabcb92b469ccc Maintainer: shimooka Status: ready -->
<!-- CREDITS: hirokawa,takagi -->
<reference xml:id="class.pdo" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>PDO クラス</title>
Expand Down Expand Up @@ -494,6 +494,17 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
<classname>PDO</classname> クラスのドライバ固有の定数が非推奨になりました。
代わりに、ドライバ固有のサブクラス
(<classname>Pdo\Dblib</classname>,
<classname>Pdo\Firebird</classname>, <classname>Pdo\Mysql</classname>,
<classname>Pdo\Odbc</classname>, <classname>Pdo\Pgsql</classname>,
<classname>Pdo\Sqlite</classname>) にある同等の定数を使用してください。
</entry>
</row>
<row>
<entry>8.4.0</entry>
<entry>
Expand Down
36 changes: 32 additions & 4 deletions reference/pdo/pdo/construct.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 7dd805d34addc6e98afaa0b3851c8656afbec9b6 Maintainer: takagi Status: ready -->
<!-- EN-Revision: e16d04c436e9801627139c67c1cabcb92b469ccc Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,shimooka,mumumu -->
<refentry xml:id="pdo.construct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -60,6 +60,12 @@
この URI には、ローカルファイルまたはリモート URL を指定することができます。
</para>
<para><userinput>uri:file:///path/to/dsnfile</userinput></para>
<warning>
<simpara>
<userinput>uri:</userinput> DSN スキームは、リモート URI から取得した
DSN にセキュリティ上の懸念があるため、PHP 8.5.0 以降は非推奨です。
</simpara>
</warning>
</listitem>
</varlistentry>
<varlistentry><term>エイリアス</term>
Expand Down Expand Up @@ -111,11 +117,33 @@

<refsect1 role="errors">
&reftitle.errors;
<para>
<simpara>
指定されたデータベースへの接続に失敗した場合、
<constant>PDO::ATTR_ERRMODE</constant> が設定されているかどうかに関わらず、
<classname>PDOException</classname> をスローします。
</para>
<exceptionname>PDOException</exceptionname> をスローします。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
<userinput>uri:</userinput> DSN スキームは非推奨になりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
Expand Down
28 changes: 27 additions & 1 deletion reference/pdo/pdo/quote.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision$ -->
<!-- EN-Revision: 1cc1b815cd0a2a579fb79bc2ab0c1202574696bc Maintainer: takagi Status: ready -->
<!-- EN-Revision: eff8e0d4dd463ae6bd387f304effeaf3d5ce44d5 Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="pdo.quote" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -88,6 +88,32 @@
</refsect1>


<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
SQLite ドライバを使用している場合、<parameter>string</parameter>
に null バイトが含まれていると、エラーモードに応じて
<exceptionname>PDOException</exceptionname> がスローされるか、
警告が発生するようになりました。これより前のバージョンでは、
文字列は null バイトの位置で黙って切り詰められていました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down
13 changes: 12 additions & 1 deletion reference/pdo/pdostatement/fetchall.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1cc1b815cd0a2a579fb79bc2ab0c1202574696bc Maintainer: takagi Status: ready -->
<!-- EN-Revision: e16d04c436e9801627139c67c1cabcb92b469ccc Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="pdostatement.fetchall" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -156,6 +156,17 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
<constant>PDO::FETCH_INTO</constant> をフェッチモードとして使うと、
<constant>PDO::FETCH_LAZY</constant> と同様に
<exceptionname>ValueError</exceptionname> をスローするようになりました。
<constant>PDO::FETCH_CLASS</constant> 以外のフェッチモードと一緒に
<constant>PDO::FETCH_PROPS_LATE</constant> を使った場合も、
<exceptionname>ValueError</exceptionname> をスローするようになりました。
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
Expand Down
35 changes: 34 additions & 1 deletion reference/pdo/pdostatement/setattribute.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision$ -->
<!-- EN-Revision: 1cc1b815cd0a2a579fb79bc2ab0c1202574696bc Maintainer: takagi Status: ready -->
<!-- EN-Revision: e16d04c436e9801627139c67c1cabcb92b469ccc Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="pdostatement.setattribute" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -66,6 +66,39 @@
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
PHP 8.5.0 以降、Firebird ドライバを使用している場合、
<constant>PDO::ATTR_CURSOR_NAME</constant> で設定したカーソル名が長すぎると
<exceptionname>ValueError</exceptionname> がスローされます。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
Firebird ドライバを使用している場合、
<constant>PDO::ATTR_CURSOR_NAME</constant> で設定したカーソル名が長すぎると
<exceptionname>ValueError</exceptionname> がスローされるようになりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
36 changes: 35 additions & 1 deletion reference/pdo/pdostatement/setfetchmode.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision$ -->
<!-- EN-Revision: c62ef37e0d58067b393a6cf3a14aefed90bc0bff Maintainer: takagi Status: ready -->
<!-- EN-Revision: e16d04c436e9801627139c67c1cabcb92b469ccc Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<refentry xml:id="pdostatement.setfetchmode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -70,6 +70,9 @@
<listitem>
<simpara>
コンストラクタの引数。
PHP 8.5.0 以降、文字列のキーは名前付き引数のように振る舞います。
変数をリファレンス渡しするには、配列の要素にリファレンスを代入します:
<code>$constructorArgs = [&amp;$valByRef]</code>。
</simpara>
</listitem>
</varlistentry>
Expand All @@ -92,6 +95,17 @@
</simpara>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
PHP 8.5.0 以降、<methodname>PDOStatement::fetch</methodname>,
<methodname>PDOStatement::fetchObject</methodname>,
<methodname>PDOStatement::fetchAll</methodname> の呼び出し中に
このメソッドを呼び出すと、<exceptionname>Error</exceptionname>
がスローされます。
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand All @@ -103,6 +117,26 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
<constant>PDO::FETCH_CLASS</constant> の
<parameter>constructorArgs</parameter> が、CUFA
(<function>call_user_func_array</function>) の規約に従うようになりました。
つまり、文字列のキーは名前付き引数のように振る舞い、
リファレンス渡しのパラメータに渡される値渡し引数の自動ラップが廃止されました。
</entry>
</row>
<row>
<entry>8.5.0</entry>
<entry>
<methodname>PDOStatement::fetch</methodname>,
<methodname>PDOStatement::fetchObject</methodname>,
<methodname>PDOStatement::fetchAll</methodname> の呼び出し中に
このメソッドを呼び出すと、<exceptionname>Error</exceptionname>
がスローされるようになりました。
</entry>
</row>
&return.type.true.84;
</tbody>
</tgroup>
Expand Down
22 changes: 21 additions & 1 deletion reference/pdo_mysql/reference.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 3c1bec9d700807df36994cf368ba291214cd424d Maintainer: takagi Status: ready -->
<!-- EN-Revision: 57a2f4c34cc3c74a7040282dcd60b906738a523d Maintainer: takagi Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<reference xml:id="ref.pdo-mysql" xmlns="http://docbook.org/ns/docbook">
<?phpdoc extension-membership="bundledexternal" ?>
Expand Down Expand Up @@ -115,6 +115,26 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>user</literal></term>
<listitem>
<simpara>
接続に使うユーザー名を指定します。
<classname>PDO</classname> のコンストラクタの 2 番目の引数にユーザー名を渡すと、
DSN で指定したものよりも優先されます。
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>password</literal></term>
<listitem>
<simpara>
接続に使うユーザーのパスワードを指定します。
<classname>PDO</classname> のコンストラクタの 3 番目の引数にパスワードを渡すと、
DSN で指定したものよりも優先されます。
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>unix_socket</literal></term>
<listitem>
Expand Down
9 changes: 5 additions & 4 deletions reference/pdo_sqlite/configure.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 859713422861ee5d25d5e8504928a4af9ce198ad Maintainer: takagi Status: ready -->
<!-- EN-Revision: eff8e0d4dd463ae6bd387f304effeaf3d5ce44d5 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<section xml:id="ref.pdo-sqlite.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.install;
<para>
<simpara>
PDO_SQLITE PDO ドライバはデフォルトで有効になります。無効にするには
<option role="configure">--without-pdo-sqlite[=DIR]</option> を使います。
オプションの <literal>[=DIR]</literal> は sqlite の基底インストールディレクトリです。
PHP 7.4.0 以降では、<link xlink:href="&url.sqlite;">libsqlite</link> ≥ 3.5.0 が必須です。
それより前のバージョンでは、<literal>[=DIR]</literal> が省略された場合は
PHP 8.5.0 以降では、libsqlite ≥ 3.7.17 が必須です。
PHP 7.4.0 より前のバージョンでは、<literal>[=DIR]</literal> が省略された場合は
バンドル済みの libsqlite が代わりに使われていましたし、
またそれがデフォルトでした。
</para>
</simpara>
<note>
<title>PHP 7.4.0 以降の、Windows における追加セットアップ</title>
<para>
Expand Down
Loading
Loading