1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

918 Commits

Author SHA1 Message Date
Peter Kokot
f17c5ad83b Windows build: Add new function CHECK_HEADER() (#21191)
The current function `CHECK_HEADER_ADD_INCLUDE()` automatically defines
`HAVE_<HEADER_NAME_H>` preprocessor macros, which makes it difficult to
sync with other build systems. Specially, if some `HAVE_` macro is used
in the code and this function defines this macro but Autotools doesn't.

The new `CHECK_HEADER()` function behaves similar except it doesn't
define the `HAVE_<HEADER_NAME_H>` preprocessor macro.

This removes the following unused compile definitions:

HAVE_ARGON2_H
HAVE_AVIF_H
HAVE_BZLIB_H
HAVE_CAPSTONE_CAPSTONE_H
HAVE_CURL_EASY_H
HAVE_DB_H
HAVE_DECODE_H
HAVE_DEPOT_H
HAVE_EDITLINE_READLINE_H
HAVE_ENCHANT_H
HAVE_ENCODE_H
HAVE_FFI_H
HAVE_FIREBIRD_INTERFACE_H
HAVE_FT2BUILD_H
HAVE_GD_H
HAVE_GLIB_H
HAVE_GMP_H
HAVE_HTTPD_H
HAVE_IBASE_H
HAVE_IR_IR_H
HAVE_KECCAKHASH_H
HAVE_LBER_H
HAVE_LDAP_H
HAVE_LIBEXSLT_EXSLT_H
HAVE_LIBINTL_H
HAVE_LIBPQ_FE_H
HAVE_LIBTIDY_TIDY_H
HAVE_LIBXML_PARSER_H
HAVE_LIBXML_TREE_H
HAVE_LIBXML_XMLWRITER_H
HAVE_LIBXSLT_XSLT_H
HAVE_LMDB_H
HAVE_MBSTRING_H
HAVE_MYSQL_H
HAVE_ONIGURUMA_H
HAVE_OPENSSL_SSL_H
HAVE_PNG_H
HAVE_SNMP_H
HAVE_SODIUM_H
HAVE_SQLITE3_H
HAVE_SQLITE3EXT_H
HAVE_SYBFRONT_H
HAVE_TIDY_H
HAVE_TIDY_TIDY_H
HAVE_TIDYBUFFIO_H
HAVE_TIMELIB_CONFIG_H
HAVE_UNICODE_USPOOF_H
HAVE_UNICODE_UTF_H
HAVE_XPM_H
HAVE_ZIP_H
HAVE_ZIPCONF_H
HAVE_ZLIB_H

The following compile definitions are defined explicitly:

- HAVE_ICONV_H
- HAVE_MSCOREE_H
- HAVE_SQL_H
- HAVE_SQLEXT_H

Additionally, the `SETUP_OPENSSL()` function doesn't accept the 6th
argument anymore.
2026-03-03 20:06:40 +01:00
Ilija Tovilo
073dcf66bb Merge branch 'PHP-8.5'
* PHP-8.5:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:28 +01:00
Ilija Tovilo
07e29acbd4 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:21 +01:00
Ilija Tovilo
6f91209260 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:14 +01:00
Ilija Tovilo
c6ad84fb9e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:04:24 +01:00
Ilija Tovilo
3a57b4ced5 Add RUN_RESOURCE_HEAVY_TESTS env var
Disable resource-heavy tests by default (>1GB of memory usage), unless the
RUN_RESOURCE_HEAVY_TESTS env variable is set.

Fixes GH-20762
Closes GH-20935
2026-02-27 15:00:35 +01:00
David Carlier
d1160660b2 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21262: ldap_modify() too strict controls argument validation.
2026-02-23 20:46:52 +00:00
David Carlier
aa44392dfc Fix GH-21262: ldap_modify() too strict controls argument validation.
make it impossible to unset an attribute.

close GH-21263
2026-02-23 20:46:04 +00:00
Arnaud Le Blanc
65b4073922 Include the actual stub name in generated arginfo headers (#20993) 2026-01-21 20:57:00 +01:00
Niels Dossche
5695cee84e Merge branch 'PHP-8.5'
* PHP-8.5:
  ldap: Fix memory leak in ldap_set_options()
2025-12-08 22:31:15 +01:00
Niels Dossche
b98d553959 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ldap: Fix memory leak in ldap_set_options()
2025-12-08 22:30:33 +01:00
Niels Dossche
5da5fa5528 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ldap: Fix memory leak in ldap_set_options()
2025-12-08 22:30:16 +01:00
Niels Dossche
02a7c49564 ldap: Fix memory leak in ldap_set_options()
Closes GH-20659.
2025-12-08 22:29:03 +01:00
Niels Dossche
8908a81973 ldap: Use cheaper checks for getting a string (#20652)
Avoids loading globals, the return register can be used directly.
2025-12-08 22:28:03 +01:00
Tim Düsterhus
db8d35e7eb tree-wide: Replace ZEND_WRONG_PARAM_COUNT() by its definition (#20066)
* tree-wide: Replace `WRONG_PARAM_COUNT` by `ZEND_WRONG_PARAM_COUNT()`

This is a direct alias.

* tree-wide: Replace `ZEND_WRONG_PARAM_COUNT()` by its definition

This macro was hiding control flow (the return statement) and thus was
particularly unhygienic.
2025-11-12 21:28:56 +01:00
Tim Düsterhus
59cfc83f9a ldap: Use true / false instead of 1 / 0 when assigning to bool
Changes done with Coccinelle:

    @@
    bool b;
    @@

    - b = 0
    + b = false

    @@
    bool b;
    @@

    - b = 1
    + b = true
2025-09-24 18:51:40 +02:00
David CARLIER
a46be36091 ext/ldap: [RFC] Deprecate build with Oracle Instance Client version. (#19809) 2025-09-19 11:04:41 +01:00
Gina Peter Banyard
5583273906 ext/ldap: Use size_t type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
61790eb8a0 ext/ldap: Use uint32_t type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
9af00b174a ext/ldap: Use bool type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
53fde8b5a8 ext/ldap: Remove useless variable 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
b5fb9555e1 ext/ldap: Reduce scope of variable 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
1c820750da ext/ldap: Add static specifier for private function 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
2e53aef1e8 ext/ldap: Remove unused include statement 2025-08-06 16:36:13 +01:00
Jakub Zelenka
a59caa3c33 Merge branch 'PHP-8.4' 2025-07-17 13:45:32 +02:00
Jakub Zelenka
554ae518a2 Merge branch 'PHP-8.3' into PHP-8.4 2025-07-17 13:45:14 +02:00
Jakub Zelenka
8516ae86d7 Skip LDAP TLS max version test for now 2025-07-17 13:44:21 +02:00
Jakub Zelenka
b9844b545f Merge branch 'PHP-8.4' 2025-07-16 17:32:20 +02:00
Jakub Zelenka
a57f58253a Merge branch 'PHP-8.3' into PHP-8.4 2025-07-16 17:31:24 +02:00
Jakub Zelenka
eade5c17ea Fix GH-18529: additional inheriting of TLS int options
This is for LDAP_OPT_X_TLS_PROTOCOL_MIN and LDAP_OPT_X_TLS_PROTOCOL_MAX

It also adds a test that uses LDAPCONF with TLS max version lower than
the minimum TLS server version so it should always fail. However it
does not fial for the second case without this change which confirms
that the change works as expected.

Closes GH-18676
2025-07-16 17:29:42 +02:00
Remi Collet
840dc1981f fix ldap.h detection without pkgconfig (#19005) 2025-07-03 15:24:35 +02:00
DanielEScherzer
ddd33fd7e4 Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667)
When global constants' or class constants' availability is based on some
preprocessor condition, the generated arginfo header files wrap the
declarations in the preprocessor `#if` conditional blocks, one per declaration,
even if they are in the same conditional block based on comments in the stub
file. Instead of having multiple conditional blocks one after the other with
the same condition, combine them into a single conditional block.
2025-06-22 14:35:28 -07:00
David Carlier
a2461021b6 Merge branch 'PHP-8.4' 2025-06-22 11:46:16 +01:00
David Carlier
0afe0bb777 Merge branch 'PHP-8.3' into PHP-8.4 2025-06-22 11:43:40 +01:00
David Carlier
2694eb9df0 Fixed GH-18902: ldap_exop/ldap_exop_sync assert triggered on empty request OID
close GH-18903
2025-06-22 11:41:23 +01:00
Peter Kokot
25e8aa5cd2 Autotools: Fix ext/ldap shared build (#18673)
This fixes checks when building shared ldap library, or when ldap
installation directory is passed as argument:

    ./configure --with-ldap=shared
    ./configure --with-ldap=/path/to/ldap
    ./configure --with-ldap=shared,/path/to/ldap
2025-05-28 12:08:46 +01:00
David Carlier
4076324c6f Merge branch 'PHP-8.4' 2025-05-25 12:53:54 +01:00
David Carlier
78f03cd5f2 Merge branch 'PHP-8.3' into PHP-8.4 2025-05-25 12:53:44 +01:00
David Carlier
5d4846b241 ext/ldap: simplify ldap_connect() workflow, fix url leak.
delaying the object creation only before ldap initialisation.
fix forgotten url freeing on TLS error code path.

close GH-18645
2025-05-25 12:53:28 +01:00
Remi Collet
e726d917e7 add more ldaps/tls tests with TLS_CACERTFILE 2025-05-19 07:40:12 +02:00
Remi Collet
1e6909d25e allow ldap_get_option to retrieve global option 2025-05-19 07:40:09 +02:00
Remi Collet
2e70a8945a Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS
  NEWS
  Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
2025-05-15 09:22:52 +02:00
Remi Collet
8647624261 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS
  Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
2025-05-15 09:22:09 +02:00
Remi Collet
2760a3ef97 Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
- ensure TLS string options are properly inherited
  workaround to openldap issue https://bugs.openldap.org/show_bug.cgi?id=10337

- fix ldaps/start_tls tests using LDAPNOINIT in ldaps/tls tests
2025-05-15 09:19:57 +02:00
Niels Dossche
2d3ac4e2ed Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix NULL deref on high modification key
2025-04-16 11:41:33 +02:00
Niels Dossche
bfa2cfc9ed Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NULL deref on high modification key
2025-04-16 11:38:38 +02:00
Niels Dossche
c905d59106 Fix NULL deref on high modification key
We should re-index in the loop.

Closes GH-18331.
2025-04-16 11:37:49 +02:00
Remi Collet
e65fbe1bb8 Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS for GH-17940
  NEWS for GH-17940
  Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden
2025-04-10 17:14:21 +02:00
Remi Collet
bcee2af398 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS for GH-17940
  Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden
2025-04-10 17:13:37 +02:00
Remi Collet
389de7c6bf Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden 2025-04-10 17:07:15 +02:00