com doc/ja: Improve libxml_disable_entity_loader() docs: reference/libxml/functions/libxml-disable-entity-load er.xml

[email protected] (Yoshinari Takaoka) Tue, 19 Jan 2021 21:44:54 +0000
Newsgroups php.doc.ja
Message-ID <[email protected]>
Commit:    6e0c4b33a21c04abc840d27aa21d637d951cee75
Author:    Yoshinari Takaoka <[email protected]>         Wed, 20 Jan 2021 06:44:54 +0900
Parents:   27cffaedfba6709789023733edd8660fc94544f0
Branches:  master

Link:       http://git.php.net/?p=doc/ja.git;a=commitdiff;h=6e0c4b33a21c04abc840d27aa21d637d951cee75

Log:
Improve libxml_disable_entity_loader() docs

We clarify that `libxml_set_external_entity_loader()` is the preferred
alternative, and also note that the function is deprecated as of PHP
8.0.0.

Changed paths:
  M  reference/libxml/functions/libxml-disable-entity-loader.xml


Diff:
diff --git a/reference/libxml/functions/libxml-disable-entity-loader.xml b/reference/libxml/functions/libxml-disable-entity-loader.xml
index c6da6fbe98..8129353f83 100644
--- a/reference/libxml/functions/libxml-disable-entity-loader.xml
+++ b/reference/libxml/functions/libxml-disable-entity-loader.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: a07808fdd74a7ebda792e77c4c7b377e6d44f26a Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 5b5bb5d9b3eb2301f2ada74817421e40ae3a1752 Maintainer: takagi Status: ready -->
 <!-- Credits: mumumu -->
 
 <refentry xml:id="function.libxml-disable-entity-loader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -9,6 +9,10 @@
   <refpurpose>外部エンティティの読み込み機能を無効にする</refpurpose>
  </refnamediv>
 
+ <refsynopsisdiv>
+   &warn.deprecated.function-8-0-0;
+ </refsynopsisdiv>
+
  <refsect1 role="description">
   &reftitle.description;
   <methodsynopsis>
@@ -20,7 +24,10 @@
    外部エンティティの読み込みを無効にすると、
    XML文書を読み込む際に問題が起こる可能性があることに注意して下さい。
    しかし、libxml 2.9.0 以降では、エンティティの置換はデフォルトで無効になっているため、
+   <constant>LIBXML_NOENT</constant> を使って内部エンティティの参照を解決する必要がない限り、
    外部エンティティの読み込みを無効にする必要はありません。
+   一般的には、外部エンティティの読み込みを抑制するのであれば、
+   <function>libxml_set_external_entity_loader</function> を使うことが望ましいです。
   </para>
  </refsect1>
 
@@ -94,6 +101,7 @@
   <para>
    <simplelist>
     <member><function>libxml_use_internal_errors</function></member>
+    <member><function>libxml_set_external_entity_loader</function></member>
     <member><link linkend="libxml.constants"><constant>LIBXML_NONET</constant> 定数</link></member>
    </simplelist>
   </para>