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

PHP 8.3 documentation tracker

Open Girgias opened this issue 1 year ago • 9 comments

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

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

Note This issue is still a Work In Progress

Core

  • [ ] New features:
    • [ ] Readonly Amendments
      • [ ] Anonymous classes can be marked as readonly
      • [ ] Readonly Properties can be reinitialized during cloning
    • [x] Override attribute (#2996)
    • [x] Typed Class constants (Part #2798)
    • [ ] Closures created from magic functions accept named arg
    • [ ] final methods on trait
    • [ ] Fetch class constant syntax
    • [ ] Static Variable Initializer
    • [ ] Fallback value syntax for ini variables
  • [x] Deprecated
    • [x] Saner Increment/Decrement operators (#2841)
      • [x] Using the increment operator (++) on empty, non-numeric, or non-alphanumeric strings is now deprecated. Moreover, incrementing non-numeric strings is soft deprecated and the new str_increment() function should be used instead.
      • [x] Using the decrement operator (--) on empty or non-numeric strings is now deprecated.
    • [x] get_class()/get_parent_class() call without arguments (#3186)
  • [ ] Windows Support:
    • [ ] Minimum supported Windows version has been bumped to Windows 8 or Windows Server 2012
  • [ ] BC Break:
    • [ ] proc_get_status()
    • [ ] Uses of traits with static properties
    • [ ] Assigning a negative index to an empty array
    • [ ] Class constant visibility variance check

SAPI

  • [ ] CLI:
    • [ ] It is now possible to lint multiple files. (#2917)

Extensions

  • [x] DateTime:

    • [x] New methods:
      • [x] DatePeriod::createFromISO8601String() (7d81260767f008218ffd338b365cfa3d10eb3d15)
    • [x] New error classes
  • [x] DBA:

    • [x] Deprecated:
      • [x] Calling dba_fetch() with $dba as the 3rd argument is now deprecated. (#2911)
  • [x] DOM:

    • [x] New properties:
      • [x] DOMElement::$className
      • [x] DOMElement::$id
      • [x] DOMNode::$isConnected
      • [x] DOMNameSpaceNode::$isConnected
      • [x] DOMNode::$parentElement
      • [x] DOMNameSpaceNode::$parentElement
    • [x] New methods:
      • [x] DOMElement::getAttributeNames() (#2922)
      • [x] DOMElement::insertAdjacentElement() (#2922)
      • [x] DOMElement::insertAdjacentText() (#2922)
      • [x] DOMElement::toggleAttribute() (#2922)
      • [x] DOMNode::contains() (#2922)
      • [x] DOMNode::getRootNode() (#2922)
      • [x] DOMNode::isEqualNode() (#2922)
      • [x] ~~DOMNameSpaceNode::contains()~~
      • [x] DOMParentNode::replaceChildren() (#2922)
    • [x] Changed methods:
      • [x] Changed DOMCharacterData::appendData() tentative return type to true.
      • [x] DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), DOMDocument::loadXML(), and DOMDocument::loadXMLFile() now have a tentative return type of bool.
    • [x] BC Break: (#2984)
  • [ ] FFI:

    • [x] It is now possible to assign FFI\CData to other FFI\CData. Meaning CData can now be assigned to structs and fields. (#3188)
    • [x] Deprecated:
    • [ ] BC Break:
      • [ ] C functions that have a return type of void now return null instead of returning the following object object(FFI\CData:void) { }
  • [x] Intl:

    • [x] New methods:
      • [x] IntlCalendar::setDate() (#2919)
      • [x] IntlCalendar::setDateTime() (#2919)
      • [x] IntlGregorianCalendar::createFromDate() (#2943)
      • [x] IntlGregorianCalendar::createFromDateTime() (#2943)
    • [x] Deprecated:
      • [x] ~~The U_MULTIPLE_DECIMAL_SEPERATORS constant had been deprecated, using the U_MULTIPLE_DECIMAL_SEPARATORS constant instead is recommended.~~ (U_MULTIPLE_DECIMAL_* constants are not documented at this time)
      • [x] The NumberFormatter::TYPE_CURRENCY constant has been deprecated. (#2914)
    • [x] Changed methods:
      • [x] datefmt_set_timezone() (and its alias IntlDateformatter::setTimeZone()) now returns true on success (#3093)
      • [x] IntlBreakiterator::setText() now returns false on failure (#3093)
      • [x] IntlChar::enumCharNames() is now returning a boolean. (#3093)
  • [x] JSON:

    • [x] New functions:
      • [x] json_validate() (#2906)
  • [x] LDAP:

    • [x] New functions:
      • [x] ldap_connect_wallet() (#2944)
      • [x] ldap_exop_sync() (#2944)
    • [x] Deprecated:
      • [x] Calling ldap_connect() with separate hostname and port is deprecated (#2912)
  • [ ] MBString:

    • [x] New functions:
      • [x] mb_str_pad() (#2750)
    • [x] Deprecated:
      • [x] Passing a negative $width to mb_strimwidth() is now deprecated. (#2913)
    • [ ] Changed functions:
      • [ ] mb_strtolower() and mb_convert_case() implement conditional casing rules for the Greek letter sigma.
      • [ ] mb_decode_mimeheader() interprets underscores in QPrint-encoded MIME encoded words as required by RFC 2047
      • [ ] mb_encode_mimeheader() no longer drops NUL (zero) bytes when QPrint-encoding the input string.
      • [ ] mb_detect_encoding()'s "non-strict" mode now behaves as described in the documentation.
  • [ ] OpCache:

    • [ ] opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix timestamp of when the next revalidation of the scripts timestamp is due, dictated by the opcache.revalidate_freq INI directive.
    • [x] BC Break:
  • [x] Phar:

    • [x] Deprecated:
      • [x] Calling Phar::setStub() with a $resource and a $length is now deprecated. Such calls should be replaced by: $phar->setStub(stream_get_contents($resource)); (#2916)
    • [x] BC Break:
      • [x] The type of Phar class constants are now declared. (3728053)
  • [x] POSIX: (#2928)

    • [x] Modified functions:
      • [x] posix_getrlimit() now takes an optional $res parameter to allow fetching a single resource limit.
      • [x] posix_isatty() now raises type warnings for integers following the usual ZPP semantics.
      • [x] posix_ttyname() now raises type warnings for integers following the usual ZPP semantics and value warnings for invalid file descriptor integers.
    • [x] New functions:
      • [x] posix_sysconf()
      • [x] posix_pathconf()
      • [x] posix_fpathconf()
      • [x] posix_eaccess()
  • [x] PGSQL:

    • [x] Modified functions:
      • [x] pg_fetch_object() now raises a ValueError instead of an Exception when the $constructor_args argument is non empty with the class not having constructor. (#3187)
      • [x] pg_insert() now raises a ValueError instead of a E_WARNING when the table specified is invalid. (#3187)
      • [x] pg_insert() and pg_convert() raises a ValueError or a TypeError instead of a E_WARNING when the value/type of a field does not match properly with a PostgreSQL's type. (#3187)
      • [x] The $row parameter of pg_fetch_result(), pg_field_prtlen(), and pg_field_is_null() is now nullable. (#3187)
    • [x] New functions: (#2934)
      • [x] pg_set_error_context_visibility() (libpq >= 9.6)
      • [x] pg_enter_pipeline_mode()
      • [x] pg_exit_pipeline_mode()
      • [x] pg_pipeline_sync()
      • [x] pg_pipeline_status()
  • [x] Random:

    • [x] New methods: (#2815, #2818)
      • [x] Random\Randomizer::getBytesFromString() (#2824)
      • [x] Random\Randomizer::nextFloat() (#2825)
      • [x] Random\Randomizer::getFloat()
    • [x] Deprecated:
      • [x] The MT_RAND_PHP Mt19937 variant is deprecated. (#2829)
    • [x] Changed functions:
      • [x] Changed mt_srand() and srand() to not check the number of arguments to determine whether a random seed should be used. (#3095)
  • [x] Reflection:

    • [x] New methods:
      • [x] ReflectionMethod::createFromMethodName() (#2927)
    • [x] Deprecated:
      • [x] Calling ReflectionProperty::setValue() with only one parameter is deprecated. To set static properties, pass null as the first parameter. (#2594)
    • [x] Changed methods:
      • [x] Return type of ReflectionClass::getStaticProperties() is no longer nullable. (#2920)
  • [x] SNMP:

    • [x] BC Break:
      • [x] The type of SNMP class constants are now declared. (#2160)
  • [x] Sockets:

    • [x] New functions:
      • [x] socket_atmark() (#2946)
  • [ ] Standard:

    • [x] New functions:
      • [x] str_increment() (#2797)
      • [x] str_decrement() (#2797)
    • [x] Deprecated:
      • [x] assertions: (#2840)
        • [x] The assert_options() function is now deprecated.
        • [x] The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and ASSERT_WARNING constants have been deprecated.
        • [x] The assert.* INI settings have been deprecated.
    • [ ] BC Break:
      • [x] range() function (#2801)
      • [ ] The file() flags error check now catches all invalid flags. Notably FILE_APPEND was previously silently accepted.
    • [ ] Changed functions:
      • [x] E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (#3106)
      • [ ] unserialize() now emits a new E_WARNING if the input contains unconsumed bytes.
      • [x] array_pad() is now only limited by the maximum number of elements an array can have. (#3174)
      • [x] strtok() raises an E_WARNING in the case token is not provided when starting tokenization. (#3106)
      • [x] array_sum() and array_product() now warn when values in the array cannot be converted to int/float. (#3106)
      • [ ] The $decimal of number_format() now properly handles negative integers.
      • [x] A new $before_needle argument has been added to strrchr().
      • [ ] str_getcsv() and fgetcsv() now return an empty string instead of a string with a single null byte for the last field
  • [ ] Streams:

    • [ ] Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously not implemented.
    • [x] New functions:
      • [x] stream_context_set_options() (#2947)
  • [x] SQLite3:

    • [x] Deprecated:
      • [x] Using exceptions is now preferred, warnings will be removed in the future. Calling SQLite3::enableExceptions(false) will trigger a deprecation warning in this version. (#3189)
  • [x] Zip:

    • [x] New methods:
    • [x] Deprecated:
      • [x] The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed in a future version of libzip.

Classes

  • [ ] Random\IntervalBoundary (See #3074)

New Constants

  • [x] cURL

    • [x] CURLINFO_CAPATH (libcurl >= 7.84.0) (#3089)
    • [x] CURLINFO_CAINFO (libcurl >= 7.84.0) (#3089)
    • [x] CURLOPT_MIME_OPTIONS (libcurl >= 7.81.0) (#3089)
    • [x] CURLMIMEOPT_FORMESCAPE (libcurl >= 7.81.0) (#3089)
    • [x] CURLOPT_WS_OPTIONS (libcurl >= 7.86.0) (#3089)
    • [x] CURLWS_RAW_MODE (libcurl >= 7.86.0) (#3089)
    • [x] CURLOPT_SSH_HOSTKEYFUNCTION (libcurl >= 7.84.0) (#3089)
    • [x] CURLOPT_PROTOCOLS_STR (libcurl >= 7.85.0) (#3089)
    • [x] CURLOPT_REDIR_PROTOCOLS_STR (libcurl >= 7.85.0) (#3089)
    • [x] CURLOPT_CA_CACHE_TIMEOUT (libcurl >= 7.87.0) (#3089)
    • [x] CURLOPT_QUICK_EXIT (libcurl >= 7.87.0) (#3089)
    • [x] CURLKHMATCH_OK (libcurl >= 7.19.6) (#3089)
    • [x] CURLKHMATCH_MISMATCH (libcurl >= 7.19.6) (#3089)
    • [x] CURLKHMATCH_MISSING (libcurl >= 7.19.6) (#3089)
    • [x] CURLKHMATCH_LAST (libcurl >= 7.19.6) (#3089)
  • [x] Intl (1cf6bcae736d6c7390c90849b869474e40b9a292)

    • [x] MIXED_NUMBERS (Spoofchecker)
    • [x] HIDDEN_OVERLAY (Spoofchecker)
  • [x] OpenSSL

    • [x] OPENSSL_CMS_OLDMIMETYPE
    • [x] PKCS7_NOOLDMIMETYPE
  • [x] PCNTL

    • [x] SIGINFO (#3092)
  • [x] PDO_ODBC

    • [x] PDO_ODBC_TYPE (#3185)
  • [x] PGSQL (#2941)

    • [x] TODO, Update migration guide?
  • [x] POSIX (#2931)

    • [x] POSIX_SC_ARG_MAX (#2931)
    • [x] POSIX_SC_PAGESIZE (#2931)
    • [x] POSIX_SC_NPROCESSORS_CONF (#2931)
    • [x] POSIX_SC_NPROCESSORS_ONLN (#2931)
    • [x] POSIX_PC_LINK_MAX (#2931)
    • [x] POSIX_PC_MAX_CANON (#2931)
    • [x] POSIX_PC_MAX_INPUT (#2931)
    • [x] POSIX_PC_NAME_MAX (#2931)
    • [x] POSIX_PC_PATH_MAX (#2931)
    • [x] POSIX_PC_PIPE_BUF (#2931)
    • [x] POSIX_PC_CHOWN_RESTRICTED (#2931)
    • [x] POSIX_PC_NO_TRUNC (#2931)
    • [x] POSIX_PC_ALLOC_SIZE_MIN (#2931)
    • [x] POSIX_PC_SYMLINK_MAX (#2931)
  • [x] Sockets (#2948)

    • [x] SO_ATTACH_REUSEPORT_CBPF (Linux) (#2948)
    • [x] SO_DETACH_BPF (Linux) (#2948)
    • [x] SO_DETACH_FILTER (Linux) (#2948)
    • [x] TCP_QUICKACK (Linux) (#2948)
    • [x] IP_DONTFRAG (FreeBSD) (#2948)
    • [x] IP_MTU_DISCOVER (Linux) (#2948)
    • [x] IP_PMTUDISC_DO (Linux) (#2948)
    • [x] IP_PMTUDISC_DONT (Linux) (#2948)
    • [x] IP_PMTUDISC_WANT (Linux) (#2948)
    • [x] IP_PMTUDISC_PROBE (Linux) (#2948)
    • [x] IP_PMTUDISC_INTERFACE (Linux) (#2948)
    • [x] IP_PMTUDISC_OMIT (Linux) (#2948)
    • [x] AF_DIVERT (FreeBSD) (#2948)
    • [x] SOL_UDPLITE (#2948)
    • [x] UDPLITE_RECV_CSCOV (#2948)
    • [x] UDPLITE_SEND_CSCOV (#2948)
    • [x] SO_RERROR (NetBSD) (#2948)
    • [x] SO_ZEROIZE (OpenBSD) (#2948)
    • [x] SO_SPLICE (OpenBSD) (#2948)
    • [x] TCP_REPAIR (Linux) (#2948)
    • [x] SO_REUSEPORT_LB (FreeBSD) (#2948)
    • [x] IP_BIND_ADDRESS_NO_PORT (Linux) (#2948)
  • [x] Zip

    • [x] ZipArchive::ER_DATA_LENGTH (libzip >= 1.10)
    • [x] ZipArchive::ER_NOT_ALLOWED (libzip >= 1.10)
    • [x] ZipArchive::AFL_RDONLY (libzip >= 1.10)
    • [x] ZipArchive::AFL_IS_TORRENTZIP (libzip >= 1.10)
    • [x] ZipArchive::AFL_WANT_TORRENTZIP (libzip >= 1.10)
    • [x] ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10)
    • [x] ZipArchive::FL_OPEN_FILE_NOW
    • [x] ZipArchive::LENGTH_TO_END as default value for ZipArchive::addFile() and ZipArchive::replaceFile()
    • [x] ZipArchive::LENGTH_UNCHECKED (libzip >= 1.10)

Other Changes

  • [ ] Core changes

    • [ ] FFI::load() is now allowed during preloading when opcache.preload_user is the current system user.
    • [ ] In the CLI and phpdbg SAPIs, preloading does not require the opcache.preload_user directive to be set anymore when running as root.
  • [ ] Changed Functions

    • [x] gc_status() has added 8 fields (#3096)
    • [x] class_alias() now supports creating an alias of an internal class. (#3285)
    • [ ] Setting open_basedir at runtime using ini_set('open_basedir', ...); no longer accepts paths containing the parent directory (..).
    • [x] The resultant HTML of highlight_string() and highlight_file() has changed. (#3106)
  • [x] Calendar

    • [x] easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems,
  • [x] Curl

    • [x] curl_getinfo() now supports two new constants: CURLINFO_CAPATH and CURLINFO_CAINFO. (#3090)
  • [x] Gd

    • [x] The signature of imagerotate() has changed.
  • [x] mysqli

    • [x] mysqli_fetch_object() now raises a ValueError instead of an Exception (#3184)
    • [x] mysqli_poll() now raises a ValueError when neither the $read nor the $error arguments are passed. (#3184)
    • [x] mysqli_field_seek() and mysqli_result::field_seek() now specify the return type as true instead of bool. (#3184)
  • [x] ODBC

    • [x] odbc_autocommit() now accepts null for the $enable parameter. (#2921)
  • [ ] Standard

    • [ ] password_hash() will now chain the underlying Random\RandomException as the ValueError's $previous Exception when salt generation fails.
    • [ ] If using an array as the $command for proc_open(), it must now have at least one non empty element. Otherwise a ValueError is thrown.which only contains an unterminated enclosure.

Girgias avatar Sep 26 '23 19:09 Girgias

Note: I did not add the WeakMap, the Zend Max Execution Timers, and the call stack overflowing to the todo list from the BC Break page, as those are engine changes to just make it more sensible.

Girgias avatar Sep 27 '23 02:09 Girgias

New methods:

  • [ ] Random\Randomizer::getBytesFromString()
  • [ ] Random\Randomizer::nextFloat()
  • [ ] Random\Randomizer::getFloat()

These already have stubs and I've started writing the first bits and pieces of the actual contents.

TimWolla avatar Oct 01 '23 19:10 TimWolla

Somehow looks like #2602 doesn't have any mention in the upgrading document?

Girgias avatar Oct 05 '23 00:10 Girgias

Somehow looks like #2602 doesn't have any mention in the upgrading document?

Going by memory. This was a fix for https://bugs.php.net/bug.php?id=47137. I.e. the constant was documented on the libxml constant page, but it didn't work for the DOM save methods. At one point the docs were updated on those save pages to mention only one option worked. When I fixed it, I felt like it was on the border of a fix vs feature request. That combined with the fact it was a non trivial change made me decide to only put the fix in master.

nielsdos avatar Oct 05 '23 06:10 nielsdos

Somehow looks like #2602 doesn't have any mention in the upgrading document?

Going by memory. This was a fix for https://bugs.php.net/bug.php?id=47137. I.e. the constant was documented on the libxml constant page, but it didn't work for the DOM save methods. At one point the docs were updated on those save pages to mention only one option worked. When I fixed it, I felt like it was on the border of a fix vs feature request. That combined with the fact it was a non trivial change made me decide to only put the fix in master.

ACK.

Girgias avatar Oct 05 '23 12:10 Girgias

Deprecated: assertions: The assert_options() function is now deprecated. The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and ASSERT_WARNING constants have been deprecated. The assert.* INI settings have been deprecated.

I believe all this has been resolved

TimWolla avatar Oct 25 '23 21:10 TimWolla

Missing the Other Changes page

I've added it.

mumumu avatar Nov 02 '23 19:11 mumumu

* [ ]  DOMNameSpaceNode::contains()

I've checked the PHP-8.3.2 branch and the PR that was supposed to add this method but couldn't find DOMNameSpaceNode::contains. Maybe this was added to NEWS accidentally?

haszi avatar Jan 10 '24 13:01 haszi

* [ ]  DOMNameSpaceNode::contains()

I've checked the PHP-8.3.2 branch and the PR that was supposed to add this method but couldn't find DOMNameSpaceNode::contains. Maybe this was added to NEWS accidentally?

Err yes, this method doesn't exist on that class, only on DOMNode. In fact it wouldn't make sense to add it on DOMNameSpaceNode... So I added this to NEWS by mistake.

nielsdos avatar Jan 10 '24 16:01 nielsdos