Skip to content

Commit

Permalink
Various sync with en (22583751fbfdaa3eaa41aeb6470d1343f5cb2c78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan2Shrek committed Feb 7, 2025
1 parent 201db9d commit ee8bd79
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 57 deletions.
5 changes: 2 additions & 3 deletions appendices/filters.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: f80105b4fc1196bd8d5fecb98d686b580b1ff65d Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<appendix xml:id="filters" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Liste des filtres standards</title>
Expand Down Expand Up @@ -553,7 +552,7 @@ fclose($fp);
//déchiffrement...
$fp = fopen('encrypted-file.enc', 'rb');
$iv = fread($fp, $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC));
$opts = array('mode'=>'cbc','iv'=>$iv, 'key'=>$key)
$opts = array('mode'=>'cbc','iv'=>$iv, 'key'=>$key);
stream_filter_append($fp, 'mdecrypt.blowfish', STREAM_FILTER_READ, $opts);
$data = rtrim(stream_get_contents($fp));//trims off null padding
fclose($fp);
Expand Down
7 changes: 3 additions & 4 deletions appendices/migration70/incompatible/error-handling.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 44b298ee5daf7c79a8e63c7e80ffe65232822838 Maintainer: jbnahan Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: jbnahan Status: ready -->
<!-- Reviewed: yes Maintainer: girgias -->

<sect2 xml:id="migration70.incompatible.error-handling">
Expand Down Expand Up @@ -51,14 +50,14 @@
<![CDATA[
<?php
// Code pour PHP 5 qui va se briser.
function handler(Exception $e) { ... }
function handler(Exception $e) { /* ... */ }
set_exception_handler('handler');
// Compatible PHP 5 et 7.
function handler($e) { ... }
// PHP 7 seulement.
function handler(Throwable $e) { ... }
function handler(Throwable $e) { /* ... */ }
?>
]]>
</programlisting>
Expand Down
11 changes: 7 additions & 4 deletions appendices/migration74/new-features.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8d1a5d2d15df15cc5cbc7f96cdc083b8fe49366e Maintainer: girgias Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: girgias Status: ready -->
<!-- Reviewed: no -->

<sect1 xml:id="migration74.new-features" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -326,10 +325,14 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon'];
<![CDATA[
<?php
// Retourne un tableau contenant tout l'état nécessaire de l'objet.
public function __serialize(): array;
public function __serialize(): array
{
}
// Restaure l'état d'un objet depuis le tableau de données fourni.
public function __unserialize(array $data): void;
public function __unserialize(array $data): void
{
}
?>
]]>
</programlisting>
Expand Down
4 changes: 2 additions & 2 deletions appendices/migration84/new-features.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 4edd2166e1121cd17ae942458baa532edf4d70e1 Maintainer: Fan2Shrek Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->
<sect1 xml:id="migration84.new-features">
<title>Nouvelles fonctionnalités</title>
Expand Down Expand Up @@ -81,7 +81,7 @@ class Example
$initializer = static function (Example $fantôme): void {
// Récupérer les données ou dépendances
$data = ...;
$data = getData();
// Initialiser
$fantôme->__construct($data);
};
Expand Down
4 changes: 2 additions & 2 deletions language/control-structures/alternative-syntax.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a41057cbdf053fd8c3a3bec6f1bbf113ffec8e42 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->

<sect1 xml:id="control-structures.alternative-syntax" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -72,7 +72,7 @@ endif;
<![CDATA[
<?php switch ($foo): ?>
<?php case 1: ?>
...
// ...
<?php endswitch; ?>
]]>
</programlisting>
Expand Down
10 changes: 8 additions & 2 deletions language/control-structures/elseif.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: bbaf4fea6946bf6d0b67573d5f2f96c5a2c5d678 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->

<sect1 xml:id="control-structures.elseif" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -75,7 +74,14 @@ if ($a > $b):
else if ($a == $b): // ne compilera pas
echo "La ligne ci-dessus provoque une erreur d'interprétation";
endif;
]]>
</programlisting>
</informalexample>

<informalexample>
<programlisting role="php">
<![CDATA[
<?php
/* Bonne méthode : */
if ($a > $b):
Expand Down
7 changes: 3 additions & 4 deletions language/control-structures/match.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: e50047b76fc0be5a2345a0b7c34979e3077e8580 Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: pierrick Status: ready -->
<!-- Reviewed: yes -->

<sect1 xml:id="control-structures.match" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -139,8 +138,8 @@ string(9) "Adolescent"
<![CDATA[
<?php
$result = match ($x) {
foo() => ...,
$this->bar() => ..., // $this->bar() n'est pas appelé si foo() === $x
foo() => 'value',
$this->bar() => 'value', // $this->bar() n'est pas appelé si foo() === $x
$this->baz => beep(), // beep() n'est pas appelé sauf si $x === $this->baz
// etc.
};
Expand Down
4 changes: 2 additions & 2 deletions language/oop5/autoload.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 7befd9af043386158ef9080723eb18e03f0625c7 Maintainer: jpauli Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: jpauli Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="language.oop5.autoload" xmlns="http://docbook.org/ns/docbook">
<title>Auto-chargement de classes</title>
Expand Down Expand Up @@ -99,7 +99,7 @@ Fatal error: Interface 'ITest' not found in ...
<?php
require __DIR__ . '/vendor/autoload.php';
$uuid = new Ramsey\Uuid\Uuid::uuid7();
$uuid = Ramsey\Uuid\Uuid::uuid7();
echo "Nouvel UUID généré -> ", $uuid->toString(), "\n";
?>
Expand Down
15 changes: 11 additions & 4 deletions language/types/array.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: cb3794f501ce55cedc40125fb995018bdc4ac1d1 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="language.types.array">
<title>Les tableaux</title>
Expand Down Expand Up @@ -920,14 +920,21 @@ print "Hello $arr[fruit]"; // Hello apple
print "Hello {$arr[fruit]}"; // Hello carrot
print "Hello {$arr['fruit']}"; // Hello apple
// La concaténation est une autre solution
print "Hello " . $arr['fruit']; // Hello apple
?>
]]>
</programlisting>
</informalexample>
<informalexample>
<programlisting role="php">
<![CDATA[
// Ceci ne fonctionnera pas, et en résultera une erreur d'analyse, comme ceci :
// Parse error: parse error, expecting T_STRING' or T_VARIABLE' or T_NUM_STRING'
// Ceci arrive lors de l'utilisation d'une supergloables dans les chaînes
print "Hello $arr['fruit']";
print "Hello $_GET['foo']";
// La concaténation est une autre solution
print "Hello " . $arr['fruit']; // Hello apple
?>
]]>
</programlisting>
Expand Down
4 changes: 2 additions & 2 deletions language/types/type-juggling.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: f94d903985119d3ac00f4528551df947f57b667f Maintainer: girgias Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: girgias Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="language.types.type-juggling">
<title>Jonglage de type</title>
Expand Down Expand Up @@ -250,7 +250,7 @@

<example>
<title>Exemple de types contraints à une partie type de l'union</title>
<programlisting role="php">
<programlisting>
<![CDATA[
<?php
// int|string
Expand Down
15 changes: 12 additions & 3 deletions language/variables.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 8a03ff3954f301cf8825db1323b54709f6de70a2 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->

<chapter xml:id="language.variables" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -46,21 +46,30 @@
&tip.userlandnaming;

<example>
<title>Noms de variables valides et invalides</title>
<title>Noms de variables valides</title>
<programlisting role="php">
<![CDATA[
<?php
$var = 'Jean';
$Var = 'Paul';
echo "$var, $Var"; // affiche "Jean, Paul"
$4site = 'pas encore'; // invalide : commence par un nombre
$_4site = 'pas encore'; // valide : commence par un souligné
$täyte = 'mansikka'; // valide : 'ä' est ASCII (étendu) 228.
?>
]]>
</programlisting>
</example>
<example>
<title>Noms de variables invalides</title>
<programlisting role="php">
<![CDATA[
<?php
$4site = 'pas encore'; // invalide : commence par un nombre
]]>
</programlisting>
</example>


<simpara>
PHP accepte une séquence de n'importe quels octets comme nom de variable.
Expand Down
9 changes: 4 additions & 5 deletions reference/event/eventhttpconnection/setclosecallback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: e5d7cfa894ddb7d30f5b63ef272f33e80e1c63f3 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->

<refentry xml:id="eventhttpconnection.setclosecallback" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -136,9 +135,9 @@ function _http_default($req, $dummy)
*/
$bev = $req->getBufferEvent();
$bev->enable(Event::READ);
// Nous devons le libérer explicitement. Voir ]]>
<methodname>EventHttpRequest::getConnection</methodname>
<![CDATA[
// Nous devons le libérer explicitement. Voir EventHttpRequest::getConnection
$bev->free(); // Nous devons le libérer explicitement
Expand Down
6 changes: 3 additions & 3 deletions reference/gearman/gearmanclient/addtaskstatus.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 3c0b61c45a5dabe46865510311e57b77ea3dddb7 Maintainer: gui Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: gui Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="gearmanclient.addtaskstatus" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -83,8 +83,8 @@ do
{
/* Utilise la variable de contexte pour savoir combien de tâches ont été effectuées */
$done = 0;
$gmclient->addTaskStatus($handles[0], &$done);
$gmclient->addTaskStatus($handles[1], &$done);
$gmclient->addTaskStatus($handles[0], $done);
$gmclient->addTaskStatus($handles[1], $done);
$gmclient->runTasks();
echo "Fait : $done\n";
sleep(1);
Expand Down
4 changes: 2 additions & 2 deletions reference/intl/intlchar/totitle.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a37831eed5d1b161050cecd44fd5f8e826a70597 Maintainer: Fan2Shrek Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="intlchar.totitle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -52,7 +52,7 @@ var_dump(IntlChar::totitle("dž"));
var_dump(IntlChar::totitle("Φ"));
var_dump(IntlChar::totitle("φ"));
var_dump(IntlChar::totitle("1"));
var_dump(IntlChar::totitle("ᾳ");
var_dump(IntlChar::totitle("ᾳ"));
var_dump(IntlChar::totitle(ord("A")));
?>
]]>
Expand Down
5 changes: 2 additions & 3 deletions reference/mbstring/functions/mb-decode-numericentity.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: d553fa36940639b0889ec4358fa3bbb92f123b69 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.mb-decode-numericentity" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -111,7 +110,7 @@
$convmap = array (
int start_code1, int end_code1, int offset1, int mask1,
int start_code2, int end_code2, int offset2, int mask2,
........
// ........
int start_codeN, int end_codeN, int offsetN, int maskN );
// Spécifie les valeurs Unicode de début (start_codeN) et fin (end_codeN)
// Ajoutez offsetN à la valeur, et faites un ET bit-à-bit avec maskN, puis
Expand Down
6 changes: 3 additions & 3 deletions reference/mongodb/architecture.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 3e871fe7eab38f9b0398569c57a1dd0c21e69652 Maintainer: Fan2Shrek Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->
<chapter xml:id="mongodb.architecture" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<titleabbrev>Architecture et fonctionnalités spéciales</titleabbrev>
Expand Down Expand Up @@ -476,8 +476,8 @@ class AnotherClass5 implements MongoDB\BSON\Serializable
{
return array_values($this->elements);
}
} // => {"0": "foo", "1": "bar"} as a root class
["foo", "bar"] as a nested value
} // => {"0": "foo", "1": "bar"} en tant que classe racine
// ["foo", "bar"] en tant que valeur imbriquée
class ContainerClass2 implements MongoDB\BSON\Serializable
{
Expand Down
5 changes: 3 additions & 2 deletions reference/soap/soapclient/construct.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 497c40ac164d5873fd87f622dfdeb5206392b446 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes Maintainer: yannick -->
<refentry xml:id="soapclient.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -696,7 +696,8 @@ $client = new SoapClient("books.wsdl", array('typemap' => $typemap));
<title>Utilisant la fonctionnalité <constant>SOAP_SINGLE_ELEMENT_ARRAYS</constant></title>
<programlisting role="php">
<![CDATA[
/* Assuming a response like this, and an appropriate WSDL:
<?php
/* En supposant une réponse comme celle-ci, et un WSDL approprié:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:example">
<SOAP-ENV:Body>
Expand Down
4 changes: 2 additions & 2 deletions reference/sqlite3/sqlite3/setauthorizer.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 855bfee2f3db70d7dbb4c60c7c4a4efa567f1c60 Maintainer: Fan2Shrek Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="sqlite3.setauthorizer" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -188,7 +188,7 @@ $db->setAuthorizer(function (int $action, ...$args) use ($allowed_columns) {
if ($action === SQLite3::READ) {
list($table, $column) = $args;
if ($table === 'users' && in_array($column, $allowed_columns) {
if ($table === 'users' && in_array($column, $allowed_columns)) {
return SQLite3::OK;
}
Expand Down
4 changes: 2 additions & 2 deletions reference/yaf/yaf_router/addconfig.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 30c2d6226d1576647c91b36b912ac841abfcafab Maintainer: yannick Status: ready -->
<!-- EN-Revision: 22583751fbfdaa3eaa41aeb6470d1343f5cb2c78 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes Maintainer: yannick -->

<refentry xml:id="yaf-router.addconfig" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand Down Expand Up @@ -92,6 +91,7 @@ class Bootstrap extends Yaf_Bootstrap_Abstract{
*/
$router->addConfig(Yaf_Registry::get("config")->routes);
}
}
?>
]]>
</programlisting>
Expand Down
Loading

0 comments on commit ee8bd79

Please sign in to comment.