Commit Graph

15459 Commits

Author SHA1 Message Date
Guillaume Outters
c265b9085a
ext/pdo_pgsql: adding pgsqlSetNoticeCallback
Allows a callback to be triggered on every notice sent by PostgreSQL.

Such notices can be sent with a RAISE NOTICE in PL/pgSQL; in a long running
stored procedure, they prove useful as realtime checkpoint indicators.

close GH-6764
2024-05-22 12:32:11 +01:00
Tim Düsterhus
8094bd1b58
Make ReflectionGenerator::getFunction() legal after generator termination (#14167)
* Make `ReflectionGenerator::getFunction()` legal after generator termination

* Expose the generator function name via `Generator::__debugInfo()`

* Allow creating `ReflectionGenerator` after termination

* Reorder `struct _zend_generator` to avoid a hole

* Adjust `ext/reflection/tests/028.phpt`

This is legal now.

* Fix Generator Closure collection

* Add test to verify the Closure dies with the generator

* NEWS / UPGRADING
2024-05-21 08:54:51 +02:00
Niels Dossche
90e0ce7f0d
Throw early when a non-stream-context resource is passed to libxml_set_streams_context() (#14279) 2024-05-20 16:56:38 +02:00
Niels Dossche
b7bf846f72
Fix bug #81227: PDO::inTransaction reports false when in transaction (#14268) 2024-05-20 13:59:26 +02:00
David Carlier
9aa3a0d702
ext/pgsql: adding pg_change_password functionality.
handy call to change an user password while taking care transparently
of the password's encryption.

close GH-14262
2024-05-20 12:57:37 +01:00
武田 憲太郎
b7dd3d8347
ext/pdo_pgsql: Retrieve the memory usage of the query result resource (#14260)
`getAttribute()` can now retrieve the memory usage of query results.
`PDO::PGSQL_ATTR_RESULT_MEMORY_SIZE` was added for this feature.

closes #14260
2024-05-20 09:08:54 +09:00
武田 憲太郎
77fa4c0fce
ext/pgsql: add pg_result_memory_size
Close GH-14214
2024-05-13 22:58:02 +01:00
David Carlier
19c8a10f3f
ext/pcntl: add pcntl_getcpu support for solaris.
using getcpuid having similar signature too.

close GH-14188
2024-05-11 05:53:10 +01:00
Niels Dossche
f97bd071d5
Implement SeekableIterator for SplObjectStorage (#13665) 2024-05-05 13:26:54 +02:00
Niels Dossche
b1bb9c34e8
[ci skip] NEWS and UPGRADING 2024-05-01 16:57:36 +02:00
Saki Takamachi
0540a4211d
[skip ci] NEWS 2024-05-01 22:31:08 +09:00
Saki Takamachi
10ae87969e
NEWS/UPGRADING 2024-05-01 22:02:43 +09:00
Niels Dossche
4167d75024
[ci skip] Fix typo in NEWS 2024-04-30 23:38:08 +02:00
David Carlier
1cf4cc3894
ext/intl: IntlDateFormatter::parseToCalendar addition.
Unlike IntlDateFormatter::parse, the timezone is updated
accordingly.

Close GH-13779
2024-04-29 18:55:00 +01:00
Adam Saponara
956c3c2c03
ext/openssl: Add option to load legacy algorithm provider
OpenSSL 3.x relegated a set of insecure algorithms to a "legacy"
provider which is not loaded by default. Some of these algorithms
have utility beyond encryption such as for hashing, e.g., DES[1]

Add a compile-time option to load the legacy provider in 3.x. When
enabled, also load the default provider because loading any provider
explicitly disables auto-loading the default provider.

[1] 9e40015748/go/vt/vtgate/vindexes/hash.go (L157)

Closes GH-13951
2024-04-28 14:52:45 +01:00
David CARLIER
d5d227a43a
[ci skip] ext/sockets: followup on #14065. (#14066)
freebsd supports SO_NOSIGPIPE too.
2024-04-28 13:01:49 +01:00
David Carlier
b147a22bb8
ext/sockets: adding SO_NOSIGPIPE constant.
it s the macOs way to disable the SIGPIPE signal emission, same
 as doing `signal(SIGPIPE, SIG_IGN)` but on the socket level.

Close GH-14065
2024-04-28 12:01:03 +01:00
David Carlier
243827b83f
Fix GH-13519: another attempt after the faulty fix.
Close GH-14055
2024-04-27 12:15:59 +01:00
David Carlier
3a300e9213
ext/pcntl: signals list update for dragonflybsd related to checkpoint.
- SIGCKPT checkpoint and continue.
- SIGCKPTEXIT checkpoint and exit.

Close GH-14011
2024-04-22 21:21:52 +01:00
Niels Dossche
dd1a32dc1c
NEWS
Closes GH-13782.
2024-04-21 16:08:26 +02:00
David Carlier
d40726670f
ext/pcntl: pcntl_getqos_class/pcntl_setqos_class addition.
Introducting macOs Quality Of Service through those two calls.
on macOs arm64/M*, there is no concept of individual cores, thus
the old thread policy for cpu affinity does not work here.
Instead, the user can apply to the current process the level of
 performance/energy consumption they wish from the highest
QosClass::UserInteractive to QosClass::Background.

Close GH-13945
2024-04-15 18:52:28 +01:00
Niels Dossche
72b2524c58
[ci skip] NEWS
News for GH-13041.
2024-04-13 01:40:57 +02:00
Tim Düsterhus
08b2ab22f4
Include the source location in Closure names (#13550)
* Include the source location in Closure names

This change makes stack traces involving Closures, especially multiple
different Closures, much more useful, because it's more easily visible *which*
closure was called for a given stack frame.

The implementation is similar to that of anonymous classes which already
include the file name and line number within their generated classname.

* Update scripts/dev/bless_tests.php for closure naming

* Adjust existing tests for closure naming

* Adjust tests for closure naming that were not caught locally

* Drop the namespace from closure names

This is redundant with the included filename.

* Include filename and line number as separate keys in Closure debug info

* Fix test

* Fix test

* Include the surrounding class and function name in closure names

* Fix test

* Relax test expecations

* Fix tests after merge

* NEWS / UPGRADING
2024-04-12 18:21:13 +02:00
David Carlier
0e16e29b40
ext/sockets: socket_create_listen update.
going from 128 to system's SOMAXCONN by default to be able to increase
the queue of connections to be handled.
Also, for Haiku SOMAXCONN is only 32.

Close GH-13854
2024-04-10 18:39:38 +01:00
Yuya Hamada
44e8301cf6
Add grapheme_str_split function
I noticed that PHP does not have a grapheme cluster based str_split function.
So I created the grapheme_str_split function.

This feature will allow you to correctly handle emoji
and variable selectors.

Co-authored-by: Ayesh Karunaratne <Ayesh@users.noreply.github.com>

Close GH-13580
2024-04-10 18:20:23 +01:00
Ben Ramsey
7ca4300db8
Merge branch 'PHP-8.3' 2024-04-09 23:55:11 -05:00
Ben Ramsey
049082e4d0
Update NEWS 2024-04-09 23:53:27 -05:00
Ben Ramsey
3d9941fd1e
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-09 23:49:53 -05:00
Ben Ramsey
a9ffc447a4
Merge branch 'PHP-8.1' into PHP-8.2 2024-04-09 23:49:31 -05:00
Ben Ramsey
de4f7f9321
Update NEWS 2024-04-09 23:41:29 -05:00
Saki Takamachi
f56ba62ccf
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS: remove ZWSP
2024-04-10 10:00:29 +09:00
Saki Takamachi
20959c38ad
NEWS: remove ZWSP 2024-04-10 10:00:14 +09:00
David Carlier
645af9fb17
ext/sockets: adding solaris/illumos SO_EXCLBIND constant.
when set to "true", neutralises the effect of SO_REUSEADDR/SO_REUSEPORT
making the socket binding exclusive.

Close GH-13912
2024-04-09 21:41:22 +01:00
David Carlier
db2869346c
ext/posix: posix_isatty set errno for it too.
Close GH-13918
2024-04-09 17:34:03 +01:00
Niels Dossche
b701fa8a34
Update news 2024-04-08 21:04:34 +02:00
Niels Dossche
ea0268264b
Fix GH-13903: ASAN false positive underflow when executing copy()
Closes GH-13917.
2024-04-08 21:03:42 +02:00
qiangxuhui
0766ac6e35
loongarch64 support for fibers
Add loongarch64 assembly files from Boost, needed for fibers support,
and hook up loongarch64 fibers support during configure.

Close GH-13914
2024-04-08 18:59:02 +01:00
Niels Dossche
07fe3b2920
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix potential NULL pointer dereference before calling EVP_SignInit
2024-04-08 19:31:13 +02:00
icy17
6f8bda0582
Fix potential NULL pointer dereference before calling EVP_SignInit
Closes GH-13870.
2024-04-08 19:30:26 +02:00
Bob Weinand
f52b2a9cdc Merge branch 'PHP-8.2' into PHP-8.3 2024-04-08 15:10:29 +02:00
Bob Weinand
af098acd6e Always load EX(opline) into the current frame in JIT when observers are enabled
Fixes #13772.
Closes #13776.
2024-04-08 15:09:14 +02:00
Arnaud Le Blanc
0da1eb5fb9 [ci skip] NEWS 2024-04-08 15:03:21 +02:00
Arnaud Le Blanc
85d621242a [ci skip] NEWS 2024-04-08 15:01:15 +02:00
Niels Dossche
92136640aa
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
2024-04-07 21:37:01 +02:00
Niels Dossche
2aae14c8a9
Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
php_socket_errno() may return a stale value when recv returns a
value >= 0. As such, the liveness check is wrong.
This is the same bug as #70198 (fixed in GH-1456). So we fix it in the
same way.

Closes GH-13895.
2024-04-07 21:35:43 +02:00
David Carlier
d8f2900574
ext/pcntl: adding pcntl_getcpu.
using sched_getcpu under the hood (Linux and FreeBSD).
Returns the current cpu id for the current process.
For Linux, we need to see beyond the sole presence of the symbol
to consider it.
Mostly useful, for now, in the cpu affinity context since
the os can migrate processes as it sees fits otherwise.

Clos GH-13908
2024-04-07 20:05:03 +01:00
David Carlier
01817e99ab
ext/pcntl pcntl_signal_get_handler update.
The situation varies from platform to another, thus taking in
account the complexity of it.

Close GH-13902
2024-04-07 13:25:45 +01:00
David Carlier
1cf8291c85
ext/pcntl: cpu affinity api introduction.
For now, working on Linux, FreeBSD >= 13.x and DragonFlyBSD.
Handy wrapper to assign an array of cpu ids or to retrieve the cpu ids
assigned to a given process.

pcntl_setaffinity inserts valid unique cpu ids (within the range of available
cpus).

Close GH-13893
2024-04-07 00:56:54 +01:00
Niels Dossche
eb244fcb49
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-13891: memleak and segfault when using ini_set with session.trans_sid_hosts (#13892)
2024-04-06 13:45:00 +02:00
Niels Dossche
8367e9cc3b
[ci skip] NEWS 2024-04-06 13:44:34 +02:00