mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
add remaining 7.4 migration sections
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@348018 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8d3d3db52b
commit
cd0727de73
5 changed files with 890 additions and 13 deletions
|
@ -8,11 +8,11 @@
|
|||
&appendices.migration74.new-classes;
|
||||
&appendices.migration74.new-functions;
|
||||
&appendices.migration74.constants;
|
||||
&appendices.migration74.incompatible; <!-- TODO -->
|
||||
&appendices.migration74.incompatible;
|
||||
&appendices.migration74.deprecated;
|
||||
&appendices.migration74.removed-extensions;
|
||||
&appendices.migration74.other-changes; <!-- TODO -->
|
||||
&appendices.migration74.windows-support; <!-- TODO -->
|
||||
&appendices.migration74.other-changes;
|
||||
&appendices.migration74.windows-support;
|
||||
|
||||
<sect1 phd:chunk="false" xml:id="migration74.intro">
|
||||
<para>
|
||||
|
|
|
@ -4,9 +4,314 @@
|
|||
<sect1 xml:id="migration74.incompatible" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Backward Incompatible Changes</title>
|
||||
|
||||
<para>
|
||||
<!-- TODO -->
|
||||
</para>
|
||||
<sect2 xml:id="migration74.incompatible.core">
|
||||
<title>PHP Core</title>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.non-array-access">
|
||||
<title>Array-style access of non-arrays</title>
|
||||
|
||||
<para>
|
||||
Trying to use values of type <type>null</type>, <type>bool</type>,
|
||||
<type>int</type>, <type>float</type> or <type>resource</type> as an
|
||||
array (such as <literal>$null["key"]</literal>) will now generate a notice.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.get-declared-classes">
|
||||
<title><function>get_declared_classes</function> function</title>
|
||||
|
||||
<para>
|
||||
The <function>get_declared_classes</function> function no longer
|
||||
returns anonymous classes that have not been instantiated yet.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.fn">
|
||||
<title><literal>fn</literal> keyword</title>
|
||||
|
||||
<para>
|
||||
<literal>fn</literal> is now a reserved keyword. In particular,
|
||||
it can no longer be used as a function or class name.
|
||||
It can still be used as a method or class constant name.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.php-tag">
|
||||
<title><literal><?php</literal> tag at end of file</title>
|
||||
|
||||
<para>
|
||||
<literal><?php</literal> at the end of the file (without trailing newline)
|
||||
will now be interpreted as an opening PHP tag. Previously it was interpreted
|
||||
either as a short opening tag followed by literal <literal>php</literal> and
|
||||
resulted in a syntax error (with <literal>short_open_tag=1</literal>)
|
||||
or was interpreted as a literal <literal><?php</literal> string
|
||||
(with <literal>short_open_tag=0</literal>).
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.stream-wrappers">
|
||||
<title>Stream wrappers</title>
|
||||
|
||||
<para>
|
||||
When using include/require on a stream,
|
||||
<methodname>streamWrapper::stream_set_option</methodname>
|
||||
will be invoked with the <constant>STREAM_OPTION_READ_BUFFER</constant> option.
|
||||
Custom stream wrapper implementations may need to implement the
|
||||
<methodname>streamWrapper::stream_set_option</methodname> method to
|
||||
avoid a warning (always returning &false; is a sufficient implementation).
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.serialization">
|
||||
<title>Serialization</title>
|
||||
|
||||
<para>
|
||||
The <literal>o</literal> serialization format has been removed.
|
||||
As it is never produced by PHP, this may only break unserialization of
|
||||
manually crafted strings.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.password-algorithm-constants">
|
||||
<title>Password algorithm constants</title>
|
||||
|
||||
<para>
|
||||
Password hashing algorithm identifiers are now nullable strings rather
|
||||
than integers.
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>PASSWORD_DEFAULT</constant> was int 1; now is &null;
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>PASSWORD_BCRYPT</constant> was int 1; now is string '2y'
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>PASSWORD_ARGON2I</constant> was int 2; now is string 'argon2i'
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>PASSWORD_ARGON2ID</constant> was int 3; now is string 'argon2id'
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
Applications correctly using the constants PASSWORD_DEFAULT,
|
||||
PASSWORD_BCRYPT, PASSWORD_ARGON2I, and PASSWORD_ARGON2ID will continue to
|
||||
function correctly.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.htmlentities">
|
||||
<title><function>htmlentities</function> function</title>
|
||||
|
||||
<para>
|
||||
<function>htmlentities</function> will now raise a notice
|
||||
(instead of a strict standards warning) if it is used with
|
||||
an encoding for which only basic entity substitution is supported,
|
||||
in which case it is equivalent to <function>htmlspecialchars</function>.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.incompatible.core.fread-fwrite">
|
||||
<title><function>fread</function> and <function>fwrite</function> function</title>
|
||||
|
||||
<para>
|
||||
<function>fread</function> and <function>fwrite</function> will now
|
||||
return &false; if the operation failed.
|
||||
Previously an empty string or 0 was returned.
|
||||
EAGAIN/EWOULDBLOCK are not considered failures.
|
||||
</para>
|
||||
<para>
|
||||
These functions now also raise a notice on failure,
|
||||
such as when trying to write to a read-only file resource.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.bcmath">
|
||||
<title>BCMath Arbitrary Precision Mathematics</title>
|
||||
|
||||
<para>
|
||||
BCMath functions will now warn if a non well-formed number is passed, such
|
||||
as <literal>"32foo"</literal>. The argument will be interpreted as zero, as before.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.curl">
|
||||
<title>CURL</title>
|
||||
|
||||
<para>
|
||||
Attempting to serialize a <classname>CURLFile</classname> class will now
|
||||
generate an exception. Previously the exception was only thrown on unserialization.
|
||||
</para>
|
||||
<para>
|
||||
Using <constant>CURLPIPE_HTTP1</constant> is deprecated, and is no longer
|
||||
supported as of cURL 7.62.0.
|
||||
</para>
|
||||
<para>
|
||||
The <literal>$version</literal> parameter of <function>curl_version</function>
|
||||
is deprecated. If any value not equal to the default <constant>CURLVERSION_NOW</constant>
|
||||
is passed, a warning is raised and the parameter is ignored.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.datetime">
|
||||
<title>Date and Time</title>
|
||||
|
||||
<para>
|
||||
Calling <function>var_dump</function> or similar on a
|
||||
<classname>DateTime</classname> or <classname>DateTimeImmutable</classname>
|
||||
instance will no longer leave behind accessible properties on the object.
|
||||
</para>
|
||||
<para>
|
||||
Comparison of <classname>DateInterval</classname> objects
|
||||
(using <literal>==</literal>, <literal><</literal>, and so on) will now generate
|
||||
a warning and always return &false;. Previously all <classname>DateInterval</classname>
|
||||
objects were considered equal, unless they had properties.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.intl">
|
||||
<title>Intl</title>
|
||||
|
||||
<para>
|
||||
The default parameter value of <function>idn_to_ascii</function> and
|
||||
<function>idn_to_utf8</function> is now <constant>INTL_IDNA_VARIANT_UTS46</constant>
|
||||
instead of the deprecated <constant>INTL_IDNA_VARIANT_2003</constant>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.mysqli">
|
||||
<title>MySQLi</title>
|
||||
|
||||
<para>
|
||||
The embedded server functionality has been removed. It was broken since
|
||||
at least PHP 7.0.
|
||||
</para>
|
||||
<para>
|
||||
The undocumented <literal>mysqli::$stat</literal> property has been removed
|
||||
in favor of <methodname>mysqli::stat</methodname>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.openssl">
|
||||
<title>OpenSSL</title>
|
||||
|
||||
<para>
|
||||
The <function>openssl_random_pseudo_bytes</function> function will now
|
||||
throw an exception in error situations, similar to <function>random_bytes</function>.
|
||||
In particular, an <classname>Error</classname> is thrown if the number of
|
||||
requested bytes is less than or equal to zero, and an <classname>Exception</classname>
|
||||
is thrown if sufficient randomness cannot be gathered.
|
||||
The <literal>$crypto_strong output</literal> argument is guaranteed to always
|
||||
be &true; if the function does not throw, so explicitly checking it is not necessary.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.pcre">
|
||||
<title>Regular Expressions (Perl-Compatible)</title>
|
||||
|
||||
<para>
|
||||
When <constant>PREG_UNMATCHED_AS_NULL</constant> mode is used, trailing
|
||||
unmatched capturing groups will now also be set to &null; (or
|
||||
<literal>[null, -1]</literal> if offset capture is enabled).
|
||||
This means that the size of the <literal>$matches</literal> will always be the same.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.pdo">
|
||||
<title>PHP Data Objects</title>
|
||||
|
||||
<para>
|
||||
Attempting to serialize a <classname>PDO</classname> or
|
||||
<classname>PDOStatement</classname> instance will now generate
|
||||
an <classname>Exception</classname> rather than a <classname>PDOException</classname>,
|
||||
consistent with other internal classes which do not support serialization.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.reflection">
|
||||
<title>Reflection</title>
|
||||
|
||||
<para>
|
||||
Reflection objects will now generate an exception if an attempt is made
|
||||
to serialize them. Serialization for reflection objects was never
|
||||
supported and resulted in corrupted reflection objects. It has been
|
||||
explicitly prohibited now.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.spl">
|
||||
<title>Standard PHP Library (SPL)</title>
|
||||
|
||||
<para>
|
||||
Calling <function>get_object_vars</function> on an <classname>ArrayObject</classname>
|
||||
instance will now always return the properties of the <classname>ArrayObject</classname>
|
||||
itself (or a subclass). Previously it returned the values of the wrapped
|
||||
array/object unless the <constant>ArrayObject::STD_PROP_LIST</constant>
|
||||
flag was specified.
|
||||
</para>
|
||||
<para>
|
||||
Other affected operations are:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<methodname>ReflectionObject::getProperties</methodname>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<function>reset</function>, <function>current</function>, etc.
|
||||
Use <interfacename>Iterator</interfacename> methods instead.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Potentially others working on object properties as a list.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
<literal>(array)</literal> casts are not affected. They will continue to
|
||||
return either the wrapped array, or the <classname>ArrayObject</classname>
|
||||
properties, depending on whether the <constant>ArrayObject::STD_PROP_LIST</constant>
|
||||
flag is used.
|
||||
</para>
|
||||
<para>
|
||||
<methodname>SplPriorityQueue::setExtractFlags</methodname> will throw
|
||||
an exception if zero is passed. Previously this would generate a recoverable
|
||||
fatal error on the next extraction operation.
|
||||
</para>
|
||||
<para>
|
||||
<classname>ArrayObject</classname>, <classname>ArrayIterator</classname>,
|
||||
<classname>SplDoublyLinkedList</classname> and <classname>SplObjectStorage</classname>
|
||||
now support the <literal>__serialize()</literal> and <literal>__unserialize()</literal>
|
||||
mechanism in addition to the <interfacename>Serializable</interfacename> interface.
|
||||
This means that serialization payloads created on older PHP versions can still be
|
||||
unserialized, but new payloads created by PHP 7.4 will not be understood by older versions.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.incompatible.tokenizer">
|
||||
<title>Tokenizer</title>
|
||||
|
||||
<para>
|
||||
<function>token_get_all</function> will now emit a
|
||||
<constant>T_BAD_CHARACTER</constant> token for unexpected
|
||||
characters instead of leaving behind holes in the token stream.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
|
|
@ -245,6 +245,12 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon'];
|
|||
was only supported by the pgsql driver. If a username/password is specified
|
||||
both in the constructor and the DSN, the constructor takes precedence.
|
||||
</para>
|
||||
<para>
|
||||
It is now possible to escape question marks in SQL queries to avoid them
|
||||
being interpreted as parameter placeholders. Writing <literal>??</literal>
|
||||
allows sending a single question mark to the database and e.g. use the
|
||||
PostgreSQL JSON key exists (<literal>?</literal>) operator.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.new-features.pdo_oci">
|
||||
|
|
|
@ -3,10 +3,526 @@
|
|||
|
||||
<sect1 xml:id="migration74.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Other Changes</title>
|
||||
|
||||
<para>
|
||||
<!-- TODO -->
|
||||
</para>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.performance">
|
||||
<title>Performance Improvements</title>
|
||||
|
||||
<sect3 xml:id="migration74.other-changes.performance.core">
|
||||
<title>PHP Core</title>
|
||||
<para>
|
||||
A specialized VM opcode for the <function>array_key_exists</function>
|
||||
function has been added, which improves performance of this function
|
||||
if it can be statically resolved. In namespaced code, this may require
|
||||
writing <literal>\array_key_exists()</literal> or explicitly importing
|
||||
the function.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="migration74.other-changes.performance.pcre">
|
||||
<title>Regular Expressions (Perl-Compatible)</title>
|
||||
<para>
|
||||
When <function>preg_match</function> in UTF-8 mode (<literal>"u"</literal> modifier)
|
||||
is repeatedly called on the same string (but possibly different offsets),
|
||||
it will only be checked for UTF-8 validity once.
|
||||
</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.ini">
|
||||
<title>Changes to INI File Handling</title>
|
||||
<para>
|
||||
<literal>zend.exception_ignore_args</literal> is a new INI directive
|
||||
for including or excluding arguments from stack traces generated
|
||||
from exceptions.
|
||||
</para>
|
||||
<para>
|
||||
<literal>opcache.preload_user</literal> is a new INI directive
|
||||
for specifying the user account under which preloading
|
||||
code is execute if it would otherwise be run as root (which is not
|
||||
allowed for security reasons).
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.pkg-config">
|
||||
<title>Migration to pkg-config</title>
|
||||
<para>
|
||||
A number of extensions have been migrated to exclusively use pkg-config for the
|
||||
detection of library dependencies. Generally, this means that instead of using
|
||||
<literal>--with-foo-dir=DIR</literal> or similar only <literal>--with-foo</literal>
|
||||
is used. Custom library paths can be specified either by adding additional
|
||||
directories to <literal>PKG_CONFIG_PATH</literal> or by explicitly specifying
|
||||
compilation options through <literal>FOO_CFLAGS</literal> and <literal>FOO_LIBS</literal>.
|
||||
</para>
|
||||
<para>
|
||||
The following extensions and SAPIs are affected:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>CURL:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-curl no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Enchant:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-enchant no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>FPM:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-fpm-systemd now uses only pkg-config for libsystem checks.
|
||||
The libsystemd minimum required version is 209.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>GD:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-gd becomes --enable-gd
|
||||
(whether to enable the extension at all) and
|
||||
--with-external-gd (to opt into using an external libgd,
|
||||
rather than the bundled one).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-png-dir has been removed. libpng is required.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-zlib-dir has been removed. zlib is required.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-freetype-dir becomes --with-freetype
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-jpeg-dir becomes --with-jpeg
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-webp-dir becomes --with-webp
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-xpm-dir becomes --with-xpm
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>IMAP:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-kerberos-systemd no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Intl:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-icu-dir has been removed. If --enable-intl is passed,
|
||||
then libicu is always required.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>LDAP:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-ldap-sasl no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Libxml:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-libxml-dir has been removed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--enable-libxml becomes --with-libxml.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-libexpat-dir has been renamed to --with-expat and
|
||||
no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Litespeed:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-litespeed becomes --enable-litespeed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Mbstring:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-onig has been removed. Unless --disable-mbregex
|
||||
has been passed, libonig is required.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>ODBC:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-iodbc no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-unixODBC without a directory now uses pkg-config (preferred).
|
||||
Directory is still accepted for old versions without libodbc.pc.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>OpenSSL:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-openssl no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>PCRE:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-pcre-regex has been removed. Instead --with-external-pcre
|
||||
is provided to opt into using an external PCRE library, rather
|
||||
than the bundled one.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>PDO_SQLite:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-pdo-sqlite no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Readline:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-libedit no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Sodium:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-sodium no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>SQLite3:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-sqlite3 no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>XSL:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-xsl no longer accepts a directory.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>Zip:</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--with-libzip has been removed.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
--enable-zip becomes --with-zip.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.csv">
|
||||
<title>CSV escaping</title>
|
||||
<para>
|
||||
<function>fputcsv</function>,
|
||||
<function>fgetcsv</function>,
|
||||
<methodname>SplFileObject::fputcsv</methodname>,
|
||||
<methodname>SplFileObject::fgetcsv</methodname>, and
|
||||
<methodname>SplFileObject::setCsvControl</methodname>
|
||||
now accept an empty string as <literal>$escape</literal> argument,
|
||||
which disables the proprietary PHP escaping mechanism.
|
||||
</para>
|
||||
<para>
|
||||
The behavior of <function>str_getcsv</function> has been
|
||||
adjusted accordingly (formerly, an empty string was identical
|
||||
to using the default).
|
||||
</para>
|
||||
<para>
|
||||
<methodname>SplFileObject::getCsvControl</methodname> now may also
|
||||
return an empty string for the third array element, accordingly.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.filter">
|
||||
<title>Data Filtering</title>
|
||||
<para>
|
||||
The <link linkend="book.filter">filter</link> extension no longer exposes
|
||||
<literal>--with-pcre-dir</literal> for Unix builds and can now reliably
|
||||
be built as shared when using <literal>./configure</literal>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.gd">
|
||||
<title>GD</title>
|
||||
<para>
|
||||
The behavior of <function>imagecropauto</function> in the bundled
|
||||
libgd has been synced with that of system libgd:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>IMG_CROP_DEFAULT</constant> is no longer falling
|
||||
back to <constant>IMG_CROP_SIDES</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Threshold-cropping now uses the algorithm of system libgd
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
The default <literal>$mode</literal> parameter of
|
||||
<function>imagecropauto</function> has been changed to
|
||||
<constant>IMG_CROP_DEFAULT</constant>; passing <literal>-1</literal>
|
||||
is now deprecated.
|
||||
</para>
|
||||
<para>
|
||||
<function>imagescale</function> now supports aspect ratio preserving
|
||||
scaling to a fixed height by passing <literal>-1</literal>
|
||||
as <literal>$new_width</literal>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.hash">
|
||||
<title>HASH Message Digest Framework</title>
|
||||
<para>
|
||||
The <link linkend="book.hash">hash</link> extension cannot be disabled
|
||||
anymore and is always an integral part of any PHP build, similar to
|
||||
the <link linkend="book.datetime">date</link> extension.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.intl">
|
||||
<title>Intl</title>
|
||||
<para>
|
||||
The <link linkend="book.intl">intl</link> extension
|
||||
now requires at least ICU 50.1.
|
||||
</para>
|
||||
<para>
|
||||
<classname>ResourceBundle</classname> now implements
|
||||
<interfacename>Countable</interfacename>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.ldap">
|
||||
<title>Lightweight Directory Access Protocol</title>
|
||||
<para>
|
||||
Support for nsldap and umich_ldap has been removed.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.libxml">
|
||||
<title>Libxml</title>
|
||||
<para>
|
||||
All libxml-based extensions now require libxml 2.7.6 or newer.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.mbstring">
|
||||
<title>Multibyte String</title>
|
||||
<para>
|
||||
The oniguruma library is no longer bundled with PHP, instead libonig needs
|
||||
to be available on the system. Alternatively <literal>--disable-mbregex</literal>
|
||||
can be used to disable the mbregex component.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.opcache">
|
||||
<title>OPcache</title>
|
||||
<para>
|
||||
The <literal>--disable-opcache-file</literal> and
|
||||
<literal>--enable-opcache-file</literal> configure options have been removed
|
||||
in favor of the <link linkend="ini.opcache.file-cache">opcache.file_cache</link>
|
||||
INI directive.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.password">
|
||||
<title>Password Hashing</title>
|
||||
<para>
|
||||
The <function>password_hash</function> and <function></function> functions
|
||||
now accept nullable &string; and &integer; for <literal>$algo</literal> argument.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.pear">
|
||||
<title>PEAR</title>
|
||||
<para>
|
||||
Installation of PEAR (including PECL) is no longer enabled by default. It
|
||||
can be explicitly enabled using <literal>--with-pear</literal>.
|
||||
This option is deprecated and may be removed in the future.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.reflection">
|
||||
<title>Reflection</title>
|
||||
<para>
|
||||
The numeric values of the modifier constants
|
||||
(<literal>IS_ABSTRACT</literal>,
|
||||
<literal>IS_DEPRECATED</literal>,
|
||||
<literal>IS_EXPLICIT_ABSTRACT</literal>,
|
||||
<literal>IS_FINAL</literal>,
|
||||
<literal>IS_IMPLICIT_ABSTRACT</literal>,
|
||||
<literal>IS_PRIVATE</literal>,
|
||||
<literal>IS_PROTECTED</literal>,
|
||||
<literal>IS_PUBLIC</literal>, and
|
||||
<literal>IS_STATIC</literal>) on the
|
||||
<classname>ReflectionClass</classname>,
|
||||
<classname>ReflectionFunction</classname>,
|
||||
<classname>ReflectionMethod</classname>,
|
||||
<classname>ReflectionObject</classname>, and
|
||||
<classname>ReflectionProperty</classname>
|
||||
classes have changed.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.simplexml">
|
||||
<title>SimpleXML</title>
|
||||
<para>
|
||||
<classname>SimpleXMLElement</classname> now implements
|
||||
<interfacename>Countable</interfacename>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.sqlite3">
|
||||
<title>SQLite3</title>
|
||||
<para>
|
||||
The bundled libsqlite has been removed. To build the
|
||||
<link linkend="book.sqlite3">SQLite3</link> extension a
|
||||
system libsqlite3 ≥ 3.7.4 is now required. To build the
|
||||
<link linkend="ref.pdo-sqlite">PDO_SQLite</link> extension
|
||||
a system libsqlite3 ≥ 3.5.0 is now required.
|
||||
</para>
|
||||
<para>
|
||||
Serialization and unserialization of <classname>SQLite3</classname>,
|
||||
<classname>SQLite3Stmt</classname> and <classname>SQLite3Result</classname>
|
||||
is now explicitly forbidden. Formerly, serialization of instances of
|
||||
these classes was possible, but unserialization yielded unusable objects.
|
||||
</para>
|
||||
<para>
|
||||
The <literal>@param</literal> notation can now also be used to
|
||||
denote SQL query parameters.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.other-changes.zip">
|
||||
<title>Zip</title>
|
||||
<para>
|
||||
The bundled libzip library has been removed.
|
||||
A system libzip >= 0.11 is now necessary to build the
|
||||
<link linkend="book.zip">zip</link> extension.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
|
|
@ -4,9 +4,59 @@
|
|||
<sect1 xml:id="migration74.windows-support" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Windows Support</title>
|
||||
|
||||
<para>
|
||||
<!-- TODO -->
|
||||
</para>
|
||||
<sect2 xml:id="migration74.windows-support.configure">
|
||||
<title>Configure flags</title>
|
||||
<para>
|
||||
configure now regards additional CFLAGS and LDFLAGS set as environment
|
||||
variables.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.windows-support.other">
|
||||
<title>CTRL handling</title>
|
||||
<para>
|
||||
CTRL+C and CTRL+BREAK on console can be caught by setting a handler function
|
||||
with <function>sapi_windows_set_ctrl_handler</function>.
|
||||
</para>
|
||||
<para>
|
||||
<function>proc_open</function> on Windows can be passed a
|
||||
"create_process_group" option. It is required if the child
|
||||
process is supposed to handle CTRL events.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.windows-support.opcache">
|
||||
<title>OPcache</title>
|
||||
<para>
|
||||
OPcache now supports an arbitrary number of separate caches per user via the
|
||||
the INI directive <literal>opcache.cache_id</literal>.
|
||||
All processes with the same cache ID and user share an OPcache instance.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration74.windows-support.stat">
|
||||
<title>stat</title>
|
||||
<para>
|
||||
The stat implementation has been refactored.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
An inode number is delivered and is based on the NTFS file index.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
The device number is now based on the volume serial number.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Note that both values are derived from the system and provided as-is on 64-bit
|
||||
systems. On 32-bit systems, these values might overflow the 32-bit integer in
|
||||
PHP, so they're fake.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue