Skip to content

Commit a46be36

Browse files
authored
ext/ldap: [RFC] Deprecate build with Oracle Instance Client version. (#19809)
1 parent c893591 commit a46be36

File tree

5 files changed

+65
-10
lines changed

5 files changed

+65
-10
lines changed

UPGRADING

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,17 @@ PHP 8.5 UPGRADE NOTES
438438
by using the intl.use_exceptions INI setting.
439439
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_intlerror_level_ini_setting
440440

441+
- LDAP:
442+
- Specific Oracle Instant Client calls and constants have been deprecated.
443+
List of affected calls:
444+
ldap_connect with wallet support()
445+
ldap_connect_wallet()
446+
List of affected constants:
447+
GSLC_SSL_NO_UATH
448+
GSLC_SSL_ONEWAY_UATH
449+
GSLC_SSL_TWOWAY_UATH
450+
https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_building_ext_ldap_against_oracle_ldap
451+
441452
- MySQLi:
442453
. The mysqli_execute() alias function has been deprecated.
443454
Use mysqli_stmt_execute() instead.

ext/ldap/config.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ if test "$PHP_LDAP" != "no"; then
9191
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then
9292
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
9393
AC_DEFINE([HAVE_ORALDAP], [1])
94+
AC_MSG_WARN([Build with Oracle Instant Client is deprecated as of PHP 8.5])
9495
9596
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
9697
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
9798
AC_DEFINE([HAVE_ORALDAP], [1])
99+
AC_MSG_WARN([Build with Oracle Instant Client is deprecated as of PHP 8.5])
98100
99101
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME; then
100-
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
101-
AC_DEFINE([HAVE_ORALDAP], [1])
102+
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
103+
AC_DEFINE([HAVE_ORALDAP], [1])
104+
AC_MSG_WARN([Build with Oracle Instant Client is deprecated as of PHP 8.5])
102105
103106
else
104107
AC_MSG_ERROR([Cannot find ldap libraries in $LDAP_LIBDIR.])

ext/ldap/ldap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,7 @@ PHP_FUNCTION(ldap_connect)
973973
LDAP *ldap = NULL;
974974

975975
if (ZEND_NUM_ARGS() > 2) {
976-
zend_error(E_DEPRECATED, "Calling ldap_connect() with Oracle-specific arguments is deprecated, "
977-
"use ldap_connect_wallet() instead");
976+
zend_error(E_DEPRECATED, "Calling ldap_connect() with Oracle-specific arguments is deprecated");
978977
} else if (ZEND_NUM_ARGS() == 2) {
979978
zend_error(E_DEPRECATED, "Usage of ldap_connect with two arguments is deprecated");
980979
}

ext/ldap/ldap.stub.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,19 @@
208208
* @var int
209209
* @cvalue GSLC_SSL_NO_AUTH
210210
*/
211+
#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]
211212
const GSLC_SSL_NO_AUTH = UNKNOWN;
212213
/**
213214
* @var int
214215
* @cvalue GSLC_SSL_ONEWAY_AUTH
215216
*/
217+
#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]
216218
const GSLC_SSL_ONEWAY_AUTH = UNKNOWN;
217219
/**
218220
* @var int
219221
* @cvalue GSLC_SSL_TWOWAY_AUTH
220222
*/
223+
#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]
221224
const GSLC_SSL_TWOWAY_AUTH = UNKNOWN;
222225
#endif
223226

@@ -624,8 +627,10 @@
624627
#endif
625628

626629
#ifdef HAVE_ORALDAP
630+
#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]
627631
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, #[\SensitiveParameter] string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
628632
#ifdef LDAP_API_FEATURE_X_OPENLDAP
633+
#[\Deprecated(since: "8.5", message: "as it is broken since PHP 8.0")]
629634
function ldap_connect_wallet(?string $uri = null, string $wallet, #[\SensitiveParameter] string $password, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
630635
#endif
631636
#else

ext/ldap/ldap_arginfo.h

Lines changed: 43 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)