[doc-en] master: fileinfo: fix XML by converting para to simpara tags via script (#5139)

From: Date: Sun, 18 Jan 2026 21:54:18 +0000
Subject: [doc-en] master: fileinfo: fix XML by converting para to simpara tags via script (#5139)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22995@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-01-18T21:54:16Z Commit: https://github.com/php/doc-en/commit/82ddd2ec8ad195035dcb57dd8f97d27b83ddc126 Raw diff: https://github.com/php/doc-en/commit/82ddd2ec8ad195035dcb57dd8f97d27b83ddc126.diff fileinfo: fix XML by converting para to simpara tags via script (#5139) Changed paths: M reference/fileinfo/book.xml M reference/fileinfo/configure.xml M reference/fileinfo/finfo.xml M reference/fileinfo/finfo/buffer.xml M reference/fileinfo/finfo/construct.xml M reference/fileinfo/finfo/file.xml M reference/fileinfo/finfo/set-flags.xml M reference/fileinfo/functions/finfo-buffer.xml M reference/fileinfo/functions/finfo-close.xml M reference/fileinfo/functions/finfo-file.xml M reference/fileinfo/functions/finfo-open.xml M reference/fileinfo/functions/finfo-set-flags.xml M reference/fileinfo/functions/mime-content-type.xml M reference/fileinfo/setup.xml Diff: diff --git a/reference/fileinfo/book.xml b/reference/fileinfo/book.xml index bd5b79c1bb93..166dc8514581 100644 --- a/reference/fileinfo/book.xml +++ b/reference/fileinfo/book.xml @@ -1,31 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<book xml:id="book.fileinfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="book.fileinfo"> <?phpdoc extension-membership="bundled" ?> <title>File Information</title> <titleabbrev>Fileinfo</titleabbrev> - + <!-- {{{ preface --> <preface xml:id="intro.fileinfo"> &reftitle.intro; - <para> + <simpara> The functions in this module try to guess the content type - and encoding of a file by looking for certain + and encoding of a file by looking for certain <emphasis>magic</emphasis> byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job. - </para> + </simpara> </preface> <!-- }}} --> - + &reference.fileinfo.setup; &reference.fileinfo.constants; &reference.fileinfo.reference; &reference.fileinfo.finfo; </book> - <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -46,4 +44,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - diff --git a/reference/fileinfo/configure.xml b/reference/fileinfo/configure.xml index eb2e87516ad1..13d3eeff83ee 100644 --- a/reference/fileinfo/configure.xml +++ b/reference/fileinfo/configure.xml @@ -1,21 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<section xml:id="fileinfo.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="fileinfo.installation"> &reftitle.install; - <para> + <simpara> This extension is enabled by default. - </para> - <para> + </simpara> + <simpara> Windows users must include the bundled <filename>php_fileinfo.dll</filename> <acronym>DLL</acronym> file in &php.ini; to enable this extension. - </para> - <para> + </simpara> + <simpara> The libmagic library is bundled with PHP, but includes PHP specific changes. A patch against libmagic named <filename>libmagic.patch</filename> is maintained and may be found within the PHP fileinfo extensions source. - </para> + </simpara> </section> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/fileinfo/finfo.xml b/reference/fileinfo/finfo.xml index c846da66ec3a..8c71f2a5ecda 100644 --- a/reference/fileinfo/finfo.xml +++ b/reference/fileinfo/finfo.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<reference xml:id="class.finfo" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> +<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.finfo" role="class"> <title>The finfo class</title> <titleabbrev>finfo</titleabbrev> @@ -10,10 +10,10 @@ <!-- {{{ finfo intro --> <section xml:id="finfo.intro"> &reftitle.intro; - <para> + <simpara> This class provides an object-oriented interface into the fileinfo functions. - </para> + </simpara> </section> <!-- }}} --> diff --git a/reference/fileinfo/finfo/buffer.xml b/reference/fileinfo/finfo/buffer.xml index 5f329f5ae4ad..fd096691d8e6 100644 --- a/reference/fileinfo/finfo/buffer.xml +++ b/reference/fileinfo/finfo/buffer.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="finfo.buffer" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="finfo.buffer"> <refnamediv> <refname>finfo::buffer</refname> <refpurpose>&Alias; <link linkend="function.finfo-buffer">finfo_buffer()</link></refpurpose> @@ -14,9 +14,9 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para> + <simpara> &info.function.alias; <link linkend="function.finfo-buffer">finfo_buffer()</link> - </para> + </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/fileinfo/finfo/construct.xml b/reference/fileinfo/finfo/construct.xml index 4c707f99807f..aefea0a978ed 100644 --- a/reference/fileinfo/finfo/construct.xml +++ b/reference/fileinfo/finfo/construct.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="finfo.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="finfo.construct"> <refnamediv> <refname>finfo::__construct</refname> <refpurpose>&Alias; <function>finfo_open</function></refpurpose> @@ -13,9 +13,9 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>magic_database</parameter><initializer>&null;</initializer></methodparam> </constructorsynopsis> - <para> + <simpara> &info.function.alias; <function>finfo_open</function> - </para> + </simpara> </refsect1> <refsect1 role="changelog"> diff --git a/reference/fileinfo/finfo/file.xml b/reference/fileinfo/finfo/file.xml index d2ba37439449..1e3fc08aa9db 100644 --- a/reference/fileinfo/finfo/file.xml +++ b/reference/fileinfo/finfo/file.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="finfo.file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="finfo.file"> <refnamediv> <refname>finfo::file</refname> <refpurpose>&Alias; <link linkend="function.finfo-file">finfo_file()</link></refpurpose> @@ -14,9 +14,9 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para> + <simpara> &info.function.alias; <link linkend="function.finfo-file">finfo_file()</link> - </para> + </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/fileinfo/finfo/set-flags.xml b/reference/fileinfo/finfo/set-flags.xml index 626256d82af7..be0cbccdd34d 100644 --- a/reference/fileinfo/finfo/set-flags.xml +++ b/reference/fileinfo/finfo/set-flags.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="finfo.set-flags" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="finfo.set-flags"> <refnamediv> <refname>finfo::set_flags</refname> <refpurpose>&Alias; <link linkend="function.finfo-set-flags">finfo_set_flags()</link></refpurpose> @@ -12,9 +12,9 @@ <modifier>public</modifier> <type>true</type><methodname>finfo::set_flags</methodname> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> - <para> + <simpara> &info.function.alias; <link linkend="function.finfo-set-flags">finfo_set_flags()</link> - </para> + </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file diff --git a/reference/fileinfo/functions/finfo-buffer.xml b/reference/fileinfo/functions/finfo-buffer.xml index c52d78581771..3c5e3d81dd75 100644 --- a/reference/fileinfo/functions/finfo-buffer.xml +++ b/reference/fileinfo/functions/finfo-buffer.xml @@ -9,7 +9,7 @@ </refnamediv> <refsect1 role="description"> &reftitle.description; - <para>&style.procedural;</para> + <simpara>&style.procedural;</simpara> <methodsynopsis> <type class="union"><type>string</type><type>false</type></type><methodname>finfo_buffer</methodname> <methodparam><type>finfo</type><parameter>finfo</parameter></methodparam> @@ -17,7 +17,7 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para>&style.oop;</para> + <simpara>&style.oop;</simpara> <methodsynopsis role="finfo"> <modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::buffer</methodname> <methodparam><type>string</type><parameter>string</parameter></methodparam> @@ -25,9 +25,9 @@ <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para> + <simpara> This function is used to get information about binary data in a string. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -42,35 +42,35 @@ <varlistentry> <term><parameter>string</parameter></term> <listitem> - <para> + <simpara> Content of a file to be checked. - </para> + </simpara> </listitem> </varlistentry> <varlistentry> <term><parameter>flags</parameter></term> <listitem> - <para> + <simpara> One or disjunction of more <link linkend="fileinfo.constants">Fileinfo constants</link>. - </para> + </simpara> </listitem> </varlistentry> <varlistentry> <term><parameter>context</parameter></term> <listitem> - <para> - </para> + <simpara> + </simpara> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> Returns a textual description of the <parameter>string</parameter> argument, or &false; if an error occurred. - </para> + </simpara> </refsect1> <refsect1 role="changelog"> diff --git a/reference/fileinfo/functions/finfo-close.xml b/reference/fileinfo/functions/finfo-close.xml index c2fbdf766e94..68078602f3bb 100644 --- a/reference/fileinfo/functions/finfo-close.xml +++ b/reference/fileinfo/functions/finfo-close.xml @@ -17,9 +17,9 @@ <methodparam><type>finfo</type><parameter>finfo</parameter></methodparam> </methodsynopsis> - <para> + <simpara> This function closes the instance opened by <function>finfo_open</function>. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -35,9 +35,9 @@ </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> &return.success; - </para> + </simpara> </refsect1> <refsect1 role="changelog"> diff --git a/reference/fileinfo/functions/finfo-file.xml b/reference/fileinfo/functions/finfo-file.xml index 366fe3f11a71..09c2172557c6 100644 --- a/reference/fileinfo/functions/finfo-file.xml +++ b/reference/fileinfo/functions/finfo-file.xml @@ -9,7 +9,7 @@ </refnamediv> <refsect1 role="description"> &reftitle.description; - <para>&style.procedural;</para> + <simpara>&style.procedural;</simpara> <methodsynopsis> <type class="union"><type>string</type><type>false</type></type><methodname>finfo_file</methodname> <methodparam><type>finfo</type><parameter>finfo</parameter></methodparam> @@ -17,7 +17,7 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para>&style.oop;</para> + <simpara>&style.oop;</simpara> <methodsynopsis role="finfo"> <modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -25,9 +25,9 @@ <methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para> + <simpara> This function is used to get information about a file. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -42,36 +42,36 @@ <varlistentry> <term><parameter>filename</parameter></term> <listitem> - <para> + <simpara> Name of a file to be checked. - </para> + </simpara> </listitem> </varlistentry> <varlistentry> <term><parameter>flags</parameter></term> <listitem> - <para> + <simpara> One or disjunction of more <link linkend="fileinfo.constants">Fileinfo constants</link>. - </para> + </simpara> </listitem> </varlistentry> <varlistentry> <term><parameter>context</parameter></term> <listitem> - <para> + <simpara> For a description of <literal>contexts</literal>, refer to <xref linkend="ref.stream"/>. - </para> + </simpara> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> Returns a textual description of the contents of the <parameter>filename</parameter> argument, or &false; if an error occurred. - </para> + </simpara> </refsect1> <refsect1 role="changelog"> diff --git a/reference/fileinfo/functions/finfo-open.xml b/reference/fileinfo/functions/finfo-open.xml index 5d72a585f86e..50f4119adef4 100644 --- a/reference/fileinfo/functions/finfo-open.xml +++ b/reference/fileinfo/functions/finfo-open.xml @@ -9,21 +9,21 @@ <refsect1 role="description"> &reftitle.description; - <para>&style.procedural;</para> + <simpara>&style.procedural;</simpara> <methodsynopsis> <type class="union"><type>finfo</type><type>false</type></type><methodname>finfo_open</methodname> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>magic_database</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> - <para>&style.oop; (constructor):</para> + <simpara>&style.oop; (constructor):</simpara> <constructorsynopsis role="finfo"> <modifier>public</modifier> <methodname>finfo::__construct</methodname> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>magic_database</parameter><initializer>&null;</initializer></methodparam> </constructorsynopsis> - <para> + <simpara> This function opens a magic database and returns its instance. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -32,26 +32,26 @@ <varlistentry> <term><parameter>flags</parameter></term> <listitem> - <para> + <simpara> One or disjunction of more <link linkend="fileinfo.constants">Fileinfo constants</link>. - </para> + </simpara> </listitem> </varlistentry> <varlistentry> <term><parameter>magic_database</parameter></term> <listitem> - <para> + <simpara> Name of a magic database file, usually something like <filename>/path/to/magic.mime</filename>. If not specified, the <literal>MAGIC</literal> environment variable is used. If the environment variable isn't set, then PHP's bundled magic database will be used. - </para> - <para> + </simpara> + <simpara> Passing &null; or an empty string will be equivalent to the default value. - </para> + </simpara> </listitem> </varlistentry> </variablelist> @@ -59,10 +59,10 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> (Procedural style only) Returns an <classname>finfo</classname> instance on success,&return.falseforfailure;. - </para> + </simpara> </refsect1> <refsect1 role="changelog"> @@ -144,12 +144,12 @@ text/plain; charset=us-ascii <refsect1 role="notes"> &reftitle.notes; <note> - <para> + <simpara> Generally, using the bundled magic database (by leaving <parameter>magic_database</parameter> and the <literal>MAGIC</literal> environment variables unset) is the best course of action unless you specifically need a custom magic database. - </para> + </simpara> </note> </refsect1> diff --git a/reference/fileinfo/functions/finfo-set-flags.xml b/reference/fileinfo/functions/finfo-set-flags.xml index 13424f30f729..3df90cc365fd 100644 --- a/reference/fileinfo/functions/finfo-set-flags.xml +++ b/reference/fileinfo/functions/finfo-set-flags.xml @@ -9,22 +9,22 @@ </refnamediv> <refsect1 role="description"> &reftitle.description; - <para>&style.procedural;</para> + <simpara>&style.procedural;</simpara> <methodsynopsis> <type>true</type><methodname>finfo_set_flags</methodname> <methodparam><type>finfo</type><parameter>finfo</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> - <para>&style.oop;</para> + <simpara>&style.oop;</simpara> <methodsynopsis role="finfo"> <modifier>public</modifier> <type>true</type><methodname>finfo::set_flags</methodname> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> - <para> + <simpara> This function sets various Fileinfo options. Options can be set also directly in <function>finfo_open</function> or other Fileinfo functions. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -39,19 +39,19 @@ <varlistentry> <term><parameter>flags</parameter></term> <listitem> - <para> + <simpara> One or disjunction of more <link linkend="fileinfo.constants">Fileinfo constants</link>. - </para> + </simpara> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> &return.true.always; - </para> + </simpara> </refsect1> <refsect1 role="changelog"> diff --git a/reference/fileinfo/functions/mime-content-type.xml b/reference/fileinfo/functions/mime-content-type.xml index ab4a9b4a37e4..d0c650bce559 100644 --- a/reference/fileinfo/functions/mime-content-type.xml +++ b/reference/fileinfo/functions/mime-content-type.xml @@ -12,10 +12,10 @@ <type class="union"><type>string</type><type>false</type></type><methodname>mime_content_type</methodname> <methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>filename</parameter></methodparam> </methodsynopsis> - <para> + <simpara> Returns the MIME content type for a file as determined by using information from the <filename>magic.mime</filename> file. - </para> + </simpara> </refsect1> <refsect1 role="parameters"> @@ -24,9 +24,9 @@ <varlistentry> <term><parameter>filename</parameter></term> <listitem> - <para> + <simpara> Path to the tested file. - </para> + </simpara> </listitem> </varlistentry> </variablelist> @@ -34,11 +34,11 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> + <simpara> Returns the content type in MIME format, like <literal>text/plain</literal> or <literal>application/octet-stream</literal>, &return.falseforfailure;. - </para> + </simpara> </refsect1> <refsect1 role="errors"> diff --git a/reference/fileinfo/setup.xml b/reference/fileinfo/setup.xml index 707e075a0fdd..ea62ce48ca62 100644 --- a/reference/fileinfo/setup.xml +++ b/reference/fileinfo/setup.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<chapter xml:id="fileinfo.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="fileinfo.setup"> &reftitle.setup; <!-- {{{ Installation --> @@ -11,15 +10,14 @@ <!-- {{{ Resources --> <section xml:id="fileinfo.resources"> &reftitle.resources; - <para> + <simpara> Prior to PHP 8.1.0, there was one resource used in the Fileinfo extension: a magic database descriptor returned by <function>finfo_open</function>. - </para> + </simpara> </section> <!-- }}} --> </chapter> - <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -40,4 +38,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -

« previous php.doc.cvs (#22995) next »