Files
doc-fr/appendices/migration73/other-changes.xml
2021-05-11 14:10:55 +01:00

355 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 477c5f97a6e31b77a02cabcd9950a3ed0fd91fa2 Maintainer: jbnahan Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="migration73.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Autres changements</title>
<sect2 xml:id="migration73.other-changes.core">
<title>PHP Core</title>
<sect3 xml:id="migration73.other-changes.core.setcookie">
<title>Set(raw)cookie accepte l'argument $option</title>
<para>
<function>setcookie</function> et <function>setrawcookie</function> prennent
également la signature suivante :
<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>
<literal>$options</literal> est un tableau associatif qui peut avoir l'une
des clés suivantes <literal>"expires"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> et <literal>"samesite"</literal>.
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.syslog">
<title>Nouvelles directives INI Syslog</title>
<para>
Les directives INI suivantes ont été ajoutées pour personnaliser
l'enregistrement, si <link linkend="ini.error-log">error_log</link>
est défini sur <literal>syslog</literal>:
<variablelist>
<varlistentry>
<term><link linkend="ini.syslog.facility">syslog.facility</link></term>
<listitem>
<simpara>
Spécifie quel type de programme enregistre le message.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><link linkend="ini.syslog.filter">syslog.filter</link></term>
<listitem>
<simpara>
Spécifie le type de filtre pour filtrer les messages enregistrés,
avec les types de filtres pris en charge - <literal>all</literal>,
<literal>no-ctrl</literal> et <literal>ascii</literal>.
À partir de PHP 7.3.8, <literal>raw</literal> est aussi disponible,
restaurant le comportement de syslog correspondant au versions
antérieures de PHP. Ce filtre affectera aussi les appels à
<function>syslog</function>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><link linkend="ini.syslog.ident">syslog.ident</link></term>
<listitem>
<simpara>
Spécifie la chaîne ident qui préfixera chaque message.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.gc">
<title>Collecteur de mémoire</title>
<para>
Le <link linkend="features.gc.collecting-cycles">GC cyclique</link> a été amélioré,
ce qui améliore grandement les performances.
</para>
</sect3>
<sect3 xml:id="migration73.other-changes.core.misc">
<title>Divers</title>
<para>
<function>var_export</function> exporte maintenant les objets
<classname>stdClass</classname> comme un tableau modifié en objet
(<code>(object) array( ... )</code>), plutôt que d'utiliser la méthode
inexistante <methodname>stdClass::__setState</methodname>.
</para>
<para>
<function>debug_zval_dump</function> a été modifié pour afficher les tableaux
et les objets récursifs de la même manière que <function>var_dump</function>.
Maintenant, il ne les affiche pas deux fois.
</para>
<para>
<function>array_push</function> et <function>array_unshift</function> peuvent
maintenant être appelés avec un seul argument, ce qui est particulièrement
pratique avec l'opétateur de décomposition.
</para>
</sect3>
</sect2>
<sect2 xml:id="migration73.other-changes.phpdbg">
<title>Débogueur PHP interactif</title>
<para>
Les constantes inutilisées <constant>PHPDBG_FILE</constant>,
<constant>PHPDBG_METHOD</constant>, <constant>PHPDBG_LINENO</constant> et
<constant>PHPDBG_FUNC</constant> ont été supprimées.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.fpm">
<title>Gestionnaire de processus FastCGI</title>
<para>
La fonction <function>getallheaders</function> est maintenant également disponible.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.curl">
<title>Bibliothèque URL client</title>
<para>
libcurl ≥ 7.15.5 est maintenant nécessaire.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.filter">
<title>Filtrage des données</title>
<para>
<constant>FILTER_VALIDATE_FLOAT</constant> gère maintenant l'option
<literal>thousand</literal>, qui définit l'ensemble de caractères de
séparation pour les milliers. La valeur par défaut est (<code>"',."</code>)
entièrement rétrocompatible avec les anciennes versions PHP.
</para>
<para>
<constant>FILTER_SANITIZE_ADD_SLASHES</constant> a été ajouté comme un alias
du filtre <literal>magic_quotes</literal> (<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant>).
Le filtre <literal>magic_quotes</literal> est susceptible d'être supprimé
dans les futures versions de PHP.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.ftp">
<title>FTP</title>
<para>
Le mode de transfert par défaut a été modifié pour <literal>binary</literal>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.intl">
<title>Fonctions d'internationalisation</title>
<para>
<constant>Normalizer::NONE</constant> est déprécié, lorsque PHP est lié à
ICU ≥ 56.
</para>
<para>
Introduction de <constant>Normalizer::FORM_KC_CF</constant> en tant qu'argument de
<methodname>Normalizer::normalize</methodname> pour la normalisation
<literal>NFKC_Casefold</literal>; disponible lorsque PHP est lié à
ICU ≥ 56.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.json">
<title>Notation d'objets JavaScript</title>
<para>
Un nouveau drapeau été ajouté, <constant>JSON_THROW_ON_ERROR</constant>,
qui peut être utilisé avec <function>json_decode</function> ou
<function>json_encode</function> et provoque la levée de la nouvelle exception
<classname>JsonException</classname> lors d'une erreur, au lieu de définir
l'état d'erreur global qui est récupéré avec <function>json_last_error</function>
et <function>json_last_error_msg</function>.
<constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> prend le pas sur
<constant>JSON_THROW_ON_ERROR</constant>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.mbstring">
<title>Chaîne multioctet</title>
<para>
L'option de configuration <option role="configure">--with-libmbfl</option> n'est
plus disponible.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.uodbc">
<title>ODBC (Unifié)</title>
<para>
La gestion de <literal>ODBCRouter</literal> et <literal>Birdstep</literal>
incluant la directive ini <literal>birdstep.max_links</literal> ont été supprimés.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.opcache">
<title>OPcache</title>
<para>
La directive ini <literal>opcache.inherited_hack</literal> a été supprimée.
La valeur était ignorée depuis PHP 5.3.0.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.openssl">
<title>OpenSSL</title>
<para>
Les options de flux ssl <literal>min_proto_version</literal> et
<literal>max_proto_version</literal> ainsi que des constantes liées pour
d'éventuelles valeurs de protocole TLS ont été ajoutées.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pcre">
<title>Expressions rationnelles (Perl-Compatible)</title>
<para>
L'<link linkend="book.pcre">extension PCRE</link> a été mise à niveau vers PCRE2,
ce qui peut provoquer des changements mineurs de comportement (par exemple, les
plages de caractères dans les classes sont maintenant plus strictement interprétées),
et augmente la syntaxe d'expression rationnelle existante.
</para>
<para>
<function>preg_quote</function> échappe désormais le caractère <literal>'#'</literal>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pdo-dblib">
<title>Fonctions Microsoft SQL Server et Sybase (PDO_DBLIB)</title>
<para>
L'attribut <constant>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</constant> a été ajouté pour
permettre le saut automatique des ensembles de lignes vides.
</para>
<para>
L'attribut <constant>PDO::DBLIB_ATTR_TDS_VERSION</constant> a été ajouté pour
exposer la version de TDS.
</para>
<para>
Les colonnes DATETIME2 sont désormais traitées comme des colonnes DATETIME.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.pdo-sqlite">
<title>Fonctions SQLite (PDO_SQLITE)</title>
<para>
Les bases de données SQLite3 peuvent désormais être ouvertes en lecture seule en
définissant le nouvel attribut <constant>PDO::SQLITE_ATTR_OPEN_FLAGS</constant> à
<constant>PDO::SQLITE_OPEN_READONLY</constant>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.session">
<title>Manipulation de session</title>
<para>
<function>session_set_cookie_params</function> gère désormais en charge la signature
suivante :
<methodsynopsis>
<type>bool</type><methodname>session_set_cookie_params</methodname>
<methodparam><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<literal>$options</literal> est un tableau associatif qui peut contenir chacune
de ces clés <literal>"lifetime"</literal>, <literal>"path"</literal>,
<literal>"domain"</literal>, <literal>"secure"</literal>,
<literal>"httponly"</literal> et <literal>"samesite"</literal>.
Par conséquent, la valeur de retour de <function>session_get_cookie_params</function>
a maintenant également un élément avec la clé <literal>"samesite"</literal>.
En outre, la nouvelle directive ini <literal>session.cookie_samesite</literal>
a été ajoutée pour définir la valeur par défaut de SameSite pour les cookies.
Par défaut à <literal>""</literal> (chaîne vide), de sorte qu'aucune directive
SameSite n'est définie. La valeur peut être <literal>"Lax"</literal> ou
<literal>"Strict"</literal>, qui définit la valeur de SameSite.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.tidy">
<title>Tidy</title>
<para>
Construire avec <link xlink:href="&url.tidyp;">tidyp</link> est maintenant
géré de façon transparente. Etant donné que tidyp n'offre pas d'API pour obtenir la date de sortie, <function>tidy_get_release</function> et <methodname>tidy::getRelease</methodname> retourne <literal>'unknown'</literal> dans ce cas.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.xml">
<title>Parseur XML</title>
<para>
La valeur de retour de la procédure de rappel de
<function>xml_set_external_entity_ref_handler</function> n'est plus ignorée
si l'extension a été construite avec libxml. Auparavant, la valeur
de retour était ignorée, et l'analyse ne cessait jamais.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.zip">
<title>Zip</title>
<para>
Construire statiquement libzip est déconseillé, mais toujours possible en ajoutant
l'option de configuration <option role="configure">--without-libzip</option>.
</para>
</sect2>
<sect2 xml:id="migration73.other-changes.zlib">
<title>Zlib Compression</title>
<para>
L'option de contexte zlib/level pour <link
linkend="wrappers.compression">compress.zlib wrapper</link>
pour faciliter la définition du niveau de compression souhaité a été ajoutée.
</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
-->