Skip to content

Commit 14fbc55

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 4b5d91d + 1ff3e2b commit 14fbc55

File tree

3 files changed

+26
-32
lines changed

3 files changed

+26
-32
lines changed

cmake/ext/mysqlnd/CMakeLists.txt

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ Enable compressed protocol support in mysqlnd.
2929
3030
## PHP_EXT_MYSQLND_SSL
3131
32-
* Default: `OFF`
32+
* Default: `ON`
3333
* Values: `ON|OFF`
3434
35-
Explicitly enable extended SSL support in the `mysqlnd` extension. On \*nix
36-
systems, extended SSL works through the OpenSSL library and on Windows through
37-
the Windows Crypt32 library. Beneficial when building without the `openssl`
38-
extension or when building with phpize.
35+
Explicitly enable or disable extended SSL support in the `mysqlnd` extension. On
36+
\*nix systems, the extended SSL works through the OpenSSL library and on Windows
37+
through the Windows Crypt32 library.
3938
40-
\*nix systems: when building with the `openssl` extension (`PHP_EXT_OPENSSL=ON`)
41-
in the php-src tree, the extended SSL is enabled implicitly regardless of this
42-
option.
39+
For example, `mysqlnd` extension with disabled extended SSL support, would
40+
require in MySQL Server 8.0 and later versions to have the
41+
`default_authentication_plugin` configuration set to `mysql_native_password` in
42+
`my.cnf` (`caching_sha2_password` therefore wouldn't be supported).
4343
44-
Windows systems: extended SSL is enabled implicitly based on the Crypt32
45-
library regardless of this option.
44+
This option is only provided to explicitly avoid requiring the OpenSSL
45+
dependency, otherwise recommended setting is `ON`.
4646
#]=============================================================================]
4747

4848
cmake_minimum_required(VERSION 3.25...3.31)
@@ -89,8 +89,8 @@ cmake_dependent_option(
8989
PHP_EXT_MYSQLND_SSL
9090
"Explicitly enable extended SSL support in the mysqlnd extension through\
9191
OpenSSL system library (*nix) or Crypt32 (Windows)."
92-
OFF
93-
[[PHP_EXT_MYSQLND AND NOT PHP_EXT_OPENSSL AND NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
92+
ON
93+
"PHP_EXT_MYSQLND"
9494
OFF
9595
)
9696

@@ -185,13 +185,7 @@ endif()
185185

186186
set(MYSQLND_SSL_SUPPORTED TRUE)
187187

188-
if(
189-
(
190-
NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"
191-
AND (PHP_EXT_MYSQLND_SSL OR PHP_EXT_OPENSSL)
192-
)
193-
OR CMAKE_SYSTEM_NAME STREQUAL "Windows"
194-
)
188+
if(PHP_EXT_MYSQLND_SSL)
195189
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
196190
target_link_libraries(php_ext_mysqlnd PRIVATE crypt32)
197191
else()
@@ -200,7 +194,7 @@ if(
200194
OpenSSL
201195
PROPERTIES
202196
TYPE REQUIRED
203-
PURPOSE "Necessary to enable SSL in the mysqlnd extension."
197+
PURPOSE "Necessary to enable extended SSL in the mysqlnd extension."
204198
)
205199
target_link_libraries(php_ext_mysqlnd PRIVATE OpenSSL::Crypto)
206200
endif()

docs/cmake/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,13 +2025,13 @@ A list of Autoconf `configure` command-line configuration options, Windows
20252025
<td>--without-mysqlnd-ssl</td>
20262026
<td>N/A</td>
20272027
<td>PHP_EXT_MYSQLND_SSL=OFF</td>
2028-
<td>default, PHP >= 8.4</td>
2028+
<td>PHP >= 8.4 (default in Autotools)</td>
20292029
</tr>
20302030
<tr>
20312031
<td>--with-mysqlnd-ssl</td>
20322032
<td>N/A</td>
20332033
<td>PHP_EXT_MYSQLND_SSL=ON</td>
2034-
<td>PHP >= 8.4</td>
2034+
<td>PHP >= 8.4 (default in CMake)</td>
20352035
</tr>
20362036
<tr>
20372037
<td>--without-oci8</td>

docs/cmake/ext/mysqlnd.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ Enable compressed protocol support in mysqlnd.
3131

3232
## PHP_EXT_MYSQLND_SSL
3333

34-
* Default: `OFF`
34+
* Default: `ON`
3535
* Values: `ON|OFF`
3636

37-
Explicitly enable extended SSL support in the `mysqlnd` extension. On \*nix
38-
systems, extended SSL works through the OpenSSL library and on Windows through
39-
the Windows Crypt32 library. Beneficial when building without the `openssl`
40-
extension or when building with phpize.
37+
Explicitly enable or disable extended SSL support in the `mysqlnd` extension. On
38+
\*nix systems, the extended SSL works through the OpenSSL library and on Windows
39+
through the Windows Crypt32 library.
4140

42-
\*nix systems: when building with the `openssl` extension (`PHP_EXT_OPENSSL=ON`)
43-
in the php-src tree, the extended SSL is enabled implicitly regardless of this
44-
option.
41+
For example, `mysqlnd` extension with disabled extended SSL support, would
42+
require in MySQL Server 8.0 and later versions to have the
43+
`default_authentication_plugin` configuration set to `mysql_native_password` in
44+
`my.cnf` (`caching_sha2_password` therefore wouldn't be supported).
4545

46-
Windows systems: extended SSL is enabled implicitly based on the Crypt32
47-
library regardless of this option.
46+
This option is only provided to explicitly avoid requiring the OpenSSL
47+
dependency, otherwise recommended setting is `ON`.

0 commit comments

Comments
 (0)