doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

PHP 8.4 documentation tracker

Open Girgias opened this issue 1 year ago • 26 comments

Pages which need to be added/modified for complete documentation of PHP 8.4:

Based of the migration guide: https://www.php.net/manual/en/migration84.php (#3822):

Related to https://github.com/php/doc-base/pull/165

[!NOTE] This issue is still a Work In Progress Missing items:

  • [ ] PCRE changes

[!IMPORTANT] Priority should be given to documenting Core language and ext/standard behavioural changes

Core

New features: ✅

  • [x] Property Hooks (Partial #4037, #4094)
  • [x] Asymmetric Property Visibility (#3828)
  • [x] Lazy Objects (#3975)
  • [x] #[\Deprecated] attribute (#3894)
  • [x] request_parse_body() Parsing RFC1867 (multipart) requests in non-POST HTTP requests (#4108)
  • [x] new without parenthesis (#3978)
  • [x] Improved debugging info output for WeakReferences (#4256)
  • [x] Improved debugging info output for Closures (#4257)
  • [x] ~~Defining Identical Symbols in Different Namespace Blocks~~ This is more of a bugfix than anything else

Deprecated: ✅

  • [x] Implicitly nullable parameter (#4008)
  • [x] Raising zero to the power of negative number (#4102)
  • [x] Using underscore _ as class name (#4099)
  • [x] trigger_error() with E_USER_ERROR (#4056, #4063)
  • [x] E_STRICT constant (#4056)

BC Break:

  • [x] exit() behavioural changes (#4070)
  • [ ] Recursion during comparison
  • [ ] Indirect Modification of readonly Properties
  • [ ] Temporary Filename Length
  • [x] ~~Removal of E_STRICT error level~~ This is an internal engine change

New Functions: ✅

  • [x] request_parse_body (#4108)

New Classes: ✅

  • [x] Deprecated (#3894)
  • [x] RequestParseBodyException (#4108)

New Constants: ✅

  • [x] PHP_OUTPUT_HANDLER_PROCESSED (https://github.com/php/doc-en/pull/3039, https://github.com/php/doc-en/pull/3587)
  • [x] PHP_SBINDIR (https://github.com/php/doc-en/pull/3423)

Changed Functions: ✅

  • [x] trigger_error() and user_error() have a return type of true instead of bool now (#4063)

Other Changes:

  • [ ] Closures names
  • [x] Fibers (#4060)
    • [x] Fiber switching during destructor execution is now allowed.
    • [x] Destructors may now be executed in a separate Fiber
    • [x] GC triggered in Fiber behavioural change
  • [x] Output Handlers
    • [x] Output handler status flags are now cleared (https://github.com/php/doc-en/pull/4350)
    • [x] output_add_rewrite_var() now uses url_rewriter.hosts INI (https://github.com/php/doc-en/pull/4351)

SAPI

apache2handler:

  • [ ] Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache version is now 2.4.

FPM:

  • [x] Flushing headers without a body will now succeed. (https://github.com/php/doc-en/pull/4122)
  • [x] Status page has a new field to display a memory peak. (#4335)
  • [x] The /dev/poll events.mechanism setting for Solaris/Illumos had been retired. (noted in #4334)

CLI:

  • [ ] The builtin server looks for an index file recursively by traversing parent directories in case the specified file cannot be located. This process was previously skipped if the path looked like it was referring to a file, i.e. if the last path component contained a period. In that case, a 404 error was returned. The behavior has been changed to look for an index file in all cases.

Class constants are now typed

  • [x] ext/date (#4237)
  • [x] ext/intl (#4238)
  • [x] ext/pdo (#4243)
  • [x] ext/reflection (#4244)
  • [ ] ext/spl
  • [ ] ext/sqlite
  • [x] ext/xmlreader (https://github.com/php/doc-en/pull/4139)

New warnings and exceptions ✅

All done, collapsed for readability

cURL: ✅

  • [x] curl_multi_select()now throws a ValueError if $timeout is less than 0 or greater than PHP_INT_MAX (#3965)

GD: ✅

  • [x] imagejpeg(), imagepng(), imageavif(), imagewebp() now throw a ValueError if $quality is invalid (#3962)
  • [x] imageavif() now throw a ValueError if $speed is invalid (#3962)
  • [x] imagescale() now throw a ValueError if $mode is invalid (#3962)
  • [x] imagescale() now throw a ValueError if $width or $height over/underflows (#3962)
  • [x] imagefilter() now throw a ValueError with the IMG_FILTER_SCATTER filter if $sub or $plus over/underflows (#3962)

GetText: ✅

  • [x] bind_textdomain_codeset(), textdomain(), d*gettext() now throw a ValueError if $domain is the empty string (#3964)

Intl: ✅

  • [x] resourcebundle_get(), ResourceBundle::get(), and offset access for ResourceBundle
    • [x] TypeError for invalid offset types
    • [x] ValueError for an empty string
    • [x] ValueError if the integer index does not fit in a signed 32 bit integer
  • [x] IntlDateFormatter::__construct() now throws a ValueError if $locale is invalid
  • [x] NumberFormatter::__construct() now throws a ValueError if $locale is invalid

MBstring: ✅ (#4245)

  • [x] mb_encode_numericentity(), mb_decode_numericentity() now check that $map only has integers
  • [x] mb_http_input() throws ValueError if $type is invalid
  • [x] mb_http_output() throws ValueError if $encoding has null bytes

ODBC: ✅

  • [x] odbc_fetch_row() returns false when $row =< 0, this now warns (#4258)

PCNTL: ✅ (#4208)

  • [x] pcntl_sigprocmask(), pcntl_sigwaitinfo(), and pcntl_sigtimedwait
    • [x] ValueError if $signals array is empty
    • [x] TypeError if $signals array value is not int
    • [x] ValueError if $signals array value is not valid signal
  • [x] pcntl_sigprocmask()
    • [x] ValueError if $mode is not one of SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK
  • [x] pcntl_sigtimedwait()
    • [x] ValueError if $seconds is less than 0
    • [x] ValueError if $nanoseconds is less than 0
    • [x] ValueError if $seconds and $nanoseconds are both 0

SimpleXML: ✅

  • [x] simplexml_import_dom() throws TypeError instead of ValueError if called with non XML object (https://github.com/php/doc-en/pull/3906)

Standard: ✅

  • [x] round() now throws a ValueError for invalid $mode, before interpreted as PHP_ROUND_HALF_UP (#4259)
  • [x] #3968
  • [x] ValueError and ValueError are thrown if the "allowed_classes" option of unserialize() is not an array of class names (#4260)
  • [x] str_getcsv() (#4093)
    • [x] ValueError if $separator is not one byte long
    • [x] ValueError if $enclosure is not one byte long
    • [x] ValueError if $escape is not one byte long or the empty string

XMLReader: ✅ (https://github.com/php/doc-en/pull/4123)

  • [x] XMLReader::open() throws ValueError if $encoding is invalid / has nulls
  • [x] XMLReader::XML() throws ValueError if $encoding is invalid / has nulls

XMLWriter: ✅ (https://github.com/php/doc-en/pull/4123)

  • [x] Passing an encoding that contain null bytes now throws a ValueError

XSL: ✅

  • [x] Failure to call a PHP function callback during evaluation now throws instead of emitting a warning. (https://github.com/php/doc-en/pull/4483)
  • [x] XSLTProcessor::importStyleSheet() throws TypeError instead of ValueError if called with non XML object. (https://github.com/php/doc-en/pull/4136)
  • [x] XSLTProcessor::setParameter() parameters that contain null bytes now throws a ValueError (https://github.com/php/doc-en/pull/4135)

Resource to Object conversions

DBA: ✅

  • [x] Dba\Connection (#3914)

ODBC:

  • [ ] Odbc\Connection
  • [ ] Odbc\Result

Soap:

  • [ ] Soap\Url
  • [ ] Soap\Sdl

Removed extensions ✅ (#4103)

  • [x] ext/imap
  • [x] ext/pspell
  • [x] ext/oci8
  • [x] ext/pdo_oci

Extensions

cURL: ✅

  • [x] Deprecated:
    • [x] CURLOPT_BINARYTRANSFER constant (php/doc-en#3818)
  • [x] Other Changes:
    • [x] The minimum libcurl version required is now 7.61.0 (php/doc-en#4069)
    • [x] CURLOPT_DNS_USE_GLOBAL_CACHE constant has no effect (php/doc-en#4069)
  • [x] New Features:
    • [x] curl_version() returns an additional feature_list value, which is an associative array of all known cURL features (php/doc-en#4069)
    • [x] Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION (php/doc-en#4069)
    • [x] Added CURLOPT_PREREQFUNCTION as a cURL option that accepts a callable to be called after the connection is made, but before the request is sent. This callable must return either CURL_PREREQFUNC_OK or CURL_PREREQFUNC_ABORT to allow or abort the request (php/doc-en#4069)
    • [x] Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value (php/doc-en#4069)
    • [x] Added CURLOPT_DEBUGFUNCTION as a cURL option that accepts a callable that gets called during the request lifetime with the CurlHandle object, an integer containing the debug message type, and a string containing the debug message (php/doc-en#4069)
    • [x] The curl_getinfo() now returns an additional posttransfer_time_us key, containing the number of microseconds from the start until the last byte is sent. When a redirect is followed, the time from each request is added together. This value can also be retrieved by passing CURLINFO_POSTTRANSFER_TIME_T to the curl_getinfo() option parameter. This requires libcurl 8.10.0 or later (php/doc-en#4069)

Date: ✅

  • [x] Deprecated:
    • [x] The DatePeriod::__construct(string $isostr, int $options = 0) signature is now deprecated. Use DatePeriod::createFromISO8601String() instead. (7d81260767f008218ffd338b365cfa3d10eb3d15)
    • [x] The SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, and SUNFUNCS_RET_DOUBLE constants are now deprecated. (#4006)

DBA: ✅

  • [x] Deprecated:
    • [x] Passing null or false to dba_key_split() is now deprecated. It would always return false in those cases. (#4007)
  • [x] New Classes
    • [x] Dba\Connection (#3914)

DOM: ✅

  • [x] BC Break:
    • [x] Some DOM methods previously returned false or a PHP_ERR DOMException if a new node could not be allocated. They now consistently throw an INVALID_STATE_ERR DOMException. (Skipped as this is rare and can be documented as part of PHP_ERR deprecation.)
    • [x] DOMImplementation::createDocument() now has a tentative return type of DOMDocument (https://github.com/php/doc-en/pull/3901)
    • [x] No longer possible to clone DOMXPath objects (https://github.com/php/doc-en/pull/3925)
    • [x] ~~DOMImplementation::getFeature() has been removed~~
  • [x] Deprecated: (https://github.com/php/doc-en/pull/4113)
    • [x] The DOM_PHP_ERR constant is now deprecated.
    • [x] The DOMDocument::$actualEncoding property is now formally deprecated.
    • [x] The DOMDocument::$config property is now formally deprecated.
    • [x] The DOMEntity::$actualEncoding property is now formally deprecated.
    • [x] The DOMEntity::$encoding property is now formally deprecated.
    • [x] The DOMEntity::$version property is now formally deprecated.
  • [x] New Methods:
    • [x] Added the DOMNode::compareDocumentPosition() with its associated constants: (https://github.com/php/doc-en/pull/4081)
      • [x] DOMNode::DOCUMENT_POSITION_DISCONNECTED
      • [x] DOMNode::DOCUMENT_POSITION_PRECEDING
      • [x] DOMNode::DOCUMENT_POSITION_FOLLOWING
      • [x] DOMNode::DOCUMENT_POSITION_CONTAINS
      • [x] DOMNode::DOCUMENT_POSITION_CONTAINED_BY
      • [x] DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    • [x] DOMXPath::registerPhpFunctionNS() (https://github.com/php/doc-en/pull/4129)
    • [x] DOMXPath::quote() (https://github.com/php/doc-en/pull/3909)
  • [x] Other changes:
    • [x] DOMDocument::registerNodeClass() now has a tentative return type of true instead of bool (https://github.com/php/doc-en/pull/4082)

GMP:

  • [x] BC Break:
    • [x] GMP is now final (#3990)
  • [ ] Other Changes:
    • [ ] Now possible to cast GMP to bool, before was a E_RECOVERABLE_ERROR

Hash: ✅ (https://github.com/php/doc-en/pull/4137)

  • [x] Deprecated:
    • [x] Passing invalid options to hash functions is now deprecated.
  • [x] Other changes:
    • [x] hash_update() now has a tentative return type of true instead of bool

Intl:

  • [x] Deprecated: (#4207)
    • [x] Calling intlcal_set() or IntlCalendar::set() with more than 2 arguments is deprecated, use IntlCalendar::setDate() or IntlCalendar::setDateTime() instead.
    • [x] Calling intlgregcal_create_instance() or IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead.
  • [x] New Features: (#4207)
    • [x] Added the NumberFormatter::ROUND_HALFODD to complement the existing NumberFormatter::ROUND_HALFEVEN functionality.
    • [x] Added NumberFormatter::ROUND_TOWARD_ZERO and NumberFormatter::ROUND_AWAY_FROM_ZERO as aliases for NumberFormatter::ROUND_DOWN and NumberFormatter::ROUND_UP to be consistent with the new RoundingMode modes.
  • [ ] Other changes:
    • [ ] ResourceBundle::get() now has a tentative return type of ResourceBundle|array|string|int|null
    • [ ] The idn_to_ascii() and idn_to_utf8() functions now always throw ValueErrors if the domain name is empty or too long.
    • [ ] The idn_to_ascii() and idn_to_utf8() functions now always throw ValueErrors if the variant parameter is not INTL_IDNA_VARIANT_UTS46.
    • [ ] The behaviour of Intl class has been normalized to always throw Error exceptions when attempting to use a non-initialized object, or when cloning fails.

LDAP:

  • [ ] Deprecated: (#4066)
    • [ ] Calling ldap_connect() with more than 2 arguments is deprecated, use ldap_connect_wallet() instead.
    • [ ] Calling ldap_exop() with more than 4 arguments is deprecated, use ldap_exop_sync() instead.

libxml: ✅ (https://github.com/php/doc-en/pull/4051)

  • [x] Other changes:
    • [x] The minimum libxml2 version required is now 2.9.4.
    • [x] libxml_set_streams_context() now immediately throws a TypeError when a non-stream-context resource is passed to the function, instead of throwing later when the stream context is used.

MBString:

  • [ ] BC Break:
    • [ ] On invalid strings (those with encoding errors), mb_substr() now interprets character indices in the same manner as most other mbstring functions. This means that character indices returned by mb_strpos() can be passed to mb_substr().
    • [ ] For SJIS-Mac (MacJapanese) strings, character indices passed to mb_substr() now refer to the indices of the Unicode codepoints which are produced when the string is converted to Unicode. This is significant because around 40 SJIS-Mac characters convert to a sequence of multiple Unicode codepoints.
  • [ ] Other changes:
    • [ ] The behavior of mb_strcut() is more consistent now on invalid UTF-8 and UTF-16 strings. There is no behavioural change for valid UTF-8 and UTF-16 strings.
    • [ ] Unicode data tables have been updated to Unicode 16.0.

MySQLi: ✅

  • [x] BC Break:
    • [x] MYSQLI_SET_CHARSET_DIR constant has been removed (#3960)
    • [x] MYSQLI_STMT_ATTR_PREFETCH_ROWS constant has been removed (#3960)
    • [x] MYSQLI_CURSOR_TYPE_FOR_UPDATE constant has been removed (#3960)
    • [x] MYSQLI_CURSOR_TYPE_SCROLLABLE constant has been removed (#3960)
    • [x] MYSQLI_TYPE_INTERVAL constant has been removed (#3960)
  • [x] Deprecated:
    • [x] mysqli_ping() (#3958)
    • [x] mysqli::ping() (#3958)
    • [x] mysqli_kill() (#3958)
    • [x] mysqli::kill() (#3958)
    • [x] mysqli_refresh() (#3958)
    • [x] mysqli::refresh() (#3958)
    • [x] All MYSQLI_REFRESH_* constants (#3959)
    • [x] Passing the $mode parameter explicitly to mysqli_store_result() (699e596)
    • [x] MYSQLI_STORE_RESULT_COPY_DATA constant (#3959)

MySQLnd:

  • [ ] BC Break:
    • [ ] The error code reported for MySQL server wait timeouts has been changed from 2006 to 4031 for MySQL server versions 8.0.24 and above.
  • [ ] Other changes:
    • [ ] Support for the new VECTOR data type from MySQL 9.

ODBC

  • [ ] Other changes:
    • [ ] The row of odbc_fetch_object(), odbc_fetch_array(), and odbc_fetch_into() now have a default value of null, consistent with odbc_fetch_row(). Previously, the default values were -1, -1, and 0, respectively.

Opcache:

  • [ ] BC Break:
    • [x] The maximum value of the opcache.interned_strings_buffer setting on 64bit architectures is now 32767. Previously it was 4095. (#4061)
    • [ ] JIT Changes:
      • [ ] Default Config
      • [ ] Fatal Error on initialization failure

OpenSSL: ✅

  • [x] New Features:
  • [x] Other changes:
    • [x] The extra_attributes in openssl_csr_new() sets the CSR attributes instead of subject DN, which incorrectly done previously. (#4315)
    • [x] The dn in openssl_csr_new() allows setting an array of values for a single entry. (#4315)
    • [x] New serial_hex added to openssl_csr_sign() to allow setting serial numbers in the hexadecimal format. (#4316)
    • [x] Parsing ASN.1 UTCTime with openssl_x509_parse() fails if seconds are omitted for OpenSSL version below 3.2 (-1 is returned for such fields). OpenSSL version above 3.3 did not load such certificates already. (#4317)
    • [x] The minimum OpenSSL version required is now 1.1.1. (#4318)

PCNTL:

  • [ ] BC Break:
    • [ ] pcntl_sigprocmask(), pcntl_sigwaitinfo(), and pcntl_sigtimedwait() now always return false on failure, in some cases they would previously return -1.
  • [x] New Enum:
    • [x] Pcntl\QosClass (https://github.com/php/doc-en/pull/4095, #4104)
  • [ ] New functions:
    • [ ] pcntl_getcpu
    • [ ] pcntl_getcpuaffinity
    • [ ] pcntl_getqos_class
    • [ ] pcntl_setns
    • [ ] pcntl_waitid

PCRE:

  • [ ] TODO all changes related to lib update
  • [ ] BC Break:
    • [ ] The bundled pcre2lib has been updated to version 10.44.
  • [ ] New Features
    • [ ] TODO
    • [x] Added support for the r (PCRE2_EXTRA_CASELESS_RESTRICT) modifier, as well as the (?r) mode modifier. When enabled along with the case-insensitive modifier (i), the expression locks out mixing of ASCII and non-ASCII characters. (https://github.com/php/doc-en/pull/4078)

PDO:

  • [ ] New Features
    • [x] Subclasses and PDO::connect() (php/doc-en#4115)
    • [ ] Added a custom parser supporting:
      • [ ] single and double-quoted literals, with doubling as escaping mechanism
      • [ ] two-dashes and non-nested C-style comments
  • [ ] Other changes:
    • [ ] It is now possible to fetch the value of the PDO::ATTR_STRINGIFY_FETCHES attribute with PDO::getAttribute().
    • [ ] ~~It is now possible to fetch the value of the PDO::PGSQL_ATTR_RESULT_MEMORY_SIZE attribute with PDO::getAttribute().~~

PDO_DBLIB:

  • [ ] BC Break:
    • [ ] The DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER and DBLIB_ATTR_DATETIME_CONVERT attributes are now booleans, previously they were int.

PDO_FIREBIRD:

  • [ ] BC Break:
    • [ ] The ATTR_AUTOCOMMIT attribute is now boolean, previously was int.
    • [ ] The extension now requires a C++ compiler and fbclient 3.0 or higher

PDO_MYSQL:

  • [ ] BC Break:
    • [ ] The ATTR_AUTOCOMMIT, ATTR_EMULATE_PREPARES, and MYSQL_ATTR_DIRECT_QUERY attributes are now booleans, previously they were int.
  • [x] New Features
    • [x] Added a custom parser supporting: (php/doc-en#4115)
      • [x] single and double-quoted literals, with doubling and backslash as escaping mechanism
      • [x] backtick literal identifiers and with doubling as escaping mechanism
      • [x] two dashes followed by at least 1 whitespace, non-nested C-style comments, and hash-comments

PDO_PGSQL:

  • [ ] BC Break:
    • [ ] The DSN's credentials, when set, are given priority over their PDO constructor counterparts, being closer to the documentation states.
  • [ ] Deprecated:
    • [ ] Using escaped question marks (??) inside dollar-quoted strings is deprecated.
  • [x] New Features
    • [x] Added a custom parser supporting: (php/doc-en#4115)
      • [x] single and double-quoted literals, with doubling as escaping mechanism
      • [x] C-style "escape" string literals (E'string')
      • [x] dollar-quoted string literals
      • [x] two-dashes and C-style comments (non-nested)
      • [x] support for ?? as escape sequence for the ? operator
  • [ ] Other changes:
    • [ ] The minimum libpq version required is now 10.0.

PGSQL:

  • [ ] Deprecated:
    • [ ] 2 argument signature of pg_fetch_result, pg_field_prtlen, and pg_field_is_null() is now deprecated, use an explicit value of null for $row parameter
  • [ ] Other changes:
    • [ ] The conditions parameter of pg_select() is now optional and accepts an empty array.
    • [ ] The minimum libpq version required is now 10.0.

PDO_SQLITE: ✅

  • [x] New Features
    • [x] Added a custom parser supporting: (php/doc-en#4115)
      • [x] single, double-quoted, and backtick literals, with doubling as escaping mechanism
      • [x] square brackets quoting for identifiers
      • [x] two-dashes and C-style comments (non-nested)

Phar: ✅ (https://github.com/php/doc-en/pull/4050)

  • [x] New Features
    • [x] Added support for the Unix timestamp extension for Zip archives.
  • [x] Other changes:
    • [x] The Phar::setAlias(), Phar::setDefaultStub() methods now have a tentative return type of true instead of bool.

POSIX: ✅

  • [x] Other changes:
    • [x] posix_isatty() now sets the error number when the file descriptor/stream argument is invalid. (#4220)

Random: ✅

  • [x] Deprecated:
    • [x] lcg_value() is deprecated in favour of \Random\Randomizer::getFloat() (#3992)

Readline: ✅

  • [x] New Features
    • [x] Added ability to change the .php_history path through the PHP_HISTFILE environment variable. (#4262)

Reflection: ✅

  • [x] Deprecated:
    • [x] ReflectionMethod::__construct() with one argument is deprecated use ReflectionMethod::createFromMethodName instead (#4037)
  • [x] New Features
    • [x] ReflectionClassConstant::__toString() and ReflectionProperty::__toString() now returns the attached doc comments (#4055, 6d25b8ee6654db8e9eb551e3d6fc77be65eeccd5)
    • [x] ReflectionAttribute now contains a name property to improve the debugging experience (#4037)
  • [x] New Classes
    • [x] ReflectionConstant (#4040)
  • [x] New Methods
    • [x] ReflectionClassConstant::isDeprecated (#3895)
    • [x] ReflectionGenerator::isClosed (#3896)
    • [x] ReflectionProperty::isDynamic (#4292)
    • [x] Lazy Object related: (#3975)
      • [x] ReflectionClass::newLazyGhost()
      • [x] ReflectionClass::newLazyProxy()
      • [x] ReflectionClass::resetAsLazyGhost()
      • [x] ReflectionClass::resetAsLazyProxy()
      • [x] ReflectionClass::isUninitializedLazyObject()
      • [x] ReflectionClass::initializeLazyObject()
      • [x] ReflectionClass::markLazyObjectAsInitialized()
      • [x] ReflectionClass::getLazyInitializer()
      • [x] ReflectionProperty::skipLazyInitialization()
      • [x] ReflectionProperty::setRawValueWithoutLazyInitialization()
  • [x] Other changes:
    • [x] ReflectionGenerator::getFunction() may now be called after the generator finished executing. (#4055, 812143d1de2e2c822f815090a40b395b512db751)

Session:

  • [ ] Deprecated:
    • [ ] session_set_save_handler() with more than 2 arguments is deprecated, use 2 argument signature
    • [x] Changing the value of the session.sid_length INI setting (#3993)
    • [x] Changing the value of the session.sid_bits_per_character INI setting (#3993)
    • [ ] Changing the value of the session.use_only_cookies INI setting
    • [ ] Changing the value of the session.use_trans_sid INI setting
    • [ ] Changing the value of the session.trans_sid_tags INI setting
    • [ ] Changing the value of the session.trans_sid_hosts INI setting
    • [ ] Changing the value of the session.referer_check INI setting
    • [ ] SID constant

SimpleXML:

  • [ ] BC Break:
    • [ ] SimpleXMLElement now doesn't implicitly rewind itself.

SOAP:

  • [ ] BC Break:
    • [ ] SoapClient::$typemap is now an array instead of a resource, checks using is_resource() should be converted to check for null
    • [ ] Optional dependency on ext/session which has issues with rtld-now
  • [ ] Deprecated:
    • [ ] Passing an int to SoapServer::addFunction()
    • [ ] SOAP_FUNCTIONS_ALL constant
  • [ ] New Features
    • [ ] Added support for clark notation for namespaces in class map
    • [ ] Session persistence now works with a shared session module
    • [ ] Instances of DateTimeInterface that are passed to xsd:datetime or similar elements are now serialized as such instead of being serialized as an empty string.
  • [ ] New Classes
    • [ ] Soap\Url
    • [ ] Soap\Sdl
  • [x] New Methods
    • [x] SoapServer::__getLastResponse() (php/doc-en#3877)

Sockets: ✅

  • [x] Other changes:
    • [x] The backlog parameter of socket_create_listen() now has a default value of SOMAXCONN. Previously, it was 128. (db22a7cfcbc3af221f67e228336ac3e2d62aaf2c, https://github.com/php/doc-en/pull/4109)

Sodium:

  • [ ] Other changes:
    • [ ] The sodium_crypto_aead_aes256gcm_*() functions are now available on aarch64 CPUs with the ARM cryptographic extensions.

SPL:

  • [x] Deprecated:
    • [x] SplFixedArray::__wakeup() (#4047)
    • [x] Escape CSV arg for SplFileObject::setCsvControl(), SplFileObject::fputcsv(), and SplFileObject::fgetcsv() (#4093)
  • [x] New Methods
    • [x] SplObjectStorage::seek() (#4048)
  • [ ] Other changes:
    • [x] The SplPriorityQueue::insert(), SplPriorityQueue::recoverFromCorruption(), SplHeap::insert(), SplHeap::recoverFromCorruption() methods now have a tentative return type of true instead of bool. (#4047)
    • [x] SplObjectStorage now implements SeekableIterator. (#4047)
    • [ ] Out of bounds accesses in SplFixedArray now throw exceptions of type OutOfBoundsException instead of RuntimeException.

Standard:

  • [x] BC Break:
    • [x] strcspn() now correctly returns the length of the string if $characters is the empty string, instead of the length until the first null byte (#3888)
    • [x] http_build_query() now correctly handles backed enums (#4988)
    • [x] stream_bucket_make_writeable() and stream_bucket_new() now return an instance of StreamBucket instead of stdClass (#4297)
  • [ ] Deprecated:
    • [x] stream_context_set_option() with two arguments, use stream_context_set_options() instead (notice the trailing s) (https://github.com/php/doc-en/pull/4106)
    • [x] Escape CSV arg for fputcsv(), fgetcsv(), and str_getcsv() (#4093)
    • [ ] unserialize() strings with S tag
  • [x] New Classes and Enum
    • [x] RoundingMode (#4080)
    • [x] StreamBucket (#4297)
  • [x] New functions
    • [x] http_get_last_response_headers() (#4034)
    • [x] http_clear_last_response_headers() (#4034)
    • [x] fpow() (#4035)
    • [x] array_all() (#3465)
    • [x] array_any() (#3465)
    • [x] array_find() (#3465)
    • [x] array_find_key() (#3465)
  • [ ] Other changes:
    • [x] The default 'cost' value for the PASSWORD_BCRYPT hashing algorithm for password_hash() has been increased from 10 to 12. (#4455)
    • [ ] debug_zval_dump() now indicates whether an array is packed.
    • [x] long2ip() now has a return type of string instead of string|false. (php/doc-en#4083)
    • [x] highlight_string() now has a return type of string|true instead of string|bool. (php/doc-en#4083)
    • [x] print_r() now has a return type of string|true instead of string|bool. (php/doc-en#4083)
    • [x] The mode parameter of the round() function has been widened to RoundingMode|int, accepting instances of a new RoundingMode enum. (#4107)
    • [x] round() behavioural changes (#4425)

Tidy: ✅

  • [x] BC Break:
    • [x] Failures in the constructor now throw exceptions rather than emitting warnings and having a broken object. (#3907)
  • [x] New Methods
    • [x] tidyNode::getNextSibling() (php/doc-en#3874)
    • [x] tidyNode::getPreviousSibling() (php/doc-en#3874)

XML: ✅ (https://github.com/php/doc-en/pull/4067)

  • [x] BC Break:
    • [x] The xml_set_*() functions now check for proper callables, but see related deprecations
  • [x] Deprecated:
    • [x] xml_set_object()
    • [x] Passing non-callable strings to xml_set_*() functions

XSL: ✅

  • [x] New Features
    • [x] It is now possible to use parameters that contain both single and double quotes. (https://github.com/php/doc-en/pull/4038)
    • [x] It is now possible to pass any callable to XSLTProcessor::registerPhpFunctions() (https://github.com/php/doc-en/pull/4114)
    • [x] New related XSLTProcessor::registerPHPFunctionNS() function (https://github.com/php/doc-en/pull/4129)
    • [x] Added XSLTProcessor::$maxTemplateDepth and XSLTProcessor::$maxTemplateVars to control the recursion depth of XSL template evaluation. (https://github.com/php/doc-en/pull/4041)
  • [x] Other changes:
    • [x] The typed properties XSLTProcessor::$cloneDocument and XSLTProcessor::$doXInclude are now declared. (https://github.com/php/doc-en/pull/4041)

ZIP: ✅

  • [x] New Features
    • [x] Added the ZipArchive::ER_TRUNCATED_ZIP constant, which was added in libzip 1.11. (#3799)

Zlib: ✅

  • [x] Other changes:
    • [x] The minimum zlib version required is now 1.2.11. (https://github.com/php/doc-en/pull/4105)

New Functions

BCMath ✅

  • [x] bcceil (https://github.com/php/doc-en/pull/4132)
  • [x] bcdivmod (https://github.com/php/doc-en/pull/4132)
  • [x] bcfloor (https://github.com/php/doc-en/pull/4132)
  • [x] bcround (https://github.com/php/doc-en/pull/4132)

Date

  • [ ] DateTime::createFromTimestamp
  • [ ] DateTime::getMicrosecond
  • [ ] DateTime::setMicrosecond
  • [ ] DateTimeImmutable::createFromTimestamp
  • [ ] DateTimeImmutable::getMicrosecond
  • [ ] DateTimeImmutable::setMicrosecond

Hash

  • [ ] HashContext::__debugInfo

Intl

  • [ ] IntlDateFormatter::getIanaID
  • [ ] intltz_get_iana_id
  • [ ] IntlDateFormatter::parseToCalendar
  • [ ] SpoofChecker::setAllowedChars
  • [x] #3974 (#3956)

MBString ✅

  • [x] mb_trim (#3922)
  • [x] mb_ltrim (#3922)
  • [x] mb_rtrim (#3922)
  • [x] mb_ucfirst (#3922)
  • [x] mb_lcfirst (#3922)

Opcache

  • [ ] opcache_jit_blacklist

PDO_PGSQL ✅

  • [x] Pdo\Pgsql::setNoticeCallback (php/doc-en#4115)

PGSQL

  • [ ] pg_change_password
  • [ ] pg_jit
  • [ ] pg_put_copy_data
  • [ ] pg_put_copy_end
  • [x] pg_result_memory_size (https://github.com/php/doc-en/pull/3972)
  • [ ] pg_set_chunked_rows_size
  • [ ] pg_socket_poll

XMLReader ✅ (https://github.com/php/doc-en/pull/4138)

  • [x] XMLReader::fromStream
  • [x] XMLReader::fromUri
  • [x] XMLReader::fromString

XMLWriter ✅ (https://github.com/php/doc-en/pull/4138)

  • [x] XMLWriter::toStream
  • [x] XMLWriter::toUri
  • [x] XMLWriter::toMemory

New Classes

BCMath

  • [ ] BcMath\Number

DOM (https://github.com/php/doc-en/pull/4212, https://github.com/php/doc-en/pull/4306)

  • [ ] Dom\HTMLDocument
  • [ ] Dom\XMLDocument
  • [ ] New Dom\Node classes?

ODBC

  • [ ] Odbc\Connection
  • [ ] Odbc\Result

PDO_DBLIB ✅

  • [x] Pdo\DbLib (php/doc-en#4115)

PDO_FIREBIRD ✅

  • [x] Pdo\Firebird (php/doc-en#4115)

PDO_MYSQL ✅

  • [x] Pdo\Mysql (php/doc-en#4115)

PDO_ODBC ✅

  • [x] Pdo\Odbc (php/doc-en#4115)

PDO_PGSQL ✅

  • [x] Pdo\Pgsql (php/doc-en#4115)

PDO_SQLITE ✅

  • [x] Pdo\Sqlite (php/doc-en#4115)

New Constants

cURL ✅

  • [x] CURL_HTTP_VERSION_3 (php/doc-en#4069)
  • [x] CURL_HTTP_VERSION_3ONLY (php/doc-en#4069)
  • [x] CURLOPT_TCP_KEEPCNT (php/doc-en#4069)
  • [x] CURLOPT_PREREQFUNCTION (php/doc-en#4069)
  • [x] CURL_PREREQFUNC_OK (php/doc-en#4069)
  • [x] CURL_PREREQFUNC_ABORT (php/doc-en#4069)
  • [x] CURLOPT_SERVER_RESPONSE_TIMEOUT (php/doc-en#4069)
  • [x] CURLOPT_DEBUGFUNCTION (php/doc-en#4069)
  • [x] CURLINFO_TEXT (php/doc-en#4069)
  • [x] CURLINFO_HEADER_IN (php/doc-en#4069)
  • [x] CURLINFO_DATA_IN (php/doc-en#4069)
  • [x] CURLINFO_DATA_OUT (php/doc-en#4069)
  • [x] CURLINFO_SSL_DATA_OUT (php/doc-en#4069)
  • [x] CURLINFO_SSL_DATA_IN (php/doc-en#4069)
  • [x] CURLINFO_POSTTRANSFER_TIME_T (php/doc-en#4069)

Intl

  • [ ] PATTERN
  • [ ] PROPERTY_IDS_UNARY_OPERATOR
  • [ ] PROPERTY_ID_COMPAT_MATH_START
  • [ ] PROPERTY_ID_COMPAT_MATH_CONTINUE

LDAP

  • [ ] LDAP_OPT_X_TLS_PROTOCOL_MAX
  • [ ] LDAP_OPT_X_TLS_PROTOCOL_TLS1_3

libxml ✅

  • [x] LIBXML_RECOVER (https://github.com/php/doc-en/pull/3900)
  • [x] LIBXML_NO_XXE (https://github.com/php/doc-en/pull/3900)

MySQLi ✅

  • [x] MYSQLI_TYPE_VECTOR (https://github.com/php/doc-en/pull/4065)

OpenSSL

  • [ ] X509_PURPOSE_OCSP_HELPER
  • [ ] X509_PURPOSE_TIMESTAMP_SIGN

PCNTL ✅

  • [x] SIGCKPT (DragonFlyBSD only) (#4073)
  • [x] SIGCKPTEXIT (DragonFlyBSD only) (#4073)
  • [x] WEXITED
  • [x] WSTOPPED
  • [x] WNOWAIT
  • [x] P_ALL
  • [x] P_PID
  • [x] P_PGID
  • [x] P_PIDFD (Linux only)
  • [x] P_UID (NetBSD/FreeBSD only)
  • [x] P_GID (NetBSD/FreeBSD only)
  • [x] P_SID (NetBSD/FreeBSD only)
  • [x] P_JAILID (FreeBSD only)

PGSQL ✅

  • [x] PGSQL_TUPLES_CHUNK (php/doc-en#4117)

POSIX ✅

  • [x] POSIX_SC_CHILD_MAX (php/doc-en#4072)
  • [x] POSIX_SC_CLK_TCK (php/doc-en#4072)

Sockets ✅

  • [x] TCP_SYNCNT (Linux only)
  • [x] SO_EXCLBIND (Solaris/Illumos only) (#4210)
  • [x] SO_NOSIGPIPE (macOS and FreeBSD) (#4210)
  • [x] SO_LINGER_SEC (macOS only) (#4210)
  • [x] SO_BINDTOIFINDEX (#4210)
  • [x] SO_EXCLUSIVEADDRUSE (Windows only)
  • [x] IP_PORTRANGE (FreeBSD/NetBSD/OpenBSD only) (#4210)
  • [x] IP_PORTRANGE_DEFAULT (FreeBSD/NetBSD/OpenBSD only) (#4210)
  • [x] IP_PORTRANGE_HIGH (FreeBSD/NetBSD/OpenBSD only) (#4210)
  • [x] IP_PORTRANGE_LOW (FreeBSD/NetBSD/OpenBSD only) (#4210)
  • [x] SOCK_NONBLOCK (#4210)
  • [x] SOCK_CLOEXEC (#4210)
  • [x] SOCK_CONN_DGRAM (NetBSD only) (#4210)
  • [x] SOCK_DCCP (NetBSD only) (#4210)

Sodium ✅

  • [x] SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES (https://github.com/php/doc-en/pull/3878)
  • [x] SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES (https://github.com/php/doc-en/pull/3878)

XML ✅

  • [x] XML_OPTION_PARSE_HUGE (https://github.com/php/doc-en/pull/3899)

Girgias avatar Oct 15 '24 14:10 Girgias

The TODO lists:

DOMImplementation::getFeature() has been removed

However, this function was never documented and never showed up in the PHP docs, so I guess there's nothing to do here?

ndossche avatar Oct 20 '24 20:10 ndossche

The TODO lists:

DOMImplementation::getFeature() has been removed

However, this function was never documented and never showed up in the PHP docs, so I guess there's nothing to do here?

Indeed, how convenient. :D

Girgias avatar Oct 21 '24 13:10 Girgias

Hi, good morning.

May I suggest updating tokens.xml and constants.xml to add T_PUBLIC_SET, T_PROTECTED_SET and T_PRIVATE_SET?

https://github.com/php/doc-en/pull/3936

driade avatar Oct 27 '24 10:10 driade

@Girgias Thank you for working on this! @Crell Do you have any capacity to help out with documentation of our features?

iluuu1994 avatar Oct 28 '24 14:10 iluuu1994

@iluuu1994 Already in progress: https://github.com/php/doc-en/pull/3898, https://github.com/php/doc-en/pull/3828. More to come.

Crell avatar Oct 28 '24 15:10 Crell

Great to hear, thank you Larry!

iluuu1994 avatar Oct 28 '24 15:10 iluuu1994

@Ayesh could you look into the cURL docs?

@devnexen could you document the POSIX/Socket/PCNTL/Intl constants?

@bukka can you document the FPM and OpenSSL changes?

@haszi can you document the Output Buffering changes?

@KentarouTakeda (or possibly @devnexen) can you document the PGSQL/PDO_PGSQL changes?

@mbeccati can you document the PDO custom parsers?

@SakiTakamachi can you document the BCMath changes?

@kamil-tekiela can you document the new MySQLi constant, and possibly the MySQLnd changes?

Girgias avatar Nov 12 '24 23:11 Girgias

Sure Gina, will get to it sometime this weekend :)

devnexen avatar Nov 13 '24 06:11 devnexen

@derickr can you document the new DateTime methods?

Girgias avatar Nov 13 '24 17:11 Girgias

Hey Gina!

Not sure exactly what to document about custom parsers atm, but I'll check the current docs and I'll think about something.

Perhaps a compatibility list extracted from the RFC page.

Cheers

On 13/11/2024 00:44, Gina Peter Banyard wrote:

@Ayesh https://github.com/Ayesh could you look into the cURL docs?

@devnexen https://github.com/devnexen could you document the POSIX/ Socket/PCNTL/Intl constants?

@bukka https://github.com/bukka can you document the FPM and OpenSSL changes?

@haszi https://github.com/haszi can you document the Output Buffering changes?

@KentarouTakeda https://github.com/KentarouTakeda (or possibly @devnexen https://github.com/devnexen) can you document the PGSQL/ PDO_PGSQL changes?

@mbeccati https://github.com/mbeccati can you document the PDO custom parsers?

@SakiTakamachi https://github.com/SakiTakamachi can you document the BCMath changes?

@kamil-tekiela https://github.com/kamil-tekiela can you document the new MySQLi constant, and possibly the MySQLnd changes?

— Reply to this email directly, view it on GitHub <https://github.com/php/ doc-en/issues/3872#issuecomment-2471868286>, or unsubscribe <https:// github.com/notifications/unsubscribe-auth/ AACE6FBXP73NPKOZYGLWTF32AKHHHAVCNFSM6AAAAABP7JZBGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRHA3DQMRYGY>. You are receiving this because you were mentioned.Message ID: <php/doc- @.***>

-- Matteo Beccati

Development & Consulting - http://www.beccati.com/

mbeccati avatar Nov 14 '24 07:11 mbeccati

Hi @Girgias, thanks for the ping :) I created #4069 to add all of the missing Curl constants and changes. All of the changes are in separate commits, but in the same PR to prevent potential merge conflicts. I also updated this issue's description with links to the PR. Please do take a look when you get some time. Thank you.

Ayesh avatar Nov 14 '24 17:11 Ayesh

I updated the issue text to tick all Curl-related changes. I think that was all of them for Curl.

Ayesh avatar Nov 17 '24 03:11 Ayesh

@Ayesh you accidentally wiped my linking, please refresh before making changes

ndossche avatar Nov 17 '24 14:11 ndossche

@nielsdos I'm so sorry, I will make sure to refresh from now on :(

Ayesh avatar Nov 17 '24 14:11 Ayesh

@Ayesh Dw too much abt it, it's more the fault of GH not auto refreshing properly and being slow to edit a large issue.

ndossche avatar Nov 17 '24 14:11 ndossche

Added a link to the WIP hooks doc PR.

Crell avatar Nov 18 '24 06:11 Crell

@Crell I don't know what you did but take a look at your edit history diff, looks like a lot of boxes were unticked and a lot of things were changed.

ndossche avatar Nov 18 '24 06:11 ndossche

FFS... I reloaded the page before hitting edit to avoid that!

I don't seem to have access to the history diff. (I'm just a member here, not admin.)

Crell avatar Nov 18 '24 06:11 Crell

Looks like you had an old version cached, and GH doesn't have a "restore old edit" button ffs. See also https://superuser.com/questions/1381271/restore-previous-version-of-my-comment-on-github but I'm on my phone rn...

ndossche avatar Nov 18 '24 06:11 ndossche

I had it saved in my IDE as I got bitten by this already multiple times. So should be fixed now.

Girgias avatar Nov 18 '24 08:11 Girgias

I am currently creating documentation for the class and new functions regarding bcmath.

SakiTakamachi avatar Nov 21 '24 03:11 SakiTakamachi

For the record, the PR introducing "Defining Identical Symbols in Different Namespace Blocks" is https://github.com/php/php-src/pull/15244. I still couldn't find a good way to explain it.

The following item:

The DatePeriod::__construct(string $isostr, int $options = 0) signature is now deprecated. Use DatePeriod::createFromISO8601String() instead

is already up-to-date: https://www.php.net/manual/en/dateperiod.construct.php

alexandre-daubois avatar Dec 06 '24 09:12 alexandre-daubois

For the record, the PR introducing "Defining Identical Symbols in Different Namespace Blocks" is php/php-src#15244. I still couldn't find a good way to explain it.

Yeah, not sure how to document this either. Maybe just leave it as this seems like a big edge case and a bugfix.

The following item:

The DatePeriod::__construct(string $isostr, int $options = 0) signature is now deprecated. Use DatePeriod::createFromISO8601String() instead

is already up-to-date: https://www.php.net/manual/en/dateperiod.construct.php

Added the commit to the issue.

Girgias avatar Dec 06 '24 21:12 Girgias

@Girgias IMO it's a bug-fix. I don't think it needs documentation. I committed it to master to avoid potentially breaking stable versions.

iluuu1994 avatar Dec 06 '24 22:12 iluuu1994

One issue: idn_to_ascii() and idn_to_utf8() only emit ValueError if the domain is empty as of 8.4, it does not apply to domain length like the above comment suggests. Also, surprisingly (to me) idn_to_ascii() checks domain length whereas idn_to_utf8() does not regardless of PHP version, is this intentional? Also, neither of these are mentioned in the changelog, should they be?

philip avatar Mar 03 '25 18:03 philip

Yes, they should be mentioned in the changelog. Probably was not added to UPGRADING.

The fact there is an asymetry in the behaviour of the functions should be report as a bug to php-src so that idn_to_utf8 also throws.

Girgias avatar Mar 06 '25 14:03 Girgias