[DOC-CVS] [doc-en] master: Optimize swoole docs (#4666)

[email protected] (MARiA so cute via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: MARiA so cute (NathanFreeman)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2025-05-11T16:21:10+08:00

Commit: https://github.com/php/doc-en/commit/d4854f421c5fd866635953930a65e80726ceddd0
Raw diff: https://github.com/php/doc-en/commit/d4854f421c5fd866635953930a65e80726ceddd0.diff

Optimize swoole docs (#4666)

Changed paths:
  M  reference/swoole/book.xml
  M  reference/swoole/ini.xml
  M  reference/swoole/setup.xml


Diff:

diff --git a/reference/swoole/book.xml b/reference/swoole/book.xml
index fa6bf65e85ac..c91dba43c695 100644
--- a/reference/swoole/book.xml
+++ b/reference/swoole/book.xml
@@ -10,10 +10,11 @@
  <preface xml:id="intro.swoole">
   &reftitle.intro;
   <para>
-   Swoole is a high-performance networking framework using 
-   an event-driven, asynchronous, non-blocking I/O model. 
-   It can be used to develop high-performance, scalable, 
-   concurrent TCP, UDP, Unix socket, HTTP, Websocket services.
+   Swoole is a parallel network communication engine based on asynchronous event-driven and coroutine,
+   written in C++, providing coroutine and high-performance network programming support for PHP.
+   It provides various network server and client modules for multiple communication protocols, making it easy to
+   quickly implement TCP/UDP services, high-performance Web, WebSocket services, IoT, real-time communication, games,
+   microservices, etc., breaking the limits of PHP in traditional web domains.
 
    To get started, please check the <link
     xlink:href="&url.swoole.docs;">Swoole Docs</link>.
diff --git a/reference/swoole/ini.xml b/reference/swoole/ini.xml
index 1676073f4b85..545f63cde143 100644
--- a/reference/swoole/ini.xml
+++ b/reference/swoole/ini.xml
@@ -18,58 +18,40 @@
     </thead>
     <tbody>
      <row>
-      <entry><link linkend="ini.swoole.aio-thread-num">swoole.aio_thread_num</link></entry>
-      <entry>2</entry>
-      <entry><constant>INI_ALL</constant></entry>
-      <entry><!-- leave empty, this will be filled by an automatic script --></entry>
-     </row>
-     <row>
-      <entry><link linkend="ini.swoole.display-errors">swoole.display_errors</link></entry>
+      <entry><link linkend="ini.swoole.enable-library">swoole.enable_library</link></entry>
       <entry>On</entry>
       <entry><constant>INI_ALL</constant></entry>
       <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
      <row>
-      <entry><link linkend="ini.swoole.fast-serialize">swoole.fast_serialize</link></entry>
+      <entry><link linkend="ini.swoole.enable-fiber-mock">swoole.enable_fiber_mock</link></entry>
       <entry>Off</entry>
       <entry><constant>INI_ALL</constant></entry>
       <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
      <row>
-      <entry><link linkend="ini.swoole.unixsock-buffer-size">swoole.unixsock_buffer_size</link></entry>
-      <entry>8388608</entry>
+      <entry><link linkend="ini.swoole.enable-preemptive-scheduler">swoole.enable_preemptive_scheduler</link></entry>
+      <entry>Off</entry>
       <entry><constant>INI_ALL</constant></entry>
       <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
      <row>
-      <entry><link linkend="ini.swoole.use-namespace">swoole.use_namespace</link></entry>
-      <entry>On</entry>
-      <entry><constant>INI_SYSTEM</constant></entry>
-      <entry><!-- leave empty, this will be filled by an automatic script --></entry>
-     </row>
-     <row>
-      <entry><link linkend="ini.swoole.enable-coroutine">swoole.enable_coroutine</link></entry>
+      <entry><link linkend="ini.swoole.display-errors">swoole.display_errors</link></entry>
       <entry>On</entry>
       <entry><constant>INI_ALL</constant></entry>
-      <entry>Available as of swoole 4.0.0</entry>
+      <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
      <row>
       <entry><link linkend="ini.swoole.use-shortname">swoole.use_shortname</link></entry>
       <entry>On</entry>
-      <entry><constant>INI_ALL</constant></entry>
-      <entry>Available as of swoole 4.0.0</entry>
-     </row>
-     <row>
-      <entry><link linkend="ini.swoole.enable-preemptive-scheduler">swoole.enable_preemptive_scheduler</link></entry>
-      <entry>Off</entry>
-      <entry><constant>INI_ALL</constant></entry>
-      <entry>Available as of swoole 4.4.0</entry>
+      <entry><constant>INI_SYSTEM</constant></entry>
+      <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
      <row>
-      <entry><link linkend="ini.swoole.enable-library">swoole.enable_library</link></entry>
-      <entry>On</entry>
+      <entry><link linkend="ini.swoole.unixsock-buffer-size">swoole.unixsock_buffer_size</link></entry>
+      <entry>8388608</entry>
       <entry><constant>INI_ALL</constant></entry>
-      <entry>Available as of swoole 4.0.0</entry>
+      <entry><!-- leave empty, this will be filled by an automatic script --></entry>
      </row>
     </tbody>
    </tgroup>
@@ -80,80 +62,25 @@
 
  <para>
   <variablelist>
-   <varlistentry xml:id="ini.swoole.aio-thread-num">
-     <term>
-      <parameter>swoole.aio_thread_num</parameter>
-      <type>int</type>
-     </term>
-     <listitem>
-      <para>
-       POSIX asynchronous I/O thread number
-      </para>
-     </listitem>
-    </varlistentry>
-    <varlistentry xml:id="ini.swoole.display-errors">
-     <term>
-      <parameter>swoole.display_errors</parameter>
-      <type>string</type>
-     </term>
-     <listitem>
-      <para>
-        This determines whether Swoole errors should be printed to the screen.
-      </para>
-     </listitem>
-    </varlistentry>
-    <varlistentry xml:id="ini.swoole.fast-serialize">
-     <term>
-      <parameter>swoole.fast_serialize</parameter>
-      <type>string</type>
-     </term>
-     <listitem>
-      <para>
-        Whether to enable Swoole fast_serialize.
-      </para>
-     </listitem>
-    </varlistentry>
-    <varlistentry xml:id="ini.swoole.unixsock-buffer-size">
-     <term>
-      <parameter>swoole.unixsock_buffer_size</parameter>
-      <type>int</type>
-     </term>
-     <listitem>
-      <para>
-       Buffer size of Unix socket.
-      </para>
-     </listitem>
-    </varlistentry>
-    <varlistentry xml:id="ini.swoole.use-namespace">
-     <term>
-      <parameter>swoole.use_namespace</parameter>
-      <type>string</type>
-     </term>
-     <listitem>
-      <para>
-        Whether to use PHP namespaces
-      </para>
-     </listitem>
-    </varlistentry>
-   <varlistentry xml:id="ini.swoole.enable-coroutine">
+   <varlistentry xml:id="ini.swoole.enable-library">
     <term>
-     <parameter>swoole.enable_coroutine</parameter>
+     <parameter>swoole.enable_library</parameter>
      <type>string</type>
     </term>
     <listitem>
      <para>
-      Whether to enable coroutine
+      Enable/disable the extension's built-in library.
      </para>
     </listitem>
    </varlistentry>
-   <varlistentry xml:id="ini.swoole.use-shortname">
+   <varlistentry xml:id="ini.swoole.enable-fiber-mock">
     <term>
-     <parameter>swoole.use_shortname</parameter>
+     <parameter>swoole.enable_fiber_mock</parameter>
      <type>string</type>
     </term>
     <listitem>
      <para>
-      Whether to enable short aliases
+      Enable/disable use the xdebug extension to debug Swoole programs.
      </para>
     </listitem>
    </varlistentry>
@@ -164,22 +91,43 @@
     </term>
     <listitem>
      <para>
-      Whether to enable preemptive scheduler
+      Prevent some coroutines from consuming CPU time for too long in a tight loop (10ms of CPU time), preventing other coroutines from getting scheduled.
      </para>
     </listitem>
    </varlistentry>
-   <varlistentry xml:id="ini.swoole.enable-library">
+   <varlistentry xml:id="ini.swoole.display-errors">
     <term>
-     <parameter>swoole.enable_library</parameter>
+     <parameter>swoole.display_errors</parameter>
      <type>string</type>
     </term>
     <listitem>
      <para>
-      Whether to enable library
+      Enable/disable displaying Swoole error messages.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry xml:id="ini.swoole.use-shortname">
+    <term>
+     <parameter>swoole.use_shortname</parameter>
+     <type>string</type>
+    </term>
+    <listitem>
+     <para>
+      Enable/disable short aliases.
+     </para>
+    </listitem>
+   </varlistentry>
+   <varlistentry xml:id="ini.swoole.unixsock-buffer-size">
+    <term>
+     <parameter>swoole.unixsock_buffer_size</parameter>
+     <type>int</type>
+    </term>
+    <listitem>
+     <para>
+      Set the size of the Socket buffer for inter-process communication.
      </para>
     </listitem>
    </varlistentry>
-
   </variablelist>
  </para>
 </section>
diff --git a/reference/swoole/setup.xml b/reference/swoole/setup.xml
index 34ab8eb6f3db..78b1e18d8196 100644
--- a/reference/swoole/setup.xml
+++ b/reference/swoole/setup.xml
@@ -4,6 +4,41 @@
 <chapter xml:id="swoole.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
  &reftitle.setup;
 
+ <section xml:id="swoole.requirements">
+  &reftitle.required;
+  <para>
+   Swoole requires the libbrotli library.
+  </para>
+  <para>
+   Enabling --enable-swoole-curl option requires the libcurl library, and both PHP and Swoole must link to the
+   same libcurl shared library and headers to avoid undefined behavior.
+  </para>
+  <para>
+   Enabling --enable-iouring option requires liburing library (version >= 2.0) and Linux kernel (version >= 5.12).
+  </para>
+  <para>
+   Enabling --enable-swoole-thread option requires PHP to be in ZTS (Zend Thread Safety) mode.
+  </para>
+  <para>
+   Enabling the --enable-cares option requires the libc-ares library.
+  </para>
+  <para>
+   Enabling the --enable-zstd option requires the libzstd library (version >= 1.4.0).
+  </para>
+  <para>
+   Enabling the --enable-swoole-sqlite option requires the libsqlite library.
+  </para>
+  <para>
+   Enabling the --enable-swoole-pgsql option requires the libpq library.
+  </para>
+  <para>
+   Enabling the --with-swoole-odbc option requires the unixodbc-dev library.
+  </para>
+  <para>
+   Enabling the --with-swoole-oracle option requires the Oracle Instant Client libraries.
+  </para>
+ </section>
+
  <!-- {{{ Installation -->
  &reference.swoole.configure;
  <!-- }}} -->
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.