Open Girgias opened 3 weeks ago
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?
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
Hi, good morning.
May I suggest updating tokens.xml and constants.xml to add T_PUBLIC_SET, T_PROTECTED_SET and T_PRIVATE_SET?
@Girgias Thank you for working on this! @Crell Do you have any capacity to help out with documentation of our features?
@iluuu1994 Already in progress: https://github.com/php/doc-en/pull/3898, https://github.com/php/doc-en/pull/3828. More to come.
Great to hear, thank you Larry!
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
Core
New features:
#[\Deprecated]
attribute (#3894)request_parse_body()
Parsing RFC1867 (multipart) requests in non-POST HTTP requestsnew
without parenthesis (#3978)Deprecated
_
as class nametrigger_error()
withE_USER_ERROR
E_STRICT
constantBC Break:
exit()
behavioural changesE_STRICT
error level New FunctionsNew Functions:
request_parse_body
New Classes:
Deprecated
(#3894)RequestParseBodyException
New Constants:
PHP_OUTPUT_HANDLER_PROCESSED
PHP_SBINDIR
Changed Functions:
trigger_error()
anduser_error()
have a return type oftrue
instead ofbool
nowOther Changes:
output_add_rewrite_var()
now usesurl_rewriter.hosts
INISAPI
apache2handler:
FPM:
/dev/poll
events.mechanism
setting for Solaris/Illumos had been retired.CLI:
Class constants are now typed
New warnings and exceptions
cURL:
curl_multi_select()
now throws aValueError
if$timeout
is less than 0 or greater thanPHP_INT_MAX
(#3965)GD: ✅
imagejpeg()
,imagepng()
,imageavif()
,imagewebp()
now throw aValueError
if$quality
is invalid (#3962)imageavif()
now throw aValueError
if$speed
is invalid (#3962)imagescale()
now throw aValueError
if$mode
is invalid (#3962)imagescale()
now throw aValueError
if$width
or$height
over/underflows (#3962)imagefilter()
now throw aValueError
with theIMG_FILTER_SCATTER
filter if$sub
or$plus
over/underflows (#3962)GetText:
bind_textdomain_codeset()
,textdomain()
,d*gettext()
now throw aValueError
if$domain
is the empty string (#3964)Intl:
resourcebundle_get()
,ResourceBundle::get()
, and offset access forResourceBundle
TypeError
for invalid offset typesValueError
for an empty stringValueError
if the integer index does not fit in a signed 32 bit integerIntlDateFormatter::__construct()
now throws aValueError
if$locale
is invalidNumberFormatter::__construct()
now throws aValueError
if$locale
is invalidMBstring:
mb_encode_numericentity()
,mb_decode_numericentity()
now check that$map
only has integersmb_http_input()
throwsValueError
if$type
is invalidmb_http_output()
throwsValueError
if$encoding
has null bytesODBC:
odbc_fetch_row()
returnsfalse
when$row =< 0
, this now warnsPCNTL:
pcntl_sigprocmask()
,pcntl_sigwaitinfo()
, andpcntl_sigtimedwait
ValueError
if$signals
array is emptyTypeError
if$signals
array value is not intValueError
if$signals
array value is not valid signalpcntl_sigprocmask()
ValueError
if$mode
is not one ofSIG_BLOCK
,SIG_UNBLOCK
orSIG_SETMASK
pcntl_sigtimedwait()
ValueError
if$seconds
is less than 0ValueError
if$nanoseconds
is less than 0ValueError
if$seconds
and$nanoseconds
are both 0SimpleXML: ✅
simplexml_import_dom()
throwsTypeError
instead ofValueError
if called with non XML object (https://github.com/php/doc-en/pull/3906)Standard:
round()
now throws aValueError
for invalid$mode
, before interpreted asPHP_ROUND_HALF_UP
ValueError
andValueError
are thrown if the"allowed_classes"
option ofunserialize()
is not an array of class namesstr_getcsv()
ValueError
if$separator
is not one byte longValueError
if$enclosure
is not one byte longValueError
if$escape
is not one byte long or the empty stringXMLReader:
XMLReader::open()
throwsValueError
if$encoding
is invalidXMLReader::XML()
throwsValueError
if$encoding
is invalidValueError
XMLWriter:
ValueError
XSL:
XSLTProcessor::importStyleSheet()
throwsTypeError
instead ofValueError
if called with non XML objectXSLTProcessor::setParameter()
parameters that contain null bytes now throws aValueError
Resource to Object conversions
DBA: ✅
Dba\Connection
(#3914)ODBC:
Odbc\Connection
Odbc\Result
Soap:
Soap\Url
Soap\Sdl
Removed extensions
Extensions
cURL:
CURLOPT_BINARYTRANSFER
constantCURLOPT_DNS_USE_GLOBAL_CACHE
constant has no effectcurl_version()
returns an additionalfeature_list
value, which is an associative array of all known cURL featurescurl_getinfo()
now returns an additionalposttransfer_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 passingCURLINFO_POSTTRANSFER_TIME_T
to thecurl_getinfo()
option parameter. This requires libcurl 8.10.0 or later.Date:
DatePeriod::__construct(string $isostr, int $options = 0)
signature is now deprecated. UseDatePeriod::createFromISO8601String()
instead.SUNFUNCS_RET_TIMESTAMP
,SUNFUNCS_RET_STRING
, andSUNFUNCS_RET_DOUBLE
constants are now deprecated. (#4006)DBA: ✅
null
orfalse
todba_key_split()
is now deprecated. It would always returnfalse
in those cases. (#4007)Dba\Connection
(#3914)DOM:
false
or aPHP_ERR
DOMException
if a new node could not be allocated. They now consistently throw an`DOMException
.DOMImplementation::createDocument()
now has a tentative return type ofDOMDocument
(https://github.com/php/doc-en/pull/3901)DOMXPath
objects (https://github.com/php/doc-en/pull/3925)DOMImplementation::getFeature()
has been removedDOM_PHP_ERR
constant is now deprecated.DOMDocument::$actualEncoding
property is now formally deprecated.DOMDocument::$config
property is now formally deprecated.DOMEntity::$actualEncoding
property is now formally deprecated.DOMEntity::$encoding
property is now formally deprecated.DOMEntity::$version
property is now formally deprecated.DOMNode::compareDocumentPosition()
with its associated constants:DOMNode::DOCUMENT_POSITION_DISCONNECTED
DOMNode::DOCUMENT_POSITION_PRECEDING
DOMNode::DOCUMENT_POSITION_FOLLOWING
DOMNode::DOCUMENT_POSITION_CONTAINS
DOMNode::DOCUMENT_POSITION_CONTAINED_BY
DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOMXPath::registerPhpFunctionNS()
DOMXPath::quote()
(https://github.com/php/doc-en/pull/3909)GMP:
GMP
is now final (#3990)GMP
tobool
, before was aE_RECOVERABLE_ERROR
Hash:
Intl:
intlcal_set()
orIntlCalendar::set()
with more than 2 arguments is deprecated, useIntlCalendar::setDate()
orIntlCalendar::setDateTime()
instead.intlgregcal_create_instance()
orIntlGregorianCalendar::__construct()
with more than 2 arguments is deprecated, useIntlGregorianCalendar::createFromDate()
orIntlGregorianCalendar::createFromDateTime()
instead.NumberFormatter::ROUND_HALFODD
to complement the existingNumberFormatter::ROUND_HALFEVEN
functionality.LDAP:
ldap_connect()
with more than 2 arguments is deprecated, useldap_connect_wallet()
instead.ldap_exop()
with more than 4 arguments is deprecated, useldap_exop_sync()
instead.MBString:
mb_substr()
now interprets character indices in the same manner as most other mbstring functions. This means that character indices returned bymb_strpos()
can be passed tomb_substr()
.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.MySQLi: ✅
MYSQLI_SET_CHARSET_DIR
constant has been removed (#3960)MYSQLI_STMT_ATTR_PREFETCH_ROWS
constant has been removed (#3960)MYSQLI_CURSOR_TYPE_FOR_UPDATE
constant has been removed (#3960)MYSQLI_CURSOR_TYPE_SCROLLABLE
constant has been removed (#3960)MYSQLI_TYPE_INTERVAL
constant has been removed (#3960)mysqli_ping()
(#3958)mysqli::ping()
(#3958)mysqli_kill()
(#3958)mysqli::kill()
(#3958)mysqli_refresh()
(#3958)mysqli::refresh()
(#3958)MYSQLI_REFRESH_*
constants (#3959)$mode
parameter explicitly tomysqli_store_result()
(699e596)MYSQLI_STORE_RESULT_COPY_DATA
constant (#3959)MySQLnd:
2006
to4031
for MySQL server versions 8.0.24 and above.Opcache:
opcache.interned_strings_buffer
setting on 64bit architectures is now32767
. Previously it was4095
.OpenSSL:
PCNTL:
pcntl_sigprocmask()
,pcntl_sigwaitinfo()
, andpcntl_sigtimedwait()
now always returnfalse
on failure, in some cases they would previously return-1
.PCRE:
PDO:
PDO::connect()
PDO_DBLIB:
DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER
andDBLIB_ATTR_DATETIME_CONVERT
attributes are now booleans, previously they were int.PDO_FIREBIRD:
ATTR_AUTOCOMMIT
attribute is now boolean, previously was int.PDO_MYSQL:
ATTR_AUTOCOMMIT
,ATTR_EMULATE_PREPARES
, andMYSQL_ATTR_DIRECT_QUERY
attributes are now booleans, previously they were int.PDO_PGSQL:
??
) inside dollar-quoted strings is deprecated.PGSQL:
pg_fetch_result
,pg_field_prtlen
, andpg_field_is_null()
is now deprecated, use an explicit value ofnull
for$row
parameterPDO_SQLITE:
Phar:
Random: ✅
lcg_value()
is deprecated in favour of\Random\Randomizer::getFloat()
(#3992)Readline:
.php_history
path through thePHP_HISTFILE
environment variable.Reflection:
ReflectionMethod::__construct()
with one argument is deprecated useReflectionMethod::createFromMethodName
insteadReflectionClassConstant::__toString()
andReflectionProperty::__toString()
now returns the attached doc commentsReflectionAttribute
now contains a name property to improve the debugging experienceReflectionConstant
ReflectionClassConstant::isDeprecated
(#3895)ReflectionGenerator::isClosed
(#3896)ReflectionProperty::isDynamic
ReflectionClass::newLazyGhost()
ReflectionClass::newLazyProxy()
ReflectionClass::resetAsLazyGhost()
ReflectionClass::resetAsLazyProxy()
ReflectionClass::isUninitializedLazyObject()
ReflectionClass::initializeLazyObject()
ReflectionClass::markLazyObjectAsInitialized()
ReflectionClass::getLazyInitializer()
ReflectionProperty::skipLazyInitialization()
ReflectionProperty::setRawValueWithoutLazyInitialization()
Session:
session_set_save_handler()
with more than 2 arguments is deprecated, use 2 argument signaturesession.sid_length
INI setting (#3993)session.sid_bits_per_character
INI setting (#3993)session.use_only_cookies
INI settingsession.use_trans_sid
INI settingsession.trans_sid_tags
INI settingsession.trans_sid_hosts
INI settingsession.referer_check
INI settingSID
constantSimpleXML:
SimpleXMLElement
now doesn't implicitly rewind itself.SOAP:
SoapClient::$typemap
is now an array instead of a resource, checks usingis_resource()
should be converted to check fornull
rtld-now
int
toSoapServer::addFunction()
SOAP_FUNCTIONS_ALL
constantDateTimeInterface
that are passed toxsd:datetime
or similar elements are now serialized as such instead of being serialized as an empty string.Soap\Url
Soap\Sdl
SoapServer::__getLastResponse()
(php/doc-en#3877)SPL:
SplFixedArray::__wakeup()
SplFileObject::setCsvControl()
,SplFileObject::fputcsv()
, andSplFileObject::fgetcsv()
SplObjectStorage::seek()
Standard:
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)http_build_query()
now correctly handles backed enumsstream_bucket_make_writeable()
andstream_bucket_new()
now return an instance ofStreamBucket
instead ofstdClass
stream_context_set_option()
with two arguments, usestream_context_set_options()
instead (notice the trailings
)fputcsv()
,fgetcsv()
, andstr_getcsv()
unserialize()
strings withS
tagRoundingMode
StreamBucket
http_get_last_response_headers()
http_clear_last_response_headers()
fpow()
array_all()
(#3465)array_any()
(#3465)array_find()
(#3465)array_find_key()
(#3465)Tidy: ✅
tidyNode::getNextSibling()
(php/doc-en#3874)tidyNode::getPreviousSibling()
(php/doc-en#3874)XML:
xml_set_*()
functions now check for proper callables, but see related deprecationsxml_set_object()
xml_set_*()
functionsXSL:
XSLTProcessor::registerPhpFunctions()
XSLTProcessor::registerPHPFunctionNS()
functionXSLTProcessor::$maxTemplateDepth
andXSLTProcessor::$maxTemplateVars
to control the recursion depth of XSL template evaluation.ZIP:
New Functions
BCMath
bcceil
bcdivmod
bcfloor
bcround
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
MBString ✅
mb_trim
(#3922)mb_ltrim
(#3922)mb_rtrim
(#3922)mb_ucfirst
(#3922)mb_lcfirst
(#3922)Opcache
opcache_jit_blacklist
PCNTL
pcntl_getcpu
pcntl_getcpuaffinity
pcntl_getqos_class
pcntl_setns
pcntl_waitid
PDO_PGSQL
Pdo\Pgsql::setNoticeCallback
PGSQL
pg_change_password
pg_jit
pg_put_copy_data
pg_put_copy_end
pg_result_memory_size
(https://github.com/php/doc-en/pull/3972)pg_set_chunked_rows_size
pg_socket_poll
XMLReader
XMLReader::fromStream
XMLReader::fromUri
XMLReader::fromString
XMLWriter
XMLWriter::toStream
XMLWriter::toUri
XMLWriter::toMemory
New Classes
BCMath
BcMath\Number
DOM
Dom\HTMLDocument
Dom\XMLDocument
ODBC
Odbc\Connection
Odbc\Result
PDO_DBLIB
Pdo\DbLib
PDO_FIREBIRD
Pdo\Firebird
PDO_MYSQL
Pdo\Mysql
PDO_ODBC
Pdo\Odbc
PDO_PGSQL
Pdo\Pgsql
PDO_SQLITE
Pdo\Sqlite
New Constants
cURL
CURL_HTTP_VERSION_3
CURL_HTTP_VERSION_3ONLY
CURL_TCP_KEEPCNT
CURLOPT_PREREQFUNCTION
CURL_PREREQFUNC_OK
CURL_PREREQFUNC_ABORT
CURLOPT_SERVER_RESPONSE_TIMEOUT
CURLOPT_DEBUGFUNCTION
CURLINFO_TEXT
CURLINFO_HEADER_IN
CURLINFO_DATA_IN
CURLINFO_DATA_OUT
CURLINFO_SSL_DATA_OUT
CURLINFO_SSL_DATA_IN
CURLINFO_POSTTRANSFER_TIME_T
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 ✅
LIBXML_RECOVER
(https://github.com/php/doc-en/pull/3900)LIBXML_NO_XXE
(https://github.com/php/doc-en/pull/3900)MySQLi
MYSQLI_TYPE_VECTOR
OpenSSL
X509_PURPOSE_OCSP_HELPER
X509_PURPOSE_TIMESTAMP_SIGN
PCNTL
Pcntl::Background
(macOS only)Pcntl::Default
(macOS only)Pctnl::UserInteractive
(macOS only)Pcntl::UserInitiated
(macOS only)Pcntl::Utility
(macOS only)SIGCKPT
(DragonFlyBSD only)SIGCKPTEXIT
(DragonFlyBSD only)WEXITED
WSTOPPED
WNOWAIT
P_ALL
P_PID
P_PGID
P_PIDFD
(Linux only)P_UID
(NetBSD/FreeBSD only)P_GID
(NetBSD/FreeBSD only)P_SID
(NetBSD/FreeBSD only)P_JAILID
(FreeBSD only)PGSQL
PGSQL_TUPLES_CHUNK
POSIX
POSIX_SC_CHILD_MAX
POSIX_SC_CLK_TCK
Sockets
SO_EXCLUSIVEADDRUSE
(Windows only)SOCK_CONN_DGRAM
(NetBSD only)SOCK_DCCP
(NetBSD only)TCP_SYNCNT
(Linux only)SO_EXCLBIND
(Solaris/Illumos only)SO_NOSIGPIPE
(macOS and FreeBSD)SO_LINGER_SEC
(macOS only)IP_PORTRANGE
(FreeBSD/NetBSD/OpenBSD only)IP_PORTRANGE_DEFAULT
(FreeBSD/NetBSD/OpenBSD only)IP_PORTRANGE_HIGH
(FreeBSD/NetBSD/OpenBSD only)IP_PORTRANGE_LOW
(FreeBSD/NetBSD/OpenBSD only)SOCK_NONBLOCK
SOCK_CLOEXEC
SO_BINDTOIFINDEX
Sodium ✅
SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES
(https://github.com/php/doc-en/pull/3878)SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES
(https://github.com/php/doc-en/pull/3878)XML ✅
XML_OPTION_PARSE_HUGE
(https://github.com/php/doc-en/pull/3899)Other Changes
Changed Functions
Standard