php-doc-en/appendices/migration73/other-changes.xml
SvenRtbg 477c5f97a6
Document the changes to syslog.filter
* Documenting the changes to syslog.filter

https://github.com/php/php-src/pull/4265 restored the previous handling of multi-line log messages by adding `syslog.filter=raw`.

* Highlight the fact that line splitting is happening in all of the three original modes, but not in "raw".

* Add "raw" to syslog section of 7.3 migration guide

Closes GH-589.
2021-05-10 18:19:06 +02:00

351 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="migration73.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Other Changes</title>
<sect2 xml:id="migration73.other-changes.core">
<title>PHP Core</title>
<sect3 xml:id="migration73.other-changes.core.setcookie">
<title>Set(raw)cookie accepts $option Argument</title>
<para>
<function>setcookie</function> and <function>setrawcookie</function> now also
support the following signature:
<methodsynopsis>
<type>bool</type><methodname>setcookie</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>value</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
where <literal>$options</literal> is an associative array which may have
any of the keys <literal>"expires"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> and <literal>"samesite"</literal>.
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.syslog">
<title>New Syslog ini Directives</title>
<para>
The following ini Directives have been added to customize logging, if
<link linkend="ini.error-log">error_log</link> is set to
<literal>syslog</literal>:
<variablelist>
<varlistentry>
<term><link linkend="ini.syslog.facility">syslog.facility</link></term>
<listitem>
<simpara>
Specifies what type of program is logging the message.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><link linkend="ini.syslog.filter">syslog.filter</link></term>
<listitem>
<simpara>
Specifies the filter type to filter the logged messages, with the
supported filter types - <literal>all</literal>,
<literal>no-ctrl</literal> and <literal>ascii</literal>.
Starting with PHP 7.3.8, <literal>raw</literal> is also available,
restoring the way syslog behaved in previous PHP versions.
This filter will also affect calls to <function>syslog</function>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><link linkend="ini.syslog.ident">syslog.ident</link></term>
<listitem>
<simpara>
Specifies the ident string which is prepended to every message.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.gc">
<title>Garbage Collection</title>
<para>
The <link linkend="features.gc.collecting-cycles">cyclic GC</link> has been
enhanced, which may result in considerable performance improvements.
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.misc">
<title>Miscellaneous</title>
<para>
<function>var_export</function> now exports <classname>stdClass</classname>
objects as an array cast to an object (<code>(object) array( ... )</code>), rather
than using the nonexistent method <methodname>stdClass::__setState</methodname>.
</para>
<para>
<function>debug_zval_dump</function> was changed to display recursive arrays
and objects in the same way as <function>var_dump</function>. Now, it doesn't
display them twice.
</para>
<para>
<function>array_push</function> and <function>array_unshift</function> can
now also be called with a single argument, which is particularly convenient
wrt. the spread operator.
</para>
</sect3>
</sect2>
<sect2 xml:id="migration73.other-changes.phpdbg">
<title>Interactive PHP Debugger</title>
<para>
The unused constants <constant>PHPDBG_FILE</constant>,
<constant>PHPDBG_METHOD</constant>, <constant>PHPDBG_LINENO</constant> and
<constant>PHPDBG_FUNC</constant> have been removed.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.fpm">
<title>FastCGI Process Manager</title>
<para>
The <function>getallheaders</function> function is now also available.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.curl">
<title>Client URL Library</title>
<para>
libcurl ≥ 7.15.5 is now required.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.filter">
<title>Data Filtering</title>
<para>
<constant>FILTER_VALIDATE_FLOAT</constant> now also supports a <literal>thousand</literal>
option, which defines the set of allowed thousand separator chars. The default
(<code>"',."</code>) is fully backward compatible with former PHP versions.
</para>
<para>
<constant>FILTER_SANITIZE_ADD_SLASHES</constant> has been added as an alias of the
<literal>magic_quotes</literal> filter (<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant>).
The <literal>magic_quotes</literal> filter is subject to removal in future versions of PHP.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.ftp">
<title>FTP</title>
<para>
The default transfer mode has been changed to <literal>binary</literal>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.intl">
<title>Internationalization Functions</title>
<para>
<constant>Normalizer::NONE</constant> is deprecated, when PHP is linked with
ICU ≥ 56.
</para>
<para>
Introduced <constant>Normalizer::FORM_KC_CF</constant> as
<methodname>Normalizer::normalize</methodname> argument for
<literal>NFKC_Casefold</literal> normalization; available when linked with
ICU ≥ 56.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.json">
<title>JavaScript Object Notation</title>
<para>
A new flag has been added, <constant>JSON_THROW_ON_ERROR</constant>, which
can be used with <function>json_decode</function> or
<function>json_encode</function> and causes these functions to throw the new
<classname>JsonException</classname> upon an error, instead of setting the
global error state that is retrieved with
<function>json_last_error</function> and <function>json_last_error_msg</function>.
<constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> takes precedence over
<constant>JSON_THROW_ON_ERROR</constant>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.mbstring">
<title>Multibyte String</title>
<para>
The configuration option <option role="configure">--with-libmbfl</option> is
no longer available.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.uodbc">
<title>ODBC (Unified)</title>
<para>
Support for <literal>ODBCRouter</literal> and <literal>Birdstep</literal>
including the <literal>birdstep.max_links</literal> ini directive has been
removed.
</para>
</sect2>
<sect2 xml:id="migration72.other-changes.opcache">
<title>OPcache</title>
<para>
The <literal>opcache.inherited_hack</literal> ini directive has been removed.
The value has already been ignored since PHP 5.3.0.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.openssl">
<title>OpenSSL</title>
<para>
The <literal>min_proto_version</literal> and <literal>max_proto_version</literal>
ssl stream options as well as related constants for possible TLS protocol values
have been added.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pcre">
<title>Regular Expressions (Perl-Compatible)</title>
<para>
The <link linkend="book.pcre">PCRE extension</link> has been upgraded to
PCRE2, which may cause minor behavioral changes (for instance, character
ranges in classes are now more strictly interpreted), and augments the
existing regular expression syntax.
</para>
<para>
<function>preg_quote</function> now also escapes the <literal>'#'</literal>
character.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pdo-dblib">
<title>Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</title>
<para>
The attribute <constant>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</constant> to enable automatic
skipping of empty rowsets has been added.
</para>
<para>
The <constant>PDO::DBLIB_ATTR_TDS_VERSION</constant> attribute which exposes
the TDS version has been added.
</para>
<para>
DATETIME2 columns are now treated like DATETIME columns.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pdo-sqlite">
<title>SQLite Functions (PDO_SQLITE)</title>
<para>
SQLite3 databases can now be opened in read-only mode by setting the
new <constant>PDO::SQLITE_ATTR_OPEN_FLAGS</constant> attribute to
<constant>PDO::SQLITE_OPEN_READONLY</constant>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.session">
<title>Session Handling</title>
<para>
<function>session_set_cookie_params</function> now also supports the
following signature:
<methodsynopsis>
<type>bool</type><methodname>session_set_cookie_params</methodname>
<methodparam><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
where <literal>$options</literal> is an associative array which may have
any of the keys <literal>"lifetime"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> and <literal>"samesite"</literal>. Accordingly,
the return value of <function>session_get_cookie_params</function> now also
has an element with the key <literal>"samesite"</literal>.
Furthermore, the new <literal>session.cookie_samesite</literal> ini option to
set the default of the SameSite directive for cookies has been added. It
defaults to <literal>""</literal> (empty string), so no SameSite directive is
set. Can be set to <literal>"Lax"</literal> or <literal>"Strict"</literal>,
which sets the respective SameSite directive.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.tidy">
<title>Tidy</title>
<para>
Building against <link xlink:href="&url.tidyp;">tidyp</link> is now also
supported transparently. Since tidyp offers no API to get the release date,
<function>tidy_get_release</function> and <methodname>tidy::getRelease</methodname>
return <literal>'unknown'</literal> in this case.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.xml">
<title>XML Parser</title>
<para>
The return value of the <function>xml_set_external_entity_ref_handler</function>
callback is no longer ignored if the extension has been built against libxml.
Formerly, the return value has been ignored, and parsing did never stop.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.zip">
<title>Zip</title>
<para>
Building against the bundled libzip is discouraged, but still possible by
adding <option role="configure">--without-libzip</option> to the configuration.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.zlib">
<title>Zlib Compression</title>
<para>
The zlib/level context option for the <link
linkend="wrappers.compression">compress.zlib wrapper</link> to facilitate
setting the desired compression level has been added.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->