Commit Graph

137713 Commits

Author SHA1 Message Date
Peter Kokot
13f041163c
Remove Travis artefacts (#15714)
Travis was suspended https://github.com/php/php-src/pull/15314

This removes 404 errored Travis image in README, travis configuration
directory and YAML file and usages in tests.

[skip ci]

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-09-04 01:15:10 +02:00
Peter Kokot
9a9e178328
Autotools: Enhance appending -lrt (#15719)
If the opcache extension would be built statically one day this also
takes care of this to make the check more ubiquitous.
2024-09-04 00:43:21 +02:00
DanielEScherzer
53cb89670c
Generated arginfo header files: remove empty zend_function_entry arrays (#15705)
When a class (or enum) has no methods, rather than using an array that only
contains `ZEND_FE_END`, use `NULL` for the functions. The implementation of
class registration for internal classes, `do_register_internal_class()` in
zend_API.c, already skips classes where the functions are `NULL`. By removing
these unneeded arrays, we can reduce the size of the header files, while also
removing an unneeded call to zend_register_functions() for each internal class
with no extra methods.
2024-09-03 23:19:53 +02:00
Máté Kocsis
7dfbf4d1b7
Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing return for DatePeriod::__unserialize
2024-09-03 21:32:03 +02:00
Máté Kocsis
1663ed6c6e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing return for DatePeriod::__unserialize
2024-09-03 21:31:00 +02:00
Máté Kocsis
6cab76986d
Add missing return for DatePeriod::__unserialize
Additionally, add other RETURN_THROWS() defensively.
2024-09-03 21:27:50 +02:00
Christoph M. Becker
8a2015451a
Fix dba tests wrt resource to object conversion (GH-15716)
We should not pretend that there are still user-visible resources,
since we're dealing with objects now.
2024-09-03 14:23:57 +02:00
Christoph M. Becker
3892529fed
Close-GH 15685: improve proc_open error reporting on Windows
While similar errors are already reported via `strerror()` on other
platforms, this has apparently overlooked for Windows, where only the
error code has been reported so far.

We adapt the affected test cases, but since there is no PHP userland
function which allows us to get the current system locale, we work
around.

Closes GH-15687.
2024-09-03 13:12:27 +02:00
Ilija Tovilo
7f0d2574f0
Simplify a-vis error message 2024-09-03 12:18:07 +02:00
Ilija Tovilo
407bc092db
[skip ci] Fix NEWS reflection category 2024-09-03 11:33:04 +02:00
Daniel Scherzer
18df69ee34
ReflectionProperty::get{Hook,Hooks}(): handle dynamic properties
For dynamic properties, instead of crashing with a segmentation fault, just say
that there are no hooks. Also includes a test to prevent regression.

Fixes GH-15718
Closes GH-15721
2024-09-03 11:31:15 +02:00
Dmitry Stogov
a7f789ec56
Update IR
IR commit: 17fa2605a526d9512224123c0e7e565307a17fe9
2024-09-03 10:26:14 +03:00
Niels Dossche
0d616d1b82
Fix GH-15693: Unnecessary include in main.c bloats binary
Closes GH-15700.
2024-09-02 21:54:13 +02:00
Niels Dossche
98dc77f660
Fix GH-15690: ext-dba failures on 32-bit (#15691)
The wrong type was used in the size calculation. On 64-bit this
coincidentally doesn't cause issues, but on 32-bit it does because of
different padding vs 64-bit resulting in a different size.

Regressed in 2097237.
2024-09-02 21:46:05 +02:00
Dmitry Stogov
faa1904fb6
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717)
2024-09-02 21:59:14 +03:00
Dmitry Stogov
be8589651d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717)
2024-09-02 21:55:40 +03:00
Dmitry Stogov
1e78cf941c
Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717) 2024-09-02 21:55:19 +03:00
Peter Kokot
db9a7aaf05
Autotools: Sync CS in configure.ac (#15706)
This further replaces more raw shell usages with AS_* macros.
2024-09-02 19:00:58 +02:00
Peter Kokot
45ebe47569
Autotools: Sync CS in ext/openssl 2024-09-02 18:39:11 +02:00
Christoph M. Becker
6d5962074f
Dynamically xfail test cases which fail on CI (GH-15710)
This is a stop-gap measure for GH-15709 to keep CI green.
2024-09-02 18:23:52 +02:00
Ilija Tovilo
2b8a1b4258
Forbid a-vis on unilateral virtual prop
The get-only case is obvious, there is no set operation so specifying its
visibility is senseless. The set-only case is also questionable, since there is
no operation other than set, so changing the visibility of the entire property
is preferable.

Closes GH-15698
2024-09-02 17:40:30 +02:00
Remi Collet
b81f9722db
[ci skip] NEWS and UPGRADING for PASSWORD_ARGON2 on openssl 2024-09-02 13:13:54 +02:00
Remi Collet
32c5ce3451
Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2 (#13635)
* Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2

* simplify init/shutdown

* use php_base64_encode_ex

* - rename macros - use openssl RAND_bytes - CS

* add --with-openssl-argon2 build option

* check OSSL_KDF_PARAM_ARGON2_LANES instead of OSSL_set_max_threads

* Cleanup and CS

* save/restore old threads config + CS

* remove unneeded check
2024-09-02 13:01:09 +02:00
Ilija Tovilo
64bd828394
[skip ci] Update mysql versions for libmysql build 2024-09-02 12:31:56 +02:00
Ilija Tovilo
e7c2017fc6
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Backport libmysql build fix (d9a9696)
2024-09-02 12:09:42 +02:00
Ilija Tovilo
d7febabd23
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Backport libmysql build fix (d9a9696)
2024-09-02 12:09:36 +02:00
Ilija Tovilo
57f9041165
[skip ci] Backport libmysql build fix (d9a9696) 2024-09-02 12:08:55 +02:00
Christoph M. Becker
4dc77953eb
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix run-tests.php to propagate status code on Windows
2024-09-02 00:53:02 +02:00
Christoph M. Becker
71b908748a
Fix run-tests.php to propagate status code on Windows
There is now a workaround in `system_with_timeout()` to avoid issues
with quotes and spaces in the filenames of the executable by using
`start`[1].  However, calling `start` will not propagate the process
status of the actual process.  Thus, calling `proc_get_status()`
is pretty meaningless, and especially Microsoft errors cannot be
detected (typically, access violations etc.), and as such no "Termsig"
message is output.

We fix this by executing `exit` after the started command has finished.

[1] <a6d7d5234b/run-tests.php (L1157-L1162)>

Closes GH-15378.
2024-09-02 00:52:31 +02:00
Peter Kokot
8699da6f33
Autotools: Document PHP environment build configuration vars (#15684)
This marks the following environment variables as precious:

- PHP_BUILD_ARCH
- PHP_BUILD_COMPILER
- PHP_BUILD_PROVIDER
- PHP_BUILD_SYSTEM
- PHP_UNAME

Meaning, they are now also shown in the `./configure --help` output, and
they can be used like this when configuring the PHP build:

    ./configure PHP_BUILD_ARCH="..." PHP_BUILD_COMPILER="..."  ...
2024-09-01 23:57:33 +02:00
Niels Dossche
5ca4d8828d
Remove redundant 'zobj->ce->__isset' check (#15699)
This became unnecessary due to the addition of lazy objects that added
the goto when '!zobj->ce->__isset' above.
2024-09-01 23:10:54 +02:00
Jorg Adam Sowa
2a30f2ffc4
Add type indicator to array/arg unpack error messages (GH-15448) 2024-09-01 22:57:12 +02:00
Peter Kokot
de6658531f
Autotools: Fix iconv shared build with external library (#15686)
When building iconv as shared and with external library (for example, libiconv):

    ./configure --with-iconv=shared,/path/to/libiconv

the iconv couldn't be found due to a linker error.

Autoconf places LDFLAGS before the conftest.c file in the test compile
command and LIBS after it. GCC also requires this:

    gcc -L... conftest.c -liconv

Similar issue discovered at
https://github.com/remicollet/php-xpass/pull/1
2024-09-01 22:06:37 +02:00
Ayesh Karunaratne
fde34bc1e8
ext/curl: Update UPGRADING and NEWS for GH-13255 (#15668)
[ci skip]
2024-09-01 18:55:34 +02:00
jrfnl
95c5a5a959 [skip ci] PHP 8.4 changelog: fix typo in new constant
Ref: PR 15479 / d713e3619e
2024-09-01 18:51:31 +02:00
jrfnl
ced1e4509a [skip ci] PHP 8.4 changelog: add MYSQLI_TYPE_VECTOR to new constants
Ref: PR 15431 / a1ab846231
2024-09-01 18:51:31 +02:00
jrfnl
7bfd9d4a63 [skip ci] PHP 8.4 changelog: more alphabetic order fixes 2024-09-01 18:51:31 +02:00
Christoph M. Becker
c013679b70
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
2024-09-01 17:26:46 +02:00
Christoph M. Becker
a51f54b54b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
2024-09-01 17:25:18 +02:00
Christoph M. Becker
08841bf79c
Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
We ensure that the argnum `value` is in the allowed range, *before*
mapping it to the `objIndex`, not *afterwards*.

Closes GH-15581.
2024-09-01 17:24:17 +02:00
Christoph M. Becker
0b1e401f2c
Skip tests calling wmic if it is not available
The WMIC utitlity is deprecated as of Windows 10 21H1, and a feature on
demand which is enabled by default in Windows 11 22H2 and 23H2, but
will be disabled by default in the next release of Windows.[1]

Therefore, we ensure that tests which rely on wmic.exe are properly
skipped if it is not available.

[1] <https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features#deprecated-features>

Closes GH-15583.
2024-09-01 17:19:37 +02:00
Christoph M. Becker
2bb5dea7b1
Merge branch 'PHP-8.3' [skip ci]
* PHP-8.3:
  Mark gd14930.phpt as dynamic xfail
2024-09-01 15:06:31 +02:00
Christoph M. Becker
ac4039df20
Mark gd14930.phpt as dynamic xfail
This test only fails when `NAME_MAX` is defined, which is never the
case on Windows, so we let the test pass there.  This could be extended
to other environments where `NAME_MAX` is not defined.
2024-09-01 15:04:54 +02:00
Christoph M. Becker
55f519b178
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15628: php_stream_memory_get_buffer() not zero-terminated
2024-09-01 14:58:14 +02:00
Christoph M. Becker
5f504f10dd
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15628: php_stream_memory_get_buffer() not zero-terminated
2024-09-01 14:56:54 +02:00
Christoph M. Becker
93021c635d
Fix GH-15628: php_stream_memory_get_buffer() not zero-terminated
We're reasonably sure that appending the NUL is not an OOB write, since
the memory stream implementation uses `zend_string` APIs instead of
fiddling with the buffer.

We don't add a regression test because that would require to set up
something in the zend_test extension, and regressions are supposed
to be caught by external consumers of this API, such as mailparse.

Closes GH-15648.
2024-09-01 14:55:40 +02:00
Christoph M. Becker
a57ce052cd
Don't export php_pdo_int.h
This is, as the name and a comment in the header imply, an internal
header which is not supposed to be used by extensions other than PDO
(not even by drivers).

Since there is apparently no need to include this header in the parsers
of the drivers, we remove these includes, and no longer declare the
header to be installed.  Given that the header is only exported for a
couple of weeks[1], this is not considered to be a BC break, because
it's unlikely that external drivers have already been adjusted to use
this header, and otherwise they can still be fixed; PHP 8.4 is still in
the pre-release stage.

[1] <https://github.com/php/php-src/pull/14797>

Closes GH-15688.
2024-09-01 13:33:53 +02:00
Peter Kokot
1a126c540a
Autotools: Normalize flags arguments (#15671)
This is a follow up of 7edb9a07d7 that
provides passing compilation options to PHP_NEW_EXTENSION,
PHP_ADD_SOURCES, PHP_ADD_SOURCES_X, and PHP_SELECT_SAPI as a
blank-or-newline-separated argument.
2024-09-01 01:02:40 +02:00
Christoph M. Becker
0f8259e896
ICU 75.1 requires C++17 (GH-15678)
This needs to be explicitly enabled for MSVC (and probably clang on
Windows); otherwise the default is C++14, which is no longer sufficient
for ICU[1].

While the official PHP 8.4 builds for Windows do not yet use ICU 75.1,
that may change[2].  And even if not, it would be nice for custom
builds to be able to build against ICU 75.1 (or later).

Anyhow, using `std:c++17` is fine for ICU 72.1 which we are currently
using (and likely for some older ICU versions).

[1] <https://github.com/unicode-org/icu/releases/tag/release-75-1>
[2] <https://github.com/winlibs/icu4c/pulls>
2024-08-31 17:01:49 +02:00
Christoph M. Becker
b3d6414b87
Drop support for building with MSC_VER < 1920
`MSC_VER` 1920 refers to Visual Studio 2019 RTW 16.0[1], and this
should be the bare minimum which we support nowadays.  If users use an
older Visual Studio version, we fail gracefully during `configure`.

[1] <https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170>

Closes GH-15403.
2024-08-31 17:00:21 +02:00