Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions appendices/migration83/deprecated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
<sect2 xml:id="migration83.deprecated.core.dba">
<title>DBA</title>

<para>
Calling <function>dba_fetch</function> with <parameter>$dba</parameter> as
<simpara>
Calling <function>dba_fetch</function> with <parameter>dba</parameter> as
the 3rd argument is now deprecated.
</para>
</simpara>
</sect2>

<sect2 xml:id="migration83.deprecated.ffi">
Expand Down Expand Up @@ -70,29 +70,29 @@
<sect2 xml:id="migration83.deprecated.ldap">
<title>LDAP</title>

<para>
<simpara>
Calling <function>ldap_connect</function> with separate
<parameter>$hostname</parameter> and <parameter>$port</parameter> is
<parameter>hostname</parameter> and <parameter>port</parameter> is
deprecated.
<!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_3#deprecate_calling_ldap_connect_with_2_parameters -->
</para>
</simpara>
</sect2>

<sect2 xml:id="migration83.deprecated.mbstring">
<title>MBString</title>

<para>
Passing a negative <parameter>$width</parameter> to
<simpara>
Passing a negative <parameter>width</parameter> to
<function>mb_strimwidth</function> is now deprecated.
</para>
</simpara>
</sect2>

<sect2 xml:id="migration83.deprecated.phar">
<title>Phar</title>

<para>
Calling <methodname>Phar::setStub</methodname> with a
<type>resource</type> and a <parameter>$length</parameter>
<type>resource</type> and a <parameter>length</parameter>
is now deprecated. Such calls should be replaced by:
<code>$phar->setStub(stream_get_contents($resource));</code>
</para>
Expand Down
28 changes: 14 additions & 14 deletions appendices/migration83/incompatible.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,28 +172,28 @@
<para>
The <function>range</function> function has had various changes:
<simplelist>
<member>A <classname>TypeError</classname> is now thrown when passing <type>object</type>s,
<member>A <exceptionname>TypeError</exceptionname> is now thrown when passing <type>object</type>s,
<type>resource</type>s, or <type>array</type>s as the boundary inputs.</member>
<member>A more descriptive <classname>ValueError</classname> is thrown when
passing <literal>0</literal> for <parameter>$step</parameter>.</member>
<member>A <classname>ValueError</classname> is now thrown when using a
negative <parameter>$step</parameter> for increasing ranges.</member>
<member>If <parameter>$step</parameter> is a float that can be interpreted
<member>A more descriptive <exceptionname>ValueError</exceptionname> is thrown when
passing <literal>0</literal> for <parameter>step</parameter>.</member>
<member>A <exceptionname>ValueError</exceptionname> is now thrown when using a
negative <parameter>step</parameter> for increasing ranges.</member>
<member>If <parameter>step</parameter> is a float that can be interpreted
as an int, it is now done so.</member>
<member>A <classname>ValueError</classname> is now thrown if any argument
<member>A <exceptionname>ValueError</exceptionname> is now thrown if any argument
is infinity or NAN.</member>
<member>An <constant>E_WARNING</constant> is now emitted if
<parameter>$start</parameter> or <parameter>$end</parameter> is the empty
<parameter>start</parameter> or <parameter>end</parameter> is the empty
string. The value continues to be cast to the value <literal>0</literal>.</member>
<member>An <constant>E_WARNING</constant> is now emitted if
<parameter>$start</parameter> or <parameter>$end</parameter> has more than
<parameter>start</parameter> or <parameter>end</parameter> has more than
one byte, only if it is a non-numeric string.</member>
<member>An <constant>E_WARNING</constant> is now emitted if
<parameter>$start</parameter> or <parameter>$end</parameter> is cast to an
<parameter>start</parameter> or <parameter>end</parameter> is cast to an
integer because the other boundary input is a number.
(e.g. <code>range(5, 'z');</code>).</member>
<member>An <constant>E_WARNING</constant> is now emitted if
<parameter>$step</parameter> is a float when trying to generate a range of
<parameter>step</parameter> is a float when trying to generate a range of
characters, except if both boundary inputs are numeric strings (e.g.
<code>range('5', '9', 0.5);</code> does not produce a warning).</member>
<member><function>range</function> now produce a list of characters if one
Expand All @@ -215,9 +215,9 @@ range('9', 'A'); // [9, 8, 7, 6, 5, 4, 3, 2, 1, 0], prior to PHP 8.3.0

<para>
<function>number_format</function> now handles negative
<parameter>$decimals</parameter> values by rounding
<parameter>$num</parameter> to <code>abs($decimals)</code> digits before the
decimal point. Previously, negative <parameter>$decimals</parameter> values
<parameter>decimals</parameter> values by rounding
<parameter>num</parameter> to <code>abs($decimals)</code> digits before the
decimal point. Previously, negative <parameter>decimals</parameter> values
were ignored.
</para>

Expand Down
6 changes: 3 additions & 3 deletions appendices/migration83/new-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ echo $user_ini['listen']; // localhost:9000
<sect2 xml:id="migration83.new-features.posix">
<title>POSIX</title>

<para>
<simpara>
<function>posix_getrlimit</function> now takes an optional
<parameter>$resource</parameter> parameter to allow fetching a single resource limit.
</para>
<parameter>resource</parameter> parameter to allow fetching a single resource limit.
</simpara>

<para>
<function>posix_isatty</function> now raises type warnings for integers
Expand Down
78 changes: 39 additions & 39 deletions appendices/migration83/other-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@
<sect3 xml:id="migration83.other-changes.functions.gd">
<title>Gd</title>

<para>
<simpara>
The signature of <function>imagerotate</function> has changed.
The <parameter>$ignore_transparent</parameter> parameter has been removed,
The <parameter>ignore_transparent</parameter> parameter has been removed,
as it was ignored since PHP 5.5.0.
</para>
</simpara>
</sect3>

<sect3 xml:id="migration83.other-changes.functions.intl">
Expand Down Expand Up @@ -262,18 +262,18 @@
<sect3 xml:id="migration83.other-changes.functions.mysqli">
<title>mysqli</title>

<para>
<simpara>
<function>mysqli_fetch_object</function> now raises a
<classname>ValueError</classname> instead of an <classname>Exception</classname>
when the <parameter>$constructor_args</parameter> argument is non empty with
when the <parameter>constructor_args</parameter> argument is non empty with
the class not having constructor.
</para>
</simpara>

<para>
<simpara>
<function>mysqli_poll</function> now raises a <classname>ValueError</classname>
when neither the <parameter>$read</parameter>
nor the <parameter>$error</parameter> arguments are passed.
</para>
when neither the <parameter>read</parameter>
nor the <parameter>error</parameter> arguments are passed.
</simpara>

<para>
<function>mysqli_field_seek</function> and
Expand All @@ -285,23 +285,23 @@
<sect3 xml:id="migration83.other-changes.functions.odbc">
<title>ODBC</title>

<para>
<simpara>
<function>odbc_autocommit</function> now accepts &null; for the
<parameter>$enable</parameter> parameter.
<parameter>enable</parameter> parameter.
Passing &null; has the same behaviour as passing only 1 parameter,
namely indicating if the autocommit feature is enabled or not.
</para>
</simpara>
</sect3>

<sect3 xml:id="migration83.other-changes.functions.pgsql">
<title>PGSQL</title>

<para>
<simpara>
<function>pg_fetch_object</function> now raises a
<classname>ValueError</classname> instead of an <classname>Exception</classname>
when the <parameter>$constructor_args</parameter> argument is non empty with
when the <parameter>constructor_args</parameter> argument is non empty with
the class not having constructor.
</para>
</simpara>

<para>
<function>pg_insert</function> now raises a <classname>ValueError</classname>
Expand All @@ -315,12 +315,12 @@
does not match properly with a PostgreSQL's type.
</para>

<para>
The <parameter>$row</parameter> parameter of
<simpara>
The <parameter>row</parameter> parameter of
<function>pg_fetch_result</function>,
<function>pg_field_prtlen</function>, and
<function>pg_field_is_null</function> is now nullable.
</para>
</simpara>
</sect3>

<sect3 xml:id="migration83.other-changes.functions.random">
Expand Down Expand Up @@ -371,28 +371,28 @@
case token is not provided when starting tokenization.
</para>

<para>
<simpara>
<function>password_hash</function> will now chain the underlying
<classname>Random\RandomException</classname>
as the <classname>ValueError</classname>'s <parameter>$previous</parameter>
<classname>Exception</classname> when salt generation fails.
</para>
<exceptionname>Random\RandomException</exceptionname>
as the <exceptionname>ValueError</exceptionname>'s <parameter>previous</parameter>
<exceptionname>Exception</exceptionname> when salt generation fails.
</simpara>

<para>
If using an array as the <parameter>$command</parameter>
<simpara>
If using an array as the <parameter>command</parameter>
for <function>proc_open</function>, it must now have at least one
non empty element. Otherwise a <classname>ValueError</classname>
is thrown.
</para>
</simpara>

<para>
<function>proc_open</function> returns &false; if <parameter>$command</parameter>
<simpara>
<function>proc_open</function> returns &false; if <parameter>command</parameter>
array is invalid command instead of resource object that produces warning later.
This was already the case for Windows but it is now also the case if a posix_spawn
implementation is in use (most Linux, BSD and MacOS platforms). There are still
some old platforms where this behavior is not changed as posix_spawn is not
supported there.
</para>
</simpara>

<para>
<function>array_sum</function> and <function>array_product</function> now
Expand All @@ -403,21 +403,21 @@
<!-- RFC: https://wiki.php.net/rfc/saner-array-sum-product -->
</para>

<para>
The <parameter>$decimals</parameter> of <function>number_format</function>
<simpara>
The <parameter>decimals</parameter> of <function>number_format</function>
now properly handles negative integers.
Rounding with a negative value for <parameter>$decimals</parameter> means
that <parameter>$num</parameter> is rounded to <parameter>$decimals</parameter>
Rounding with a negative value for <parameter>decimals</parameter> means
that <parameter>num</parameter> is rounded to <parameter>decimals</parameter>
significant digits before the decimal point.
Previously negative <parameter>$decimals</parameter> were silently
Previously negative <parameter>decimals</parameter> were silently
ignored and the number got rounded to zero decimal places.
</para>
</simpara>

<para>
A new <parameter>$before_needle</parameter> argument has been added to
<simpara>
A new <parameter>before_needle</parameter> argument has been added to
<function>strrchr</function>. It behaves like its counterpart in the
<function>strstr</function> or <function>stristr</function> functions.
</para>
</simpara>

<para>
<function>str_getcsv</function> and <function>fgetcsv</function> now return
Expand Down
4 changes: 2 additions & 2 deletions appendices/migration85/deprecated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
</simpara>

<simpara>
The <parameter>$context</parameter> parameter of the
The <parameter>context</parameter> parameter of the
<function>finfo_buffer</function> function has been deprecated
as it is ignored.
<!-- RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_context_parameter_for_finfo_buffer -->
Expand Down Expand Up @@ -285,7 +285,7 @@
<title>OpenSSL</title>

<simpara>
The <parameter>$key_length</parameter> parameter for
The <parameter>key_length</parameter> parameter for
<function>openssl_pkey_derive</function> has been deprecated.
This is because it is either ignored, or truncates the key, which can be
a security vulnerability.
Expand Down
14 changes: 7 additions & 7 deletions appendices/migration85/incompatible.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@

<simpara>
<function>bzcompress</function> now throws a <classname>ValueError</classname>
when <parameter>$block_size</parameter> is not between 1 and 9.
when <parameter>block_size</parameter> is not between 1 and 9.
</simpara>

<simpara>
<function>bzcompress</function> now throws a <classname>ValueError</classname>
when <parameter>$work_factor</parameter> is not between 0 and 250.
when <parameter>work_factor</parameter> is not between 0 and 250.
</simpara>

</sect2>
Expand All @@ -184,7 +184,7 @@
<simpara>
<function>finfo_file</function> and <methodname>finfo::file</methodname>
now throws a <exceptionname>ValueError</exceptionname> instead of a
<exceptionname>TypeError</exceptionname> when <parameter>$filename</parameter>
<exceptionname>TypeError</exceptionname> when <parameter>filename</parameter>
contains nul bytes.
This aligns the type of Error thrown to be consistent with the rest of
the language.
Expand Down Expand Up @@ -293,12 +293,12 @@

<simpara>
<function>pcntl_exec</function> now throws <exceptionname>ValueError</exceptionname>
when entries of the <parameter>$args</parameter> parameter contain null bytes.
when entries of the <parameter>args</parameter> parameter contain null bytes.
</simpara>

<simpara>
<function>pcntl_exec</function> now throws <exceptionname>ValueError</exceptionname>
when entries or keys of the <parameter>$env_vars</parameter> parameter
when entries or keys of the <parameter>env_vars</parameter> parameter
contain null bytes.
</simpara>

Expand Down Expand Up @@ -485,7 +485,7 @@

<simpara>
<methodname>SoapClient::__doRequest</methodname> now accepts a new,
optional <parameter>$uriParserClass</parameter> parameter accepting
optional <parameter>uriParserClass</parameter> parameter accepting
string or &null; arguments.
&null; represents the original (<function>parse_url</function>) based
method, while the new backends will be used when passing either
Expand Down Expand Up @@ -538,7 +538,7 @@

<simpara>
<methodname>SplFileObject::fwrite</methodname>'s parameter
<parameter>$length</parameter> is now nullable.
<parameter>length</parameter> is now nullable.
The default value changed from <literal>0</literal> to &null;.
</simpara>

Expand Down
6 changes: 3 additions & 3 deletions appendices/migration85/new-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ print T1 . PHP_EOL; // Prints "0"
<simpara>
The signature of <methodname>SoapFault::__construct</methodname> and
<methodname>SoapServer::fault</methodname> therefore
now have an optional <parameter>$lang</parameter> parameter.
now have an optional <parameter>lang</parameter> parameter.
This support solves compatibility with .NET SOAP clients.
</simpara>

Expand Down Expand Up @@ -453,11 +453,11 @@ print T1 . PHP_EOL; // Prints "0"
<title>XSL</title>

<simpara>
The <parameter>$namespace</parameter> argument of <methodname>XSLTProcessor::getParameter</methodname>,
The <parameter>namespace</parameter> argument of <methodname>XSLTProcessor::getParameter</methodname>,
<methodname>XSLTProcessor::setParameter</methodname> and
<methodname>XSLTProcessor::removeParameter</methodname> now actually works
instead of being treated as empty.
This only works if the <parameter>$name</parameter> argument does not use Clark notation and is not a
This only works if the <parameter>name</parameter> argument does not use Clark notation and is not a
QName because in those cases the namespace is taken from the namespace href or
prefix respectively.
</simpara>
Expand Down
Loading