Commit Graph

137478 Commits

Author SHA1 Message Date
Christoph M. Becker
c9ea4d76af
Revert "Merge branch 'PHP-8.3'"
This reverts commit a2313cea5a, reversing
changes made to 588029a989.
2024-08-20 16:34:52 +02:00
Christoph M. Becker
a2313cea5a
Merge branch 'PHP-8.3'
* PHP-8.3:
  zend_max_execution_timer: fix gcc compatibility (#15447)
2024-08-20 16:31:55 +02:00
Go Kudo
89daa8354f
zend_max_execution_timer: fix gcc compatibility (#15447) 2024-08-20 16:28:03 +02:00
Gina Peter Bnayard
588029a989 [skip ci] Update NEWS/UPGRADING for allowed_classes option checks 2024-08-20 16:28:01 +02:00
Gina Peter Banyard
3059adae06
ext/standard: Improve checking of allowed_classes option (#15267)
* ext/standard: Add some unserializing tests

* ext/standard: Add proper type checking for values of the allowed_classes option array

* ext/standard: Check that class names are somewhat sensible for the allowed_classes option array

* Indicate type of value

* Add test for Stringable objects
2024-08-20 15:24:25 +01:00
Christoph M. Becker
efe0e73c91
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Fix NEWS
2024-08-20 16:21:53 +02:00
Christoph M. Becker
3162ddbd84
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix NEWS
2024-08-20 16:20:29 +02:00
Christoph M. Becker
6652a34006
[skip ci] Fix NEWS 2024-08-20 16:17:19 +02:00
Christoph M. Becker
b75775ea39
Revert "Merge branch 'PHP-8.3'"
This reverts commit b363a606a4, reversing
changes made to 3ed5eee5d3.
2024-08-20 16:09:46 +02:00
Christoph M. Becker
96840072fc
Cater to raised requirement of fbclient 3.0+ for pdo_firebird (GH-15498)
We

* Document the fbclient 3.0+ version requirement

* Windows: check existence of Interface.h
  Since we now require fbclient (3.0), we can drop support for the
  Interbase gds32_ms.lib right away.

* POSIX: check for minimum required libfbclient version with fb_config

* POSIX: check for `fb_get_master_interface()`
  The existence of `isc_detach_database` is implied by this.

* POSIX: remove detection of unsupported or even wrong libraries
  libgds is for old Interbase which is incompatible with pdo_firebird for
  may years, and libib_util is a utitity library, not a replacement for
  libfbclient.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-08-20 16:00:00 +02:00
Christoph M. Becker
57f02e2aba
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15432: Heap corruption when querying a vector
2024-08-20 15:45:42 +02:00
Christoph M. Becker
a3dbd39be0
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15432: Heap corruption when querying a vector
2024-08-20 15:44:40 +02:00
Christoph M. Becker
b1211c1e4a
Fix GH-15432: Heap corruption when querying a vector
Since the mysqlnd result set is arena allocated, we must not simply
free it, but rather call the appropriate `free_result` method.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2024-08-20 15:43:21 +02:00
Christoph M. Becker
b363a606a4
Merge branch 'PHP-8.3'
* PHP-8.3:
2024-08-20 15:38:34 +02:00
Christoph M. Becker
093aee63ec
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  zend_max_execution_timer: fix gcc compatibility (#15447)
  [ci skip] fix NEWS
  [ci skip] Update NEWS
2024-08-20 15:36:26 +02:00
Christoph M. Becker
3ed5eee5d3
[skip ci] Fix bug71162.phpt xfail message (GH-15506)
The test failure is unlikely to be caused by `SessionHandlerInterface`
not being available.
2024-08-20 14:48:52 +02:00
Gina Peter Bnayard
775ca03eb8 ext/standard/crc32: Use zend_result return type and remove unused header 2024-08-20 14:18:50 +02:00
Peter Kokot
40217b2ea4
Autotools: Move auto_cflags marker to PHP_INIT_BUILD_SYSTEM (#15487)
The "hacky" auto_cflags variable is otherwise set only for the Oracle
Developer Studio compiler (which is at this point also non-usable) and
perhaps might be removed in the future but this is for now moved to the
PHP_INIT_BUILD_SYSTEM for consistent settings between the php-src build
and phpize.

The PHP_INIT_BUILD_SYSTEM is now also called sooner in phpize to match
the php-src build.
2024-08-19 22:29:20 +02:00
Ilija Tovilo
b6d7c011b8
Fix virtual properties in get_class_vars() (GH-15494)
Fixes GH-15456
2024-08-19 17:39:31 +02:00
Ilija Tovilo
60f87f29bb
Fix various hooked object iterator issues (GH-15394)
Fixes GH-15187
2024-08-19 15:46:20 +02:00
Ilija Tovilo
36b1977415
Fix missing compile error when declaring hooked props on readonly classes (GH-15439)
Fixes GH-15419
2024-08-19 14:58:55 +02:00
Ilija Tovilo
770616b823
Fix param with hooks but no visibility not treated as cpp (GH-15442)
Fixes GH-15438
2024-08-19 14:53:54 +02:00
Kamil Tekiela
144c086c46
Fix a mistake in mysqli test 2024-08-19 14:26:27 +02:00
Kamil Tekiela
6c7ff08920
Drop MYSQLI_CURSOR_TYPE_FOR_UPDATE & MYSQLI_CURSOR_TYPE_SCROLLABLE (#15486) 2024-08-19 13:54:40 +02:00
Kamil Tekiela
4baf6a643b
Fix error message and add UPGRADING entry 2024-08-19 13:19:49 +02:00
Kamil Tekiela
8f1c430954
Drop mysqli_stmt_result_metadata_sqltests.phpt (#15488)
The test is unfinished and not needed.
The functionality is already tested in other tests.
2024-08-19 13:08:14 +02:00
Kamil Tekiela
c316382acb
Remove MYSQLI_STMT_ATTR_PREFETCH_ROWS constant (#15485)
This feature was never implemented, and since the
beginning, using this constant with mysqlnd would
result in an error.
This feature was only available with libmysqlclient
which can no longer be used with mysqli.
There are no plans to implement it in the future.
2024-08-19 13:04:56 +02:00
Gina Peter Bnayard
ac3cdf54df [skip ci] Add UPGRADING.INTERNALS entry for EXIT opcode 2024-08-18 19:47:34 +02:00
Gina Peter Bnayard
ebfef2505d ext/standard/mail.c: Move php_mail_header_value_error_type enum out of header 2024-08-18 19:39:32 +02:00
Gina Peter Bnayard
a171b20c7c ext/standard/mail.c: Move macros out of the header 2024-08-18 19:33:02 +02:00
Gina Peter Bnayard
312c919a2d ext/standard/mail.c: change return type of php_mail() to bool 2024-08-18 19:32:33 +02:00
Gina Peter Bnayard
962aba3b12 ext/standard/mail.c: Reduce scope of some variable declarations 2024-08-18 19:32:20 +02:00
Gina Peter Banyard
c6e1e307a3
ext/standard: Throw a RequestParseBodyException instead of InvalidArgumentException (#15468)
Especially as this exception is thrown when there isn't an issue with an argument
2024-08-18 18:21:25 +01:00
Gina Peter Bnayard
3813ad10dc Remove unused ext/standard/basic_functions.h header inclusions
Those were probably included back in the day for the php_uint32 typedef
2024-08-18 18:20:22 +01:00
Gina Peter Bnayard
3e05c86c35 ext/standard: Remove deprecated php_uint32 and php_int32 typedefs
Use the standard uint32_t and int32_t types instead.
2024-08-18 18:20:22 +01:00
Kamil Tekiela
35ae1523d0
Remove mysqli_change_user_get_lock.phpt (#15482) 2024-08-18 19:20:04 +02:00
David Carlier
d713e3619e
ext/sockets: adding SO_BINDTOIFINDEX.
similar to SO_BINDTODEVICE but works with interface ids instead.

close GH-15479
2024-08-18 16:44:32 +01:00
Peter Kokot
80d784610a
Add date extension to dependencies (#15475)
This is at this point only meta-data information for extensions to
depend also on date extension. This is a configure phase dependency for
consistency.
2024-08-18 16:47:57 +02:00
Christoph M. Becker
ed2b45603c
Don't skip tests which are supposed to fail; mark them as xfail (#15472)
Especially regarding buggy server behavior, we should not skip those
tests, because it is unlikely that fixes to the server's behavior will
even be noticed.  Instead we mark these tests as xfail, so we get a
warning if the test succeeds, and can act appropriately.
2024-08-18 13:53:35 +02:00
Christoph M. Becker
7a9120e5f3
Avoid multiple connects in SKIPIF sections (GH-15470)
Besides checking for the ability to connect to the MySQL server, some
tests require additional checks (e.g. to be able to check for the
server's version) as skip condition.  There is no need, though, to
connect twice; instead we introduce `mysqli_connect_or_skip()` in
test_helpers.inc, which `die()`s with an appropriate error message, if
the connection can't be established, or returns the connection link
otherwise.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2024-08-18 13:41:09 +02:00
Peter Kokot
dffe25bd19
Autotools: Move AWK finder to PHP_INIT_BUILD_SYSTEM (#15478)
This calls the PHP_PROG_AWK from a single place for php-src build and
phpize.
2024-08-18 13:30:03 +02:00
Christoph M. Becker
4a77ce2022
Remove unnecessary Windows specific time formatting (GH-15474)
`gettimeofday()` is supported by PHP on Windows for ages; and generally
`localtime()` is supported on Windows for a long time.  As such, there
is no need for the Windows specific formatting code.

However, the general Windows caveat regarding `time_t` applies, namely
that it is usually `__time64_t`, unless `_USE_32BIT_TIME_T` is declared,
what we do for 32bit architectures, in which case it is `__time32_t`.
Now, `struct timeval` is imported from WinSock2.h, where the members are
declared as long (i.e. 32bit on both x86 and x64).  That means passing
a pointer to `tv_sec` to `localtime()` likely fails on x64, or at least
doesn't yield the desired result.  Therefore, we assign `tv_sec` to an
appropriate `time_t` variable, and also make sure that the `time_buffer`
is zero-terminated even if the `localtime()` call still fails.
2024-08-18 12:43:41 +02:00
Christoph M. Becker
f16cb1866a
Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds (GH-15425)
As is, MSVC uses `__vectorcall`, but clang uses `__cdecl`.  This
obviously is bad for interoperability (and causes link issues), and is
likely worse for FFI which offers some limited (but likely sufficient
for our purposes) support for `__vectorcall` on Windows.

Since clang claims to support `__vectorcall` as of 3.6.0, and we bumped
the requirements to clang 4.0.0 already, there shouldn't be any issues.
2024-08-18 12:20:09 +02:00
Christoph M. Becker
7fa2dbf924
Drop support for MYSQL_TEST_EXPERIMENTAL (GH-15467)
This environment variable serves to hide (parts of) tests from general
execution, and as the test failures show when that environment variable
is set, apparently it serves to hide (parts of) test from being
executed at all, thus causing test rot.

To avoid this in the future, we drop `MYSQL_TEST_EXPERIMENTAL`, and fix
the failing tests, except for mysqli_get_warnings.phpt, which appears
to be broken beyond repair, and whose most important tests are already
covered by other test cases.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2024-08-18 11:07:03 +02:00
Saki Takamachi
8c704ab401
ext/bcmath: Optimize bcdiv processing (#14660)
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-08-18 17:57:27 +09:00
Kamil Tekiela
7e5171d1f6
Clean up mysqli tests (#15473) 2024-08-18 00:12:23 +02:00
Christoph M. Becker
d472866f33
Drop erroneous CLEAN section
It doesn't belong to this test case, and may actually interfere with
HTMLDocument_Windows1251.phpt[1].

[1] <https://github.com/php/php-src/actions/runs/10434868303/job/28898227793>
2024-08-17 23:29:33 +02:00
Peter Kokot
41709ac89f
Update ext/mbstring and ext/snmp dependencies (#15469)
The mbstring extension requires the pcre extension and snmp extension
requires the spl extension.
2024-08-17 21:11:28 +02:00
Peter Kokot
82c4db6154
Autotools: Remove PHP_LIBDIR adjustment in pdo_dblib (#15463)
This is redundant in current state of the build system as --with-libdir
option sets the location and by default it is set to "lib". It is also
done by phpize.
2024-08-17 18:39:49 +02:00
Peter Kokot
6050a99cb8
Autotools: Sync CS in pdo_odbc (#15466)
- Obsolete backticks replaced with $(...)
- Few redundant double quotes around variables removed
- AS_VAR_IF used
- indentation synced
2024-08-17 18:39:31 +02:00