Commit Graph

1556 Commits

Author SHA1 Message Date
Máté Kocsis
330cc5cdb2
Deprecate implicit nullable parameter types (#12959)
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-03-13 21:40:26 +01:00
David Carlier
b3410360cc ext/gettext: updating apis accepting domain behavior.
to be more in line with the proper usage ; normally domain should not
be empty strings.

Close GH-13691
2024-03-13 20:33:47 +00:00
Ayesh Karunaratne
47949101ae
ext/sodium: Add new AEGIS constants to UPGRADING file (#13673)
Follow-up to #12867
[ci skip]
2024-03-11 22:16:22 +01:00
Niels Dossche
a47849deaf
Change return type of hash_update() to true (#13652)
It was already the case that this could only return true, update the
stubs to reflect that.

Closes GH-13614.
2024-03-09 20:02:50 +01:00
Niels Dossche
14b6c981c3
[RFC] Add a way to opt-in ext/dom spec compliance (#13031)
RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance
2024-03-09 16:56:00 +01:00
Niels Dossche
d6d3370034
Implement GH-13609: Dump wrapped object in WeakReference class (#13621)
I chose "object" as that's also the argument name in WeakReference::create.
2024-03-08 18:31:24 +01:00
Niels Dossche
3ddd341329 [ci skip] NEWS and UPGRADING
Closes GH-13466.
2024-03-07 20:27:19 +01:00
Marc Bennewitz
dbd976a67f
Singular DateTime::[get|set]Microsecond & no tentative return type (#13486)
* Singular DateTime::[get|set]Microsecond & no tentative return type

* Added missing getMicrosecond to DateTimeInterface
2024-03-06 09:18:22 +00:00
Niels Dossche
74c887b04e [ci skip] NEWS and UPGRADING 2024-03-05 20:54:56 +01:00
Ayesh Karunaratne
7b23470666
ext/pcre: Add "/r" modifier (#13583)
Adds support for "Caseless restricted" matching added in PCRE2lib
10.43 with the "r" modifier.

This is `PCRE2_EXTRA_CASELESS_RESTRICT` in PCRE2. This is an "extra"
option, which means it is not possible to pass this option as
pcre2_compile() function parameter.

This option is passed in a pcre2_set_compile_extra_options() call.
Previously, these extra options are set at php_pcre_init_pcre2(),
but after this change, it is possible to customize the options
by adding bits to `eoptions` in pcre_get_compiled_regex_cache_ex().

The tests for this change are ported from upstream test suite[^1].

[^1]: https://github.com/PCRE2Project/pcre2/commit/c13d54f6581#diff-8c8312e4eb2d35bb16485404b7b5cc0eaef0bca1aa95ff5febf6a1890048305c
2024-03-05 20:51:04 +01:00
Ayesh Karunaratne
353d4ce075
ext/xmlreader: Add class constant types to stub (#13596)
Declares class constant types for the `XMLReader` class.
2024-03-05 20:50:54 +01:00
David Carlier
7f01871915 ext/gettext: bind_textdomain_codeset should not accept empty domains.
the man page specifies that for bind_textdomain_codeset, like
bindtextdomain, the domain should not be an empty string.

close GH-13571
2024-03-02 18:59:18 +00:00
Ayesh Karunaratne
1b380d6ad5
UPGRADING: Minor adjustments moving items to appropriate sections (#13576)
- Moved curl_version()['feature_list'] to New Features
- Moved NumberFormatter::ROUND_HALFODD to New Features
- Removed contributor names (this pattern only used in the `NEWS` file)
- Removed "Fixed setAttribute and getAttribute" as it is covered in another change record
2024-03-02 19:34:03 +01:00
Gina Peter Banyard
47a199c8b4
Add http_(get|clear)_last_reponse_headers() functions (#12500)
This is to provide an alternative to the $http_response_header magic variable

RFC: https://wiki.php.net/rfc/http-last-response-headers
2024-02-29 16:41:09 +00:00
Gina Peter Banyard
dbf0b6aa42
ext/intl: Refactor ResourceBundle get and dimension access (#13503) 2024-02-26 17:03:17 +00:00
Niels Dossche
035a5fdf8c
Add LIBXML_RECOVER (#13504)
Setting the recovery option by using a hardcoded value (1) worked
already for SimpleXML. For DOM, a small change is necessary because
otherwise the recover field overwrites the recovery option.

From a quick search on GitHub [1] it looks like this won't clash with
existing PHP code as no one seems to define (or use) a constant with
such a name.

[1] https://github.com/search?q=LIBXML_RECOVER+language%3APHP&type=code&l=PHP
2024-02-25 21:03:37 +01:00
Máté Kocsis
7266e4fc6d
Add forgotten UPGRADING note for doc comment handling related changes
[skip-ci]
2024-02-25 16:02:09 +01:00
Niels Dossche
85217a044a Mark DOMXPath as uncloneable
This never resulted in a working XPath object anyway, as trying to query
or evaluate anything resulted in an "Invalid XPath context" error.
Supporting this is more trouble than it's worth, so just block the clone
operation.
2024-02-23 19:35:38 +01:00
Niels Dossche
205c8b642c [ci skip] NEWS and UPGRADING for DOMXPath::quote()
See commit 2f9320c00f.
2024-02-22 20:32:33 +01:00
Saki Takamachi
d29951891a
NEWS / UPGRADING 2024-02-23 01:12:34 +09:00
David CARLIER
9a3a4b5ba2
ext/intl: IntlDateFormatter class removing redundant error message info. (#13465)
Also correcting new IntlChar class constants typos.
2024-02-21 23:23:09 +00:00
David Carlier
8bc34dd1bf [ci skip] NEWS/UPGRADING 2024-02-21 16:24:27 +00:00
Ayesh Karunaratne
ba0f9fb501
ext/curl: Add feature_info assoc array to curl_version() (#13439)
The `phpinfo()` section of the Curl extension lists individual features
supported by the particular ext-Curl + libcurl build. However, the
`curl_version()` function return values do not indicate the same level of
details.

`curl_version()` has a `protocols` key that returns an array of all protocols
supported by the build. But the `features` key is a bitmask of all the features.
Checking the availability of certain feature requires knowing the corresponding
`CURL_VERSION` constant, and checking the availability of the constant and a
bitmask check for it in the `features` value.

For example, to determine HTTP2 support, it requires evaluating:

```php
defined('CURL_VERSION_HTTP2') && (curl_version()['features'] & CURL_VERSION_HTTP2 === CURL_VERSION_HTTP2)
```

To make feature availability checks more intuitive, this adds a new
`feature_list` key to `curl_version()` output array.

With it, checking for individual features availability is easier, and does
not require inspecting the availability of the `CURL_VERSION` constant and
the `features` key.

```php
!empty(curl_version()['feature_list']['HTTP2']);
```
2024-02-21 00:46:22 +00:00
Niels Dossche
ae5beff61b
Upgrade bundled pcre2lib to 10.43 (#13413) 2024-02-17 14:15:04 +01:00
Jorg Adam Sowa
492b9e09e9
Add entry on return type of long2ip to NEWS (#13408)
[skip ci] add entry on return type of long2ip to NEWS and to UPGRADING.
2024-02-16 17:31:21 +00:00
Steve Wall
f6016c702f ext/ldap: Add LDAP_OPT_X_TLS_PROTOCOL_MAX and LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
close GH-13405.
2024-02-15 21:43:46 +00:00
haszi
3ce7bf2a77
Clear handler status flag in handler init
Closes GH-13087
2024-02-09 12:00:56 +00:00
Ilija Tovilo
cd66fcc68b
Add request_parse_body() function
RFC: https://wiki.php.net/rfc/rfc1867-non-post

This function allows populating the $_POST and $_FILES globals for non-post
requests. This avoids manual parsing of RFC1867 requests.

Fixes #55815
Closes GH-11472
2024-02-08 12:08:07 +01:00
Marc Bennewitz
0016b3085c
Added DateTime[Immutable]::[get|set]Microseconds (#12557)
* Added DateTime[Immutable]::[get|set]Microseconds
2024-02-05 12:14:18 +00:00
Niels Dossche
05874d4c23 [ci skip] Make UPGRADING bullet points consistent 2024-02-04 23:02:58 +01:00
Niels Dossche
3b5986db69 Implement GH-12908: Show attribute name/class in ReflectionAttribute dump
This is consistent with how many other Reflection classes have a name
field, and it makes debugging easier.

Closes GH-12908.
Closes GH-12917.
2024-02-04 23:02:02 +01:00
Saki Takamachi
78970ef6b2
Fix GH-12143: Optimize round
Fixed an error in the result due to "pre-rounding" of the round function.

"Pre-rounding" has been abolished and the method of comparing numbers has
been changed.

Closes GH-12268.
2024-02-03 22:23:02 +09:00
Ayesh Karunaratne
edb9f65f16
ext/curl: Bump minimum Curl version to >= 7.61.0 (#13259)
Bumps the minimum required libcurl version to 7.61.0.

Please also see #4917, which bumped minimum libcurl version to the current >= 7.29.0.
This bumps the minimum requirement to Curl 7.61.0 (released 2018 Sept).

Ubuntu, Debian, RHEL, and RHEL derivatives have major and LTS version bumps this year. Following are the
libcurl-dev/libcurl-devel versions available in the oldest supported (LTS or otherwise) in major OSs.

 - Debian buster: [7.64](https://packages.debian.org/buster/libcurl4-openssl-dev)
 - Ubuntu 20.04: [7.68](https://packages.ubuntu.com/focal/libcurl-dev)
 - CentOS/RHEL 7: 7.29
 - RHEL 8/Rocky 8/EL 8: 7.61
 - Fedora 38: 7.87

RHEL/CentOS 7 reaches EOL mid 2024, so for PHP 8.4 scheduled towards the end of this year, we can safely
bump the minimum libcurl version.

7.61.0 was selected as the new minimum because RHEL and derivatives have libcurl-devel version 7.61. RHEL 8 is
a current and supported RHEL version.
2024-01-31 13:48:17 +00:00
Derick Rethans
987417e2e0
Remove ext/imap — it has been moved to PECL (#13190)
* Remove ext/imap — it has been moved to PECL

https://pecl.php.net/package/imap

* Remove files related to IMAP

* Remove IMAP CI files and set up

* Also disable IMAP on Circle CI

* Update CREDITS file

* Remove IMAP entry from CODEOWNERS

* Revert "Remove files related to IMAP"

This reverts commit a05ffd6c97.

* Mark IMAP is being removed

* Revert "Remove IMAP CI files and set up"

This reverts commit 82e5ba9910.

* Revert "Also disable IMAP on Circle CI"

This reverts commit e83827b0b2.

* Don't try to build imap extension with CI

* Restore test setup files

* Remove mention of imap in labeler, EXTENSIONS, and sample php.ini files
2024-01-22 12:56:05 +00:00
Vincent JARDIN
98e2948ca7 ext/openssl: Add X509 purpose constants.
- X509_PURPOSE_OCSP_HELPER.
- X509_PURPOSE_TIMESTAMP_SIGN.
- Also X509_PURPOSE_ANY is ok since 1.0.1+

Close GH-13149
2024-01-19 07:06:51 +00:00
Niels Dossche
4bd63568fb
Fix argument type of simplexml_import_dom (#13170)
It needs to be "object".
This is because first- and third-party extension can register custom
node types using `php_libxml_register_export`. So we don't know upfront
what types can be expected.

This also changes the error to a TypeError everywhere.
2024-01-18 20:28:01 +01:00
Ayesh Karunaratne
8cc472d5d0 ext/intl: Add NumberFormatter::ROUND_HALFODD
The NumberFormatter::ROUND_HALFEVEN constant exists in PHP already, but its counterpart ROUND_HALFODD was missing.
This adds it, using `UNUM_ROUND_HALF_ODD`

Close GH-13191
2024-01-18 18:12:44 +00:00
Niels Dossche
dcd2a0dde6
Make return type of trigger_error() and user_error() true (#13169) 2024-01-17 17:15:55 +01:00
Peter Kokot
d5dae8bdf1
[skip ci] Update upgrading docs for build related changes (#13176)
This updates the UPGRADING documents with current build system changes
done since the PHP-8.3 release.
2024-01-17 11:21:08 +00:00
Gina Peter Banyard
f7b498b02e
Use true as return types for SplHeap (#13147) 2024-01-15 10:09:38 +00:00
Daniil Gentili
c16ad918ba
Change default method of disabling JIT
https://wiki.php.net/rfc/jit_config_defaults
Closes GH-12678
2024-01-15 09:39:13 +01:00
Niels Dossche
90785dd865
[RFC] Improve callbacks in ext/dom and ext/xsl (#12627) 2024-01-13 00:00:26 +01:00
Tim Düsterhus
e31bf3ad4d
UPGRADING: Add new PHP_ROUND_* to global constants section
see 94ddc74c9a
see #12056
2024-01-12 17:53:03 +01:00
Max Semenik
a2b2830f9b
ext/standard: make debug_zval_dump() output whether the array is packed (#12641) 2024-01-12 00:33:14 +00:00
Máté Kocsis
d6a0b3af68
Implement PDO driver-specific subclasses
RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses
Closes GH-12804

Co-Authored-By: Danack <Danack@basereality.com>
2024-01-11 23:22:41 +01:00
hanshenrik
fc16285538 ext/curl: deprecate CURLOPT_BINARYTRANSFER
This is long overdue, CURLOPT_BINARYTRANSFER has been a no-op since PHP5.1.2 in 2004 (ref https://bugs.php.net/bug.php?id=55635 )

Close GH-13114.
2024-01-10 18:16:52 +00:00
Ilija Tovilo
d7d0d19d32
Support index.php fallback for files in built-in server
If no router script is used, the built-in webserver will now look for a fallback
index file recursively in all cases, including URLs with a period.

Fixes GH-12604
Closes GH-12992
2024-01-09 16:13:39 +01:00
haszi
90800b62bb
Change PHP_ZTS and PHP_DEBUG to bool to match their ZEND equivalents (#13079)
Co-authored-by: haszi <haszika80@gmail.com>
2024-01-07 13:38:26 +00:00
Jakub Zelenka
e0679f3d5e
Introduce new serial_hex parameter to openssl_csr_sign
Co-authored-by: Florian Sowade <f.sowade@suora.com>

Closes GH-13023
Closes GH-9851
2024-01-05 14:40:22 +00:00
Máté Kocsis
0b7cd1423a
Add upgrading note about PHP_OUTPUT_HANDLER_PROCESSED
[skip-ci]
2024-01-04 16:05:49 +01:00