Commit Graph

1639 Commits

Author SHA1 Message Date
Benjamin Eberlei
72c874691b
RFC: Add #[\Deprecated] Attribute (#11293)
see https://wiki.php.net/rfc/deprecated_attribute

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-07-02 09:44:25 +02:00
Kamil Tekiela
62a3bbd0e3
Remove MYSQLI_SET_CHARSET_DIR (#14724) 2024-06-29 22:21:03 +02:00
Niels Dossche
4cab7f90a1 [RFC] Implement XMLReader::fromUri() and XMLReader::fromString() 2024-06-29 09:04:35 -07:00
Niels Dossche
c24b8fe616 [RFC] Implement XMLWriter::toUri() and XMLWriter::toMemory() 2024-06-29 09:04:35 -07:00
Niels Dossche
acf2762857 [RFC] Add stream open functions to XML{Reader,Writer}
RFC: https://wiki.php.net/rfc/xmlreader_writer_streams
2024-06-29 09:04:35 -07:00
Ayesh Karunaratne
421ac9ac28 ext/mbstring: update to Unicode 15
Updates UCD to Unicode 15.1 (released 2023 Sept). The upcoming
Unicode 16 version will be released roughly on 2024 Sept.

Previously: 0fdffc18, #7502

UCD 15.1 `DerivedNormalizationProps` contains multiple properties in
the same line, which breaks the parser. This also updates the
`ucgendat.php` script to allow 2 or three fields in each line, and to
look for the `Cased` and `Case_Ignorable` properties in either of the
fields to mimic the previous behavior.
2024-06-29 17:24:52 +02:00
Tim Düsterhus
ac54d1c039
hash: Add simple HashContext::__debugInfo() implementation (#14644)
* hash: Add simply HashContext::__debugInfo() implementation

* NEWS/UPGRADING
2024-06-27 19:29:37 +02:00
Niels Dossche
1501da0bf9 NEWS and UPGRADING for new DOM features RFC 2024-06-26 12:17:12 -07:00
Peter Kokot
4f450b6264
Bump minimum libpq version to 10.0 (#14628)
This bumps the libpq client-side PostgreSQL library minimum required
version from 9.1 to 10.0.

- Sanity check: PQlibVersion -> PQencryptPasswordConn (available since
  libpq 10.0)
- PQsetErrorContextVisibility (available since libpq 9.6)
- lo_truncate64 (available since libpq 9.3), if 32-bit system doesn't
  support lo_*64 functions, error is returned and functions are always
  available

Additionally, the conditional functions usages in pdo_pgsql and pgsql
extensions that got piled up are cleaned and synced:

- pg_prepare (PQprepare available since libpq 7.4)
- pg_query_params (PQexecParams available since libpq 7.4)
- pg_result_error_field (PQresultErrorField available since libpq 7.4)
- pg_send_prepare (PQsendPrepare available since libpq 7.4)
- pg_send_query_params (PQsendQueryParams available since libpq 7.4)
- pg_set_error_verbosity (PQsetErrorVerbosity available since libpq 7.4)
- pg_transaction_status (PQtransactionStatus available since libpq 7.4)

The Windows libpq version is currently at version 11.4:
https://github.com/winlibs/postgresql

Discussion: https://news-web.php.net/php.internals/123609
Follow-up of GH-14540
2024-06-25 20:50:04 +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
Ayesh Karunaratne
5a6f07e23c
UPGRADING: add ext/oci8 and ext/pdo_oci removal to UPGRADING file (#14619)
Fixes [13327-comment](https://github.com/php/php-src/pull/13327#issuecomment-2176327609)

Signed-off-by: Ayesh Karunaratne <ayesh@aye.sh>
2024-06-21 08:45:53 +01:00
David Carlier
9672cd9469
ext/sockets: Adding macOS SO_LINGER_SEC constant.
macOS SO_LINGER, unlike other platforms, functions in term of ticks,
SO_LINGER_SEC is provided to be in line with other platforms.

close GH-14599
2024-06-18 21:57:40 +01:00
Matteo Beccati
329dfa7e0e
[ci skip] Updated NEWS and UPGRADING 2024-06-17 23:58:09 +02:00
David Carlier
564914ac1a
ext/pgsql: adding postgresql 17 new libpq wrapper call.
pg_set_chunked_rows_size to allow to fetch results in chunk of max N rows.

close GH-14571
2024-06-15 19:56:15 +01:00
David Carlier
2bb8fbd0a8
ext/pgsql: add pg_jit server info.
since PostgreSQL 11, LLVM JIT feature had been brought thus reporting
the settings to the client connection.

Close GH-14566
2024-06-14 16:27:00 +01:00
Arnaud Le Blanc
b4325d6113
Improve randomness of uploaded file names and files created by tempnam()
Closes GH-14364
2024-06-10 15:37:51 +02:00
Jakub Zelenka
98736e8bbd
Fix GH-13343: openssl_x509_parse should not allow omitted seconds in UTCTimes
Closes GH-14439

Signed-off-by: Jakub Zelenka <bukka@php.net>
2024-06-09 12:35:05 +01:00
Guillaume Outters
a9259c0496
Add Pdo\Pgsql::setNoticeCallback() (#14299)
This moves the new method from magically being added to the PDO class from the driver to just be available on the dedicated subclass. 

Drive-by fixes to NEWS and UPGRADING
2024-06-09 03:04:51 +01:00
Ayesh Karunaratne
d1f14a4609
ext/pcre: update to PCRE2 v10.44 (#14498)
Previously: GH-13413.

This version also contains a fix with `preg_match('\X')`, so that it
can correctly detect grapheme clusters (PCRE2Project/pcre2#410).
This is useful to correctly [polyfill the new `grapheme_str_split`
function](https://php.watch/versions/8.4/grapheme_str_split#polyfill).

Diff: pcre2lib [v10.43..v10.44](https://github.com/PCRE2Project/pcre2/compare/pcre2-10.43...pcre2-10.44)
2024-06-08 13:03:31 +02:00
David Carlier
7b2ca071c5
ext/gd: imagewebp/imageavif/imagepng/imagejpeg stricter checks quality/speed.
close GH-14485
2024-06-05 23:07:57 +01:00
Ayesh Karunaratne
c7366cf6a5
UPGRADING: move Opcache changes to the correct section (#14482)
[ci skip]

Signed-off-by: Ayesh Karunaratne <ayesh@aye.sh>
2024-06-05 20:31:32 +02:00
Niels Dossche
259744148e
Cache pcre subpattern table (#14424)
Recreating this over and over is pointless, cache this as well.
Fixes GH-14423.
2024-06-03 21:15:26 +02:00
David Carlier
e69bccd7c7
ext/pgsql: adding pg_socket_poll.
Using PQSocketPoll to poll on a connection's socket.
Returns immediatly is there no event expected on read and write.
Other than that, it is a thin wrapper on top of poll, thus reflecting
 its return value.

close GH-14366
2024-05-31 20:10:49 +01:00
Joshua Rüsweg
e4a8d5b16f
RFC: array_find (#14108)
see https://wiki.php.net/rfc/array_find
2024-05-31 19:39:12 +02:00
Gina Peter Banyard
cd44826c1a
[skip ci] Update UPGRADING after Intl refactoring 2024-05-30 13:02:44 +01:00
Niels Dossche
c7797fc8c0
Fix bug GH-11941: soap with session persistence will silently fails when "seession" built as a shared object (#14362)
This adds an optional dependency on the session extension and adds the
necessary APIs to make the functionality work with lazy binding.

This can be tested by configuring PHP with `--enable-session=shared` and
`--enable-soap=shared` and running the test suite, in particular the
buggy behaviour can be observed by the existing test `server009.phpt`.
2024-05-29 19:51:49 +02:00
Tim Düsterhus
8a87206211
reflection: Add ReflectionGenerator::isClosed() (#14358)
* reflection: Add `ReflectionGenerator::isClosed()`

see https://github.com/php/php-src/pull/14167#issuecomment-2133641998

* Fix test expectation

* Drop `{{{` / `}}}` comments around `ReflectionGenerator::isClosed()`
2024-05-29 19:07:09 +02:00
Peter Kokot
cb2c5de3db
Add PHP_SBINDIR (#13363)
The PHP_SBINDIR symbol was defined on *nix systems but never used. This
adds the constant similar to PHP_BINDIR also to PHP. On Windows it is
the value of prefix configuration when PHP was built (same value as
PHP_BINDIR).
2024-05-29 07:04:05 +02:00
David Carlier
162a311cc8
ext/pgsql: adding pg_put_copy_data/pg_put_copy_end.
pg_put_copy_data allows to send COPY commands to the server.
pg_put_copy_end signals the end of the n commands.

Both return 3 states ; 1, 0 and -1 when 1 is success, 0 the buffer queue
is full then -1 for errors.

Close GH-14325
2024-05-28 18:35:40 +01:00
Valentin Udaltsov
b6b16a1758
[RFC] Implement dereferencable for new exprs with constructor args
https://wiki.php.net/rfc/new_without_parentheses

Closes GH-13029
2024-05-28 00:23:12 +02:00
Manuel Mausz
5f2a0c8383
Add support for Curve25519 + Curve448 based keys
For openssl_pkey_get_details we export the priv+pub parameters.

ED25519/ED448 do not support streaming, so we need to use
EVP_Digest{Sign,Verify} instead. In general the older EVP_{Sign,Verify}
interface should be avoided as the key is passed very late.
See BUGS section in OpenSSL manpages of EVP_{Sign,Verify}Final

Additionally per requirement we need to allow sign/verify without
digest. So we need to allow passing 0 as digest. In OpenSSL 3.0+ this also
corresponds to the default digest (see EVP_PKEY_get_default_digest_name).

For CSR creation we need to allow "null" as digest_alg option.

Closes GH-14052
2024-05-27 12:52:57 +01:00
Jorg Sowa
23afe57f01
Added deprecation Division by zero when using power with zero as base and negative exponent
RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number

Closes GH-13128
2024-05-22 15:05:47 +02:00
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
Jorg Adam Sowa
c4d9a37e81
Typed constants in date extension (#12361) 2024-05-22 13:17:44 +02: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
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
Niels Dossche
aa3e6eec50
Optimize and reduce memory usage of XML serialization (#14204)
The serialization process uses the system allocator and requires a copy
to request allocated memory once finished. This patch improves this by
using smart_str to build the resulting string, reducing the number of
copies and reducing total peak memory usage.
2024-05-12 01:57:29 +02:00
Niels Dossche
2956f55d17
[ci skip] UPGRADING: Update capitalization of Dom namespace 2024-05-09 12:47:39 +02:00
Niels Dossche
25860ee670
[ci skip] UPGRADING: Expand upon BCMath performance improvements 2024-05-09 12:46:42 +02:00
Máté Kocsis
920591064e Migrate SOAP table resource to array
Related to https://wiki.php.net/rfc/resource_to_object_conversion and https://github.com/php/php-tasks/issues/6
2024-05-08 22:48:19 +02:00
Máté Kocsis
60336de2ba Migrate SOAP SDL resource to object
Related to https://wiki.php.net/rfc/resource_to_object_conversion and https://github.com/php/php-tasks/issues/6
Closes GH-14121
2024-05-07 09:21:39 +02:00
Máté Kocsis
44b3cb2a13 Migrate SOAP URL resource to object
Related to https://wiki.php.net/rfc/resource_to_object_conversion and https://github.com/php/php-tasks/issues/6
2024-05-07 09:21:39 +02: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
10ae87969e
NEWS/UPGRADING 2024-05-01 22:02:43 +09:00
Tim Düsterhus
b5ffac7f6a
Add ReflectionClassConstant::isDeprecated() (#14086)
This is in preparation for php/php-src#11293 and for consistency with
ReflectionConstant::isDeprecated() that was added in php/php-src#13669.
2024-04-30 17:26:27 +02:00
Ilija Tovilo
cb55588a7e
Skip online tests by default
Fixes GH-14058
Closes GH-14070
2024-04-30 14:10:46 +02:00