1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

66922 Commits

Author SHA1 Message Date
Peter Kokot df6d85acf8 Fix CS for fnmatch check (#14659)
This wraps the check when cross-compiling into AS_* macros and uses the
default description template provided the AC_FUNC_FNMATCH. In such case
the 3rd argument can be omitted. Also, newer Autoconf versions have
replaced backticks with single quotes in AC_DEFINE* macros descriptions.
2024-06-25 00:15:54 +02:00
David CARLIER 5c55306a50 Fix GH-14652: segfault on node without document. (#14653)
do not bother trying to clone the inner document if there is none to
begin with.
2024-06-24 22:31:53 +01:00
Peter Kokot 835cb69ab5 Normalize bcmath extension sources (#14655)
Follow-up of GH-14654
2024-06-24 22:51:51 +02:00
Peter Kokot f3feef8b93 Define default RE2C_FLAGS (#14615)
The --no-generation-date flag is a common re2c flag used in all re2c
invocations. This adds the 2nd optional argument to PHP_PROG_RE2C M4
macro in BC manner to set the default re2c command-line options and sets
the default RE2C_FLAGS similarly on Windows.
2024-06-24 22:09:04 +02:00
Niels Dossche e4250cec79 Introduce Dom\AdjacentPosition and use it in the insert adjacent methods
See https://wiki.php.net/rfc/dom_additions_84#allowing_php-specific_developer_experience_improvements
2024-06-24 12:36:35 -07:00
Niels Dossche a068a9a5bb Make XMLDocument::xinclude() return values and error conditions sane
See https://wiki.php.net/rfc/dom_additions_84#api_amendments
2024-06-24 12:36:35 -07:00
Arnaud Le Blanc ff58a7f624 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS for GH-13922
  [ci skip] NEWS for GH-13922
  Support sysconf(_SC_GETPW_R_SIZE_MAX) == -1 (#13922)
2024-06-24 19:57:28 +02:00
Arnaud Le Blanc b1119de0c9 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS for GH-13922
  Support sysconf(_SC_GETPW_R_SIZE_MAX) == -1 (#13922)
2024-06-24 19:56:19 +02:00
Arnaud Le Blanc 3fbca7fb6a Support sysconf(_SC_GETPW_R_SIZE_MAX) == -1 (#13922) 2024-06-24 19:52:55 +02:00
Peter Kokot cf3b9fca8f Sync #if/ifdef/defined (-Wundef) (#14623)
These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_SETENV
- HAVE_SYS_SELECT_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_WAIT_H
- HAVE_UNSETENV
- RFC3678_API
- ZEND_ENABLE_ZVAL_LONG64
- ZTS

Follow-up of GH-5526
2024-06-24 19:37:07 +02:00
Peter Kokot 3da6377806 Remove DBA_DB1 definition from Windows build (#14649)
The DBA_DB1 is checked with #ifdef and version 1 emulation is present in
DB version 3.
2024-06-24 16:50:22 +02:00
Peter Kokot ddcd1c86a3 Remove outdated code from mysqli Windows build (#14648)
The --with-mysqli option once accepted the mysqlnd argument when
also libmysql was used.
2024-06-24 14:18:14 +02:00
Peter Kokot c2f6fa4ee7 Use AC_DEFINE_UNQUOTED where variables are used (#14647)
According to Autoconf documentation AC_DEFINE_UNQUOTED should be used,
where shell variables are used in the macro arguments.
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/autoconf.html#index-AC_005fDEFINE_005fUNQUOTED-2

This also adds simple help descriptions to these CPP macros.
2024-06-23 23:53:50 +02:00
Peter Kokot fc36d0e849 Sync spl extension dependency for mysqli extension (#14642)
This is configure time dependency for consistency.
2024-06-23 23:15:47 +02:00
David CARLIER 8eb0889d90 Fix GH-14637: memory leak after failed heap allocation due to mem limit. (#14641) 2024-06-23 21:43:02 +01:00
Peter Kokot 8d876e435b Enable static tsrmls cache in pdo_mysql with mysqlnd (#14634)
The tsrmls cache has been integrated in
aac7b1db7c but not enabled when pdo_mysql
is built for mysqlnd extension.
2024-06-23 21:12:35 +02:00
Peter Kokot 0ed134100f Update mysqli and pdo_mysql extension dependencies (#14633)
- The mysqlnd is required dependency in mysqli extension
- When building pdo_mysql with mysqlnd (--with-pdo-mysql or
  --with-pdo-mysql=mysqlnd) mysqlnd is required
- This also adds missing configure time pdo dependency to pdo_mysql
2024-06-23 19:59:31 +02:00
Peter Kokot 678a481f62 Fix unused variable warning when using libpq < 12 (#14630)
The variable S is not used if PQresultMemorySize is not available in
this switch at this point.
2024-06-22 00:09:21 +02:00
Peter Kokot 05f3304b48 Remove unused PHP_PGSQL_API_VERSION (#14629)
The pgsql extension headers aren't installed and this API version hasn't
been used nor bumped yet.
2024-06-21 23:31:20 +02:00
Peter Kokot f4ce50ddfb Add optional pkg-config support for PostgreSQL library (libpq) (#14540)
The pkg-config (libpq.pc file) was added in PostgreSQL 9.3. This adds a
common setup M4 macro PHP_SETUP_PGSQL to find client PostgreSQL library
libpq on the system with pkg-config. If not found, check falls back to
pg_config to find the libpq and its headers in common locations as
before.

The PGSQL_CFLAGS and PGSQL_LIBS environment variables can override the
libpq installation paths:

    ./configure --with-pgsql --with-pdo-pgsql \
        PGSQL_CFLAGS=-I/path/to/libpq \
        PGSQL_LIBS="-L/path/to/libpq -lpq"

Passing manual, non-standard PostgreSQL installation path can be done
with configure option arguments:

    ./configure \
        --with-pgsql=/any/path/to/postgresql \
        --with-pdo-postgresql=/any/path/to/postgresql

If this DIR argument (PostgreSQL installation directory or path to the
pg_config) is passed, it takes precedence over the pkg-config, when
installed on the system.

This also removes the unused HAVE_LIBPQ symbol and passing the
PGSQL_INCLUDE and PGSQL_LIBDIR environment variable to configure in
favor of PGSQL_CFLAGS and PGSQL_LIBS.

Instead of the obsolete backticks the recommended $(...) is used when
invoking the pg_config.

Follow-up of GH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
2024-06-21 18:35:37 +02:00
Peter Kokot 5d359cd4e5 Remove unused PHP-8.3 generated JIT files (#14622)
This remove unused PHP-8.3 generated JIT files and adds PHP-8.3
generated JIT files back to .gitignore to have smoother workflow
when switching PHP branches this can be ignored for a branch
or two.
2024-06-21 17:33:57 +02:00
Peter Kokot 6e2ad3c4ba Define HAVE_VISIBILITY for fileinfo extension (#14618)
The libmagic library also uses the HAVE_VISIBILITY macro that should be
defined to 1 if visibility is supported or 0 if not.

Follow-up of GH-5526 (-Wundef)
2024-06-21 16:18:28 +02:00
Peter Kokot b12ccb319f Add PHP_SETUP_ZLIB M4 macro (#14591)
This enables the zlib library (https://zlib.net/) from a single place to
match the minimum required version across the php-src. This provides a
possible simpler version bump in the future. Macro's 2nd and 3rd
arguments can pass additional actions whether zlib library is found or
not for the possible future adjustments in the ext/standard where also
zlib might be required.

Support for pkg-config was introduced in 1.2.3.1.
The minimum zlib version has been bumped to 1.2.3.1



* Bump minimum zlib version to 1.2.11

This is aligned with CentOS 8, which has 1.2.11 in the default packages.

* [skip ci] Move zlib version change to UPGRADING

This matches the OpenSSL style version change notice already done in
this file.
2024-06-21 15:05:34 +02:00
David Carlier c1c29143b5 Merge branch 'PHP-8.3' 2024-06-21 05:08:56 +01:00
David Carlier 04418ede7a Merge branch 'PHP-8.2' into PHP-8.3 2024-06-21 05:08:21 +01:00
David Carlier 686afc10bf Fix GH-14603: invalid null zip file entry.
close GH-14610
2024-06-21 05:07:46 +01:00
Matteo Beccati 5a3c4a2c9c Fix test when using libmysqlclient
TL;DR
When suing libmysqlclient, ints are fetched as strings, so the strict comparison was failing
2024-06-20 13:25:52 +02:00
Peter Kokot 11914de72c Sync ext/dom and unistd.h include style (#14597) 2024-06-19 22:25:20 +02:00
Florian Engelhardt f4557b48a6 Add gc and shutdown callbacks to ZendMM custom handlers (#13432) 2024-06-19 19:43:57 +02:00
Tim Düsterhus a1ea464069 gen_stub: Intern the parameter name string for named arguments in internal attributes (#14595)
This is necessary because `zend_get_attribute_object()` will use the persistent
string with the parameter name as the index for a newly created non-persistent
HashTable, which is not legal.

As parameter names are expected to be short-ish, reasonably common terms and
need to sit around in memory anyways, we might as well make them an interned
string, circumstepping the issue without needing to duplicate the parameter
name into a non-persistent string.
2024-06-19 08:06:50 +02:00
Gina Peter Banyard 7a1eded24d ext/soap: Use zend_string for name parameter of set_soap_fault() 2024-06-19 02:23:08 +01:00
Gina Peter Banyard e1b59e9edd ext/soap: Use more accurate return types in implementations of SoapClient::__doRequest()
The do_request() function that calls this methods, assumes that a string is being returned from the method
otherwise it bails out.

However, the default implementation of SoapClient::__doRequest() indicates that it can return null when it
fails to set-up and execute the HTTP SOAP request, but this always results in a SoapFault exception being
thrown, and thus cannot happen in practice.

We need to investigate further if the return type should be changed from ?string to string or not.
2024-06-19 02:23:08 +01:00
Gina Peter Banyard 0fc5ec108e ext/soap: Add tests for invalid SOAP Headers argument 2024-06-19 02:23:08 +01:00
Gina Peter Banyard cd61f16ad8 ext/soap: Refactor verify_soap_headers_array()
Make its duty only to check if the provided HashTable is valid
2024-06-19 02:23:08 +01:00
Gina Peter Banyard e12db87e09 ext/soap: Add some SoapServer tests about handling errors 2024-06-19 02:23:01 +01:00
Gina Peter Banyard e830306431 ext/soap: Add some SoapClient tests about handling errors 2024-06-19 02:20:37 +01:00
Gina Peter Banyard 062353ce2d ext/soap: prevent needless computation of strlen() 2024-06-19 02:20:36 +01:00
Gina Peter Banyard 073491bfd8 ext/soap: Refactor SOAP call methods implementation 2024-06-19 02:20:36 +01:00
Gina Peter Banyard a6a2c66141 ext/soap: Refactor SDL delete functions
Use a common implementation for persistent and non-persistent functions
2024-06-19 02:20:36 +01:00
Gina Peter Banyard 1e7134f07f ext/soap: Refactor implementation of in_domain() 2024-06-19 02:20:36 +01:00
Gina Peter Banyard 4626c17f41 ext/soap: SoapServer::addSoapHeader() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:36 +01:00
Gina Peter Banyard 2459b3ae0d ext/soap: SoapServer::addFunction() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:36 +01:00
Gina Peter Banyard ce1bb1afa8 ext/soap: SoapServer::getFunctions() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard a99a790ad0 ext/soap: SoapServer::setObject() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard 5a961cbf77 ext/soap: SoapServer::setClass() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard 8269caab53 ext/soap: SoapServer::setPersistence() does not need bailout handler wrapper
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard 572b2b71cd ext/soap: Use bool type for _bailout variable 2024-06-19 02:20:35 +01:00
Gina Peter Banyard b71951baae ext/soap: Use bool as return type instead of int for do_request() 2024-06-19 02:20:35 +01:00
Gina Peter Banyard cfc48bd832 ext/soap: Use bool as return type instead of int for parse_packet_soap() 2024-06-19 02:20:34 +01:00
Gina Peter Banyard a7c7158653 ext/soap: Use bool as return type instead of int for is_blank() 2024-06-19 02:20:34 +01:00