From be98d3d3a7fd04a3600aedfd61d4ec76b5905ce1 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Mon, 6 Jun 2022 12:43:10 +0300 Subject: [PATCH 01/16] Start PHP 8.2 Release page --- images/php8/logo_php8_2.svg | 32 +++ images/php8/php_8_2_released.png | Bin 0 -> 9886 bytes include/header.inc | 4 +- index.php | 2 +- releases/8.2/common.php | 74 +++++ releases/8.2/en.php | 5 + releases/8.2/index.php | 5 + releases/8.2/languages/en.php | 6 + releases/8.2/release.inc | 470 +++++++++++++++++++++++++++++++ styles/php8.css | 1 + 10 files changed, 596 insertions(+), 3 deletions(-) create mode 100644 images/php8/logo_php8_2.svg create mode 100644 images/php8/php_8_2_released.png create mode 100644 releases/8.2/common.php create mode 100644 releases/8.2/en.php create mode 100644 releases/8.2/index.php create mode 100644 releases/8.2/languages/en.php create mode 100644 releases/8.2/release.inc diff --git a/images/php8/logo_php8_2.svg b/images/php8/logo_php8_2.svg new file mode 100644 index 0000000000..5bfb8df725 --- /dev/null +++ b/images/php8/logo_php8_2.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/images/php8/php_8_2_released.png b/images/php8/php_8_2_released.png new file mode 100644 index 0000000000000000000000000000000000000000..357e322cb82f4daee6f0b171de58231c1a9c20a6 GIT binary patch literal 9886 zcmdUV^;gtiwDxC)p`{y?8X5`d?(U(b8|jh|1O}u#q|=dBQVGdHq)WP`k?xdw`QH0S zyz8D{PCV=EwfD34+3QramWCn@79|z{065A@a@qiZ`qV_Bg`hlD2@T_YPZh*oT3s3d zY7?>VEdN76UfPN>K-I|eou>}9mYS}-mPyj%<0Bp(Uhm+--ofd+&RY?G#1(fBab^Ye|mqxwjl}M2%v*aOeun=n+okh=YG5ZXPU-nN%{-~w#rb7QD zDJR(FnJZ>0YkR4kkX6gZ;UJ8cc7u4d|K18aPo+N8TE zuEW*ks8sizL}@Jl^(%wcd5-mX4O7j(-$XufX|K2@vYWjU9l&ldpZMm`OBqW%3q{o* z3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^QJT%GUlx(+0D=(?v} zfVls`N46_vzA)6SzMUpSz5*>S0cJtk5*==P4AE&xyF;2e2#2s*&-%kRE#PZ6u-`Jl zg0;pB6TDy72PYkJteA`LjBPQYqQtxlwxh3ktpj@QlmBFDk9esWuo<;&hUYhMp7);j z4E~}GH2*B2=TG;@o6svsxM!Hh)G_Mccx!7e_$q$)1t``J`I+W7KN;1tRL3(ty{KLo zjvap8GU)uWv^|Cyvt?M;+KqUT5ZPpgv*^{Z^?+-@&v7Oam6MBOL%9|CY~?f@wBNnd zW_z|#D2ONIjBCMn^EDwVASow8WUq{fR`Qkvw0MLy>*Oy6TVE_}BuwE)Kc@A67C(zc zdU!IEW43mi`1fV^K>(l_Z+@AIs)fewO6CpRjycKGa6T*aFQxyJyK-c1!~2sOSH^QJ zRKcn8L&L>tdcY1A1yb&rW(qglnh2Q{aP+e}JN(8e2FD2EzWfjFxc1rIa_A?4)F6`{ zfmCfcm++T}COgT(rhW&rrTW8NV+1q8tt8USTvM#PgqNQzwXv4~8TbY6+m;xqYfSFtr!_3ia6g{)5PTqaBBzEB!;+x{n3v=DyDBmMtaWMJD*| z4EooYv7H&;9Q3vnV|6l`T`&vj#GeM#n)!*V`qZ+&_&D9PMSmb3JbR1cnTj4CrN#2} z?02Q3=3y|OixjTQSG>EH3g)pz&3bJ~8C;q_7~!`Dpf(p%vMu-zdF|_R4*1$Ts?PYG z5AIaX^`!4hcCDVS-0T zKNjByY_7W5H}lJX1P-lfe!KRI@^hJPt2B56qK)qc&p@{q#Y;qNG#3ZHXBLtx#kX*p z*4V7oWXfoKWZ=bW>eT{|o7o-zRfi^10hMf3&_c=k`JJQG<3_hXVI39UnlpVzA`?@I k5dZi8KmE@>b4BtLk3pa*m0Mab;=ci9c@4QL8H>>W2dN&~{r~^~ literal 0 HcmV?d00001 diff --git a/include/header.inc b/include/header.inc index 3a099d7ba4..2aff9d8a78 100644 --- a/include/header.inc +++ b/include/header.inc @@ -105,8 +105,8 @@ if (!isset($config["languages"])) {
  • ">Get Involved
  • ">Help
  • "> - - php8.1 + + php8.2
  • diff --git a/index.php b/index.php index 437bd15949..c935b22344 100644 --- a/index.php +++ b/index.php @@ -95,7 +95,7 @@

    A popular general-purpose scripting language that is especially suited to web development.
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

    EOF; diff --git a/releases/8.2/common.php b/releases/8.2/common.php new file mode 100644 index 0000000000..b4211b6f97 --- /dev/null +++ b/releases/8.2/common.php @@ -0,0 +1,74 @@ + 'php8', + 'css' => ['php8.css'], + 'meta_tags' => << + + + + + + + + + + + + +META + ]); +} + +function language_chooser(string $currentLang): void { + $LANGUAGES = [ + 'en' => 'English', + ]; + + // Print out the form with all the options + echo ' +
    +
    + + +
    +
    +'; +} + +function message($code, $language = 'en') +{ + $original = require __DIR__ . '/languages/en.php'; + if (($language !== 'en') && file_exists(__DIR__ . '/languages/' . $language . '.php')) { + $translation = require __DIR__ . '/languages/' . $language . '.php'; + } + + return $translation[$code] ?? $original[$code] ?? $code; +} diff --git a/releases/8.2/en.php b/releases/8.2/en.php new file mode 100644 index 0000000000..aa9133cd7a --- /dev/null +++ b/releases/8.2/en.php @@ -0,0 +1,5 @@ + 'PHP 8.2 is a major update of the PHP language. Readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more', + 'documentation' => 'Doc', +]; diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc new file mode 100644 index 0000000000..bdc846ca38 --- /dev/null +++ b/releases/8.2/release.inc @@ -0,0 +1,470 @@ + +
    +
    +
    + +
    +
    +
    + +
    Released!
    +
    + PHP 8.2 is a major update of the PHP language.
    It + contains many new features, including readonly classes, null, false, and true as stand-alone types, + deprecated dynamic properties, performance improvements and more +
    + +
    +
    + +
    +
    +

    + Readonly classes + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + title = $title; + $this->status = $status; + } +} +PHP + + ); ?> +
    +
    +
    +
    +
    PHP 8.2
    +
    + title = $title; + $this->status = $status; + } +} +PHP + ); ?> +
    +
    +
    +
    + +
    +

    + Allow null, false, and true as stand-alone types + RFC + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + +
    +
    +
    +
    +
    PHP 8.2
    +
    + +
    +
    +
    +
    + +
    +

    + Disjunctive Normal Form Types + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + +
    +
    +
    +
    +
    PHP 8.2
    +
    + +
    +
    +
    +
    +
    + DNF types allow us to combine union + and intersection + types, following a strict rule: + when combining union and intersection types, intersection types must be grouped with brackets. +
    + +
    +

    + Deprecate dynamic properties + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + last_name = 'Doe'; +PHP + + ); ?> +
    +
    +
    +
    +
    PHP 8.2
    +
    + last_name = 'Doe'; // Deprecated notice +PHP + ); ?> +
    +
    +
    +
    +
    + You can use the #[AllowDynamicProperties] attribute on classes that should still allow those + properties. +
    + +
    +

    + Constants in traits + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + +
    +
    +
    +
    +
    PHP 8.2
    +
    + +
    +
    +
    +
    +
    + You cannot access the constant through the name of the trait, + but, you can access the constant through the class that uses the trait. +
    + +
    +

    + Deprecate ${} string interpolation + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + +
    +
    +
    +
    +
    PHP 8.2
    +
    + +
    +
    +
    +
    + +
    +

    + New Random extension + RFC + RFC +

    +
    +
    +
    PHP < 8.2
    +
    + +
    +
    +
    +
    +
    PHP 8.2
    +
    + pickArrayKeys($array, 1)[0]; // (int) 0 + // or: [$single] = $randomizer->pickArrayKeys($array, 1); +$multiple = $randomizer->pickArrayKeys($array, 2); // (array) [1, 2] +PHP + ); ?> +
    +
    +
    +
    +
    +

    The new random extension organizes and consolidates the existing PHP functionality + related to random number generation.

    +

    One of the most important new additions with the new random extension + is the Random\Randomizer class. It is meant to provide an object-oriented API + to access all Random Number generation functionality with a choice of Pseudo Random Number Generator + algorithm, which can be swapped out with a new implementation.

    +
    +
    + +
    +
    +

    Performance Improvements

    + +
    + +
    +

    New Classes, Interfaces, and Functions

    +
    +
      +
    • New mysqli_execute_query function and mysqli::execute_query method. +
    • +
    • New #[AllowDynamicProperties] and #[\SensitiveParameter] attributes. +
    • +
    • New curl_upkeep function.
    • +
    • New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError + methods. +
    • +
    • New memory_reset_peak_usage function.
    • +
    • New sodium_crypto_stream_xchacha20_xor_ic function.
    • +
    +
    +

    + Deprecations and backward compatibility breaks +

    +
    +
      +
    • Deprecated utf8_encode and utf8_decode functions.
    • +
    • Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable + has a tentative return type of static. +
    • +
    • Extensions ODBC and PDO_ODBC escapes the username and password.
    • +
    • Functions strtolower and strtoupper are locale-sensitive.
    • +
    • Methods SplFileInfo::_bad_state_ex, SplFileObject::getCsvControl, + SplFileObject::fflush, + SplFileObject::ftell, SplFileObject::fgetc,and SplFileObject::fpassthru + enforces their signature. +
    • +
    • Method SplFileObject::hasChildren has a tentative return type of false. +
    • +
    • Method SplFileObject::getChildren has a tentative return type of null. +
    • +
    +
    +
    +
    + + + + Date: Thu, 8 Sep 2022 10:41:58 +0300 Subject: [PATCH 02/16] Update Deprecate dynamic properties message Co-authored-by: Roman Pronskiy --- releases/8.2/release.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index bdc846ca38..5daad4ca2c 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -216,6 +216,9 @@ class User $user = new User(); $user->last_name = 'Doe'; + +$user = new stdClass(); +$user->last_name = 'Doe'; PHP ); ?> @@ -234,6 +237,9 @@ class User $user = new User(); $user->last_name = 'Doe'; // Deprecated notice + +$user = new stdClass(); +$user->last_name = 'Doe'; // Still allowed PHP ); ?> @@ -242,7 +248,7 @@ PHP
    You can use the #[AllowDynamicProperties] attribute on classes that should still allow those - properties. + properties. stdClass and __get/__set are not affected.
    From aa9db7491422bebc2b8c202bb8e3eb39e4bd39af Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 11 Sep 2022 11:17:11 +0300 Subject: [PATCH 03/16] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.2/release.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 5daad4ca2c..ee0e716926 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -142,7 +142,7 @@ PHP

    - Disjunctive Normal Form Types + Disjunctive Normal Form (DNF) Types RFC

    @@ -176,7 +176,7 @@ PHP
  • New mysqli_execute_query function and mysqli::execute_query method.
  • -
  • New #[AllowDynamicProperties] and #[\SensitiveParameter] attributes. +
  • New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes.
  • New curl_upkeep function.
  • New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError From 2b60f876a103118788d107e7771abed1509783d9 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 8 Sep 2022 14:27:22 +0300 Subject: [PATCH 04/16] Apply suggestions from code review, Add new items to New Functions section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.2/release.inc | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index ee0e716926..34453873f2 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -247,8 +247,10 @@ PHP
  • - You can use the #[AllowDynamicProperties] attribute on classes that should still allow those - properties. stdClass and __get/__set are not affected. +

    The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts + in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic + properties.

    +

    Usage of the __get/__set magic methods is not affected by this change.

    @@ -353,7 +355,7 @@ PHP

    - New Random extension + New "Random" extension RFC RFC

    @@ -384,7 +386,8 @@ $array = ['foo', 'bar', 'baz']; $engine = new Random\Engine\Mt19937(1234, MT_RAND_PHP); $randomizer = new Random\Randomizer($engine); $single = $randomizer->pickArrayKeys($array, 1)[0]; // (int) 0 - // or: [$single] = $randomizer->pickArrayKeys($array, 1); + +// or: [$single] = $randomizer->pickArrayKeys($array, 1); $multiple = $randomizer->pickArrayKeys($array, 2); // (array) [1, 2] PHP ); ?> @@ -393,12 +396,12 @@ PHP
    -

    The new random extension organizes and consolidates the existing PHP functionality - related to random number generation.

    -

    One of the most important new additions with the new random extension - is the Random\Randomizer class. It is meant to provide an object-oriented API - to access all Random Number generation functionality with a choice of Pseudo Random Number Generator - algorithm, which can be swapped out with a new implementation.

    +

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying + on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the + object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that + store their state within objects to allow for multiple independent seedable sequences.

    +

    The \Random\Randomizer class provides a high level interface to use the engine's randomness + to generate a random integer, to shuffle an array or string, to select random array keys and more.

    @@ -416,12 +419,16 @@ PHP
  • New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes.
  • -
  • New curl_upkeep function.
  • New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError methods.
  • -
  • New memory_reset_peak_usage function.
  • -
  • New sodium_crypto_stream_xchacha20_xor_ic function.
  • +
  • New ReflectionFunction::isAnonymous and ReflectionMethod::hasPrototype + methods. +
  • +
  • New curl_upkeep, memory_reset_peak_usage, + ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, + openssl_cipher_key_length functions. +
  • @@ -435,7 +442,7 @@ PHP
  • Extensions ODBC and PDO_ODBC escapes the username and password.
  • Functions strtolower and strtoupper are locale-sensitive.
  • -
  • Methods SplFileInfo::_bad_state_ex, SplFileObject::getCsvControl, +
  • Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc,and SplFileObject::fpassthru enforces their signature. @@ -444,6 +451,7 @@ PHP
  • Method SplFileObject::getChildren has a tentative return type of null.
  • +
  • The internal method SplFileInfo::_bad_state_ex has been deprecated.
  • From ee48ca407ab75b814a041d9b2ac7c66481f77949 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 30 Sep 2022 12:30:05 +0300 Subject: [PATCH 05/16] Add Doc links --- releases/8.2/release.inc | 49 ++++++++++++++++++++++------------------ styles/php8.css | 5 ++++ 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 34453873f2..013a32d412 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -45,6 +45,7 @@ common_header(message('common_header', $lang));

    Readonly classes RFC + Doc

    @@ -144,6 +145,7 @@ PHP

    Disjunctive Normal Form (DNF) Types RFC + Doc

    @@ -202,6 +204,7 @@ PHP

    Deprecate dynamic properties RFC + Doc

    @@ -257,6 +260,7 @@ PHP

    Constants in traits RFC + Doc

    @@ -320,6 +324,7 @@ PHP

    Deprecate ${} string interpolation RFC + Doc

    @@ -358,37 +363,37 @@ PHP New "Random" extension RFC RFC + Doc

    -
    -
    PHP < 8.2
    +
    +
    PHP 8.2
    jump(); // Moves the blueprint ahead 2**128 steps, giving the Fiber 2**128 unique values without needing to reseed. - ); ?> -
    -
    -
    -
    -
    PHP 8.2
    -
    - getInt(0, 100), PHP_EOL; + }); +} -$engine = new Random\Engine\Mt19937(1234, MT_RAND_PHP); -$randomizer = new Random\Randomizer($engine); -$single = $randomizer->pickArrayKeys($array, 1)[0]; // (int) 0 +// The randomizer will use a CSPRNG by default. +$randomizer = new \Random\Randomizer(); -// or: [$single] = $randomizer->pickArrayKeys($array, 1); -$multiple = $randomizer->pickArrayKeys($array, 2); // (array) [1, 2] +// Even though the fibers execute in a random order, they will print the same value +// each time, because each has its own unique instance of the RNG. +$fibers = $randomizer->shuffleArray($fibers); +foreach ($fibers as $fiber) { + $fiber->start(); +} PHP ); ?>
    diff --git a/styles/php8.css b/styles/php8.css index d8282fe0bc..e10d230bf5 100644 --- a/styles/php8.css +++ b/styles/php8.css @@ -436,3 +436,8 @@ color: rgba(39, 40, 44, 0.7); line-height: 1.33; } + +.example-contents-full { + width: 100%; + position: relative; +} From 88b3e010d1cf16489966355c8047f70794a60550 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 4 Oct 2022 16:05:30 +0300 Subject: [PATCH 06/16] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.2/release.inc | 229 +++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 130 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 013a32d412..93aa2067cc 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -45,7 +45,8 @@ common_header(message('common_header', $lang));

    Readonly classes RFC - Doc + Doc

    @@ -96,56 +97,11 @@ PHP
    -

    - Allow null, false, and true as stand-alone types - RFC - RFC -

    -
    -
    -
    PHP < 8.2
    -
    - -
    -
    -
    -
    -
    PHP 8.2
    -
    - -
    -
    -
    -
    - -
    -

    +

    Disjunctive Normal Form (DNF) Types RFC - Doc + Doc

    @@ -201,10 +157,10 @@ PHP
    -

    - Deprecate dynamic properties - RFC - Doc +

    + Allow null, false, and true as stand-alone types + RFC + RFC

    @@ -212,16 +168,14 @@ PHP
    last_name = 'Doe'; + public function almostTrue(): string|bool { /* ... */ *} -$user = new stdClass(); -$user->last_name = 'Doe'; + public function almostNull(): string|null { /* ... */ *} +} PHP ); ?> @@ -233,16 +187,58 @@ PHP
    +
    +
    +
    +
    -$user = new User(); -$user->last_name = 'Doe'; // Deprecated notice +
    +

    + New "Random" extension + RFC + RFC + Doc +

    +
    +
    +
    PHP 8.2
    +
    + last_name = 'Doe'; // Still allowed +$fibers = []; +for ($i = 0; $i < 8; $i++) { + $fiberRng = clone $blueprintRng; + $blueprintRng->jump(); // Moves the blueprint ahead 2**128 steps, giving the Fiber 2**128 unique values without needing to reseed. + + $fibers[] = new Fiber(function () use ($fiberRng, $i): void { + $randomizer = new \Random\Randomizer($fiberRng); + + echo "$i: " . $randomizer->getInt(0, 100), PHP_EOL; + }); +} + +// The randomizer will use a CSPRNG by default. +$randomizer = new \Random\Randomizer(); + +// Even though the fibers execute in a random order, they will print the same value +// each time, because each has its own unique instance of the RNG. +$fibers = $randomizer->shuffleArray($fibers); +foreach ($fibers as $fiber) { + $fiber->start(); +} PHP ); ?>
    @@ -250,17 +246,20 @@ PHP
    -

    The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts - in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic - properties.

    -

    Usage of the __get/__set magic methods is not affected by this change.

    +

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying + on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the + object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that + store their state within objects to allow for multiple independent seedable sequences.

    +

    The \Random\Randomizer class provides a high level interface to use the engine's randomness + to generate a random integer, to shuffle an array or string, to select random array keys and more.

    -

    +

    Constants in traits RFC - Doc + Doc

    @@ -321,10 +320,11 @@ PHP
    -

    - Deprecate ${} string interpolation - RFC - Doc +

    + Deprecate dynamic properties + RFC + Doc

    @@ -332,10 +332,16 @@ PHP
    last_name = 'Doe'; + +$user = new stdClass(); +$user->last_name = 'Doe'; PHP ); ?> @@ -347,53 +353,16 @@ PHP
    -
    -
    -
    -
    - -
    -

    - New "Random" extension - RFC - RFC - Doc -

    -
    -
    -
    PHP 8.2
    -
    - jump(); // Moves the blueprint ahead 2**128 steps, giving the Fiber 2**128 unique values without needing to reseed. - - $fibers[] = new Fiber(function () use ($fiberRng, $i): void { - $randomizer = new \Random\Randomizer($fiberRng); - - echo "$i: " . $randomizer->getInt(0, 100), PHP_EOL; - }); +class User +{ + public $name; } -// The randomizer will use a CSPRNG by default. -$randomizer = new \Random\Randomizer(); +$user = new User(); +$user->last_name = 'Doe'; // Deprecated notice -// Even though the fibers execute in a random order, they will print the same value -// each time, because each has its own unique instance of the RNG. -$fibers = $randomizer->shuffleArray($fibers); -foreach ($fibers as $fiber) { - $fiber->start(); -} +$user = new stdClass(); +$user->last_name = 'Doe'; // Still allowed PHP ); ?>
    @@ -401,13 +370,12 @@ PHP
    -

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying - on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the - object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that - store their state within objects to allow for multiple independent seedable sequences.

    -

    The \Random\Randomizer class provides a high level interface to use the engine's randomness - to generate a random integer, to shuffle an array or string, to select random array keys and more.

    +

    The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts + in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic + properties.

    +

    Usage of the __get/__set magic methods is not affected by this change.

    +
    @@ -441,6 +409,7 @@ PHP
      +
    • Deprecated ${} string interpolation.
    • Deprecated utf8_encode and utf8_decode functions.
    • Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable has a tentative return type of static. From c640cae5f98ececcd0f44a4223cf5820cbc1964a Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 23 Oct 2022 14:57:53 +0300 Subject: [PATCH 07/16] Put messages in lang-files --- releases/8.2/languages/en.php | 33 ++++++++ releases/8.2/release.inc | 143 +++++++++++++--------------------- 2 files changed, 87 insertions(+), 89 deletions(-) diff --git a/releases/8.2/languages/en.php b/releases/8.2/languages/en.php index 228da5065a..0a10993962 100644 --- a/releases/8.2/languages/en.php +++ b/releases/8.2/languages/en.php @@ -3,4 +3,37 @@ return [ 'common_header' => 'PHP 8.2 is a major update of the PHP language. Readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more', 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.2 is a major update of the PHP language.
      It contains many new features, including readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more.', + 'upgrade_now' => 'Upgrade to PHP 8.2 now!', + 'readonly_classes_title' => 'Readonly classes', + 'dnf_types_title' => 'Disjunctive Normal Form (DNF) Types', + 'dnf_types_description' => 'DNF types allow us to combine union and intersection types, following a strict rule: when combining union and intersection types, intersection types must be grouped with brackets.', + 'random_title' => 'New "Random" extension', + 'random_description' => '

      The "random" extension provides a new object-oriented API to random number generation. Instead of relying on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that store their state within objects to allow for multiple independent seedable sequences.

      +

      The \Random\Randomizer class provides a high level interface to use the engine\'s randomness to generate a random integer, to shuffle an array or string, to select random array keys and more.

      ', + 'constants_in_traits_title' => 'Constants in traits', + 'constants_in_traits_description' => 'You cannot access the constant through the name of the trait, but, you can access the constant through the class that uses the trait.', + 'deprecate_dynamic_properties_title' => 'Deprecate dynamic properties', + 'deprecate_dynamic_properties_description' => '

      The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic properties.

      +

      Usage of the __get/__set magic methods is not affected by this change.

      ', + 'new_classes_title' => 'New Classes, Interfaces, and Functions', + 'new_mysqli' => 'New mysqli_execute_query function and mysqli::execute_query method.', + 'new_attributes' => 'New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes.', + 'new_zip' => 'New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError methods.', + 'new_reflection' => 'New ReflectionFunction::isAnonymous and ReflectionMethod::hasPrototype methods.', + 'new_functions' => 'New curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length functions.', + 'bc_title' => 'Deprecations and backward compatibility breaks', + 'bc_string_interpolation' => 'Deprecated ${} string interpolation.', + 'bc_utf8' => 'Deprecated utf8_encode and utf8_decode functions.', + 'bc_datetime' => 'Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable has a tentative return type of static.', + 'bc_odbc' => 'Extensions ODBC and PDO_ODBC escapes the username and password.', + 'bc_str_locale_sensitive' => 'Functions strtolower and strtoupper are locale-sensitive.', + 'bc_spl_enforces_signature' => 'Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc,and SplFileObject::fpassthru enforces their signature.', + 'bc_spl_false' => 'Method SplFileObject::hasChildren has a tentative return type of false.', + 'bc_spl_null' => 'Method SplFileObject::getChildren has a tentative return type of null.', + 'bc_spl_deprecated' => 'The internal method SplFileInfo::_bad_state_ex has been deprecated.', + 'footer_title' => 'Better performance, better syntax, improved type safety.', + 'footer_description' => '

      For source downloads of PHP 8.2 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.

      +

      The migration guide is available in the PHP Manual. Please consult it for a detailed list of new features and backward-incompatible changes.

      ', ]; diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 93aa2067cc..59bf90f105 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -28,14 +28,10 @@ common_header(message('common_header', $lang)); -
      Released!
      -
      - PHP 8.2 is a major update of the PHP language.
      It - contains many new features, including readonly classes, null, false, and true as stand-alone types, - deprecated dynamic properties, performance improvements and more -
      +
      +
    @@ -43,10 +39,13 @@ common_header(message('common_header', $lang));

    - Readonly classes + RFC Doc + href="https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.readonly-classes">

    @@ -98,10 +97,13 @@ PHP

    - Disjunctive Normal Form (DNF) Types + RFC Doc + href="https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.type-system">

    @@ -149,11 +151,7 @@ PHP
    - DNF types allow us to combine union - and intersection - types, following a strict rule: - when combining union and intersection types, intersection types must be grouped with brackets. +
    @@ -204,11 +202,14 @@ PHP

    - New "Random" extension + RFC RFC Doc + href="https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.random">

    @@ -246,20 +247,18 @@ PHP
    -

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying - on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the - object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that - store their state within objects to allow for multiple independent seedable sequences.

    -

    The \Random\Randomizer class provides a high level interface to use the engine's randomness - to generate a random integer, to shuffle an array or string, to select random array keys and more.

    +

    - Constants in traits + RFC Doc + href="https://www.php.net/manual/en/migration82.new-features.php#migration82.new-features.core.constant-in-traits">

    @@ -315,16 +314,18 @@ PHP
    - You cannot access the constant through the name of the trait, - but, you can access the constant through the class that uses the trait. +

    - Deprecate dynamic properties + RFC Doc + href="https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.dynamic-properties">

    @@ -370,62 +371,38 @@ PHP
    -

    The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts - in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic - properties.

    -

    Usage of the __get/__set magic methods is not affected by this change.

    +
    -

    Performance Improvements

    - -
    - -
    -

    New Classes, Interfaces, and Functions

    +

      -
    • New mysqli_execute_query function and mysqli::execute_query method. -
    • -
    • New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes. -
    • -
    • New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError - methods. -
    • -
    • New ReflectionFunction::isAnonymous and ReflectionMethod::hasPrototype - methods. -
    • -
    • New curl_upkeep, memory_reset_peak_usage, - ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, - openssl_cipher_key_length functions. -
    • +
    • +
    • +
    • +
    • +
    -

    - Deprecations and backward compatibility breaks -

    +
    + +
    +

      -
    • Deprecated ${} string interpolation.
    • -
    • Deprecated utf8_encode and utf8_decode functions.
    • -
    • Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable - has a tentative return type of static. -
    • -
    • Extensions ODBC and PDO_ODBC escapes the username and password.
    • -
    • Functions strtolower and strtoupper are locale-sensitive.
    • -
    • Methods SplFileObject::getCsvControl, - SplFileObject::fflush, - SplFileObject::ftell, SplFileObject::fgetc,and SplFileObject::fpassthru - enforces their signature. -
    • -
    • Method SplFileObject::hasChildren has a tentative return type of false. -
    • -
    • Method SplFileObject::getChildren has a tentative return type of null. -
    • -
    • The internal method SplFileInfo::_bad_state_ex has been deprecated.
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    @@ -433,23 +410,11 @@ PHP From b26652d118fb8741cb4d82af827a18396f51979b Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 28 Oct 2022 15:55:30 +0300 Subject: [PATCH 08/16] Fixes, add Russian language --- releases/8.2/common.php | 1 + releases/8.2/languages/en.php | 1 + releases/8.2/languages/ru.php | 40 +++++++++++++++++++++++++++++++++++ releases/8.2/release.inc | 2 +- releases/8.2/ru.php | 5 +++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 releases/8.2/languages/ru.php create mode 100644 releases/8.2/ru.php diff --git a/releases/8.2/common.php b/releases/8.2/common.php index b4211b6f97..966ca97d04 100644 --- a/releases/8.2/common.php +++ b/releases/8.2/common.php @@ -41,6 +41,7 @@ function common_header(string $description): void { function language_chooser(string $currentLang): void { $LANGUAGES = [ 'en' => 'English', + 'ru' => 'Russian', ]; // Print out the form with all the options diff --git a/releases/8.2/languages/en.php b/releases/8.2/languages/en.php index 0a10993962..9b512d77f3 100644 --- a/releases/8.2/languages/en.php +++ b/releases/8.2/languages/en.php @@ -9,6 +9,7 @@ 'readonly_classes_title' => 'Readonly classes', 'dnf_types_title' => 'Disjunctive Normal Form (DNF) Types', 'dnf_types_description' => 'DNF types allow us to combine union and intersection types, following a strict rule: when combining union and intersection types, intersection types must be grouped with brackets.', + 'null_false_true_types_title' => 'Allow null, false, and true as stand-alone types', 'random_title' => 'New "Random" extension', 'random_description' => '

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that store their state within objects to allow for multiple independent seedable sequences.

    The \Random\Randomizer class provides a high level interface to use the engine\'s randomness to generate a random integer, to shuffle an array or string, to select random array keys and more.

    ', diff --git a/releases/8.2/languages/ru.php b/releases/8.2/languages/ru.php new file mode 100644 index 0000000000..a3dea1fb22 --- /dev/null +++ b/releases/8.2/languages/ru.php @@ -0,0 +1,40 @@ + 'PHP 8.2 — большое обновление языка PHP. Readonly-классы, самостоятельные типы null, false и true, устаревшие динамические свойства, улучшение производительности и многое другое.', + 'documentation' => 'Документация', + 'main_title' => 'выпущен!', + 'main_subtitle' => 'PHP 8.2 — большое обновление языка PHP.
    Оно содержит множество новых возможностей, включая readonly-классы, самостоятельные типы null, false и true, устаревшие динамические свойства, улучшение производительности и многое другое.', + 'upgrade_now' => 'Переходите на PHP 8.2!', + 'readonly_classes_title' => 'Readonly-классы', + 'dnf_types_title' => 'Типы дизъюнктивной нормальной формы (DNF)', + 'dnf_types_description' => 'Типы DNF позволяют объединять типы union и intersection, следуя строгому правилу: при объединении типов union и intersection, типы intersection должны быть сгруппированы скобками.', + 'null_false_true_types_title' => 'Самостоятельные типы null, false и true', + 'random_title' => 'Новый модуль "Random"', + 'random_description' => '

    Модуль "random" предоставляет новый объектно-ориентированный API для генерации случайных чисел. Вместо того чтобы полагаться на глобальный генератор случайных чисел (RNG), использующий алгоритм Mersenne Twister, объектно-ориентированный API предоставляет несколько классов ("Движков"), обеспечивающих доступ к современным алгоритмам, которые хранят свое состояние в объектах, что позволяет создавать несколько независимых последовательностей.

    +

    Класс \Random\Randomizer предоставляет высокоуровневый интерфейс для использования случайности движка для генерации случайного целого числа, перемешивания массива или строки, выбора случайных ключей массива и многого другого.

    ', + 'constants_in_traits_title' => 'Констаны в трейтах', + 'constants_in_traits_description' => 'Нельзя получить доступ к константе через имя трейта, но можно через класс, который использует этот трейт.', + 'deprecate_dynamic_properties_title' => 'Динамические свойства устарели', + 'deprecate_dynamic_properties_description' => '

    Создание динамических свойств устарело, чтобы помочь избежать ошибок и опечаток, если только класс не разрешит это с помощью атрибута #[\AllowDynamicProperties]. stdClass разрешает динамические свойства.

    +

    Это изменение не влияет на использование магических методов __get/__set.

    ', + 'new_classes_title' => 'Новые классы, интерфейсы и функции', + 'new_mysqli' => 'Новая функция mysqli_execute_query и метод mysqli::execute_query.', + 'new_attributes' => 'Новые атрибуты #[\AllowDynamicProperties] и #[\SensitiveParameter].', + 'new_zip' => 'Новые методы ZipArchive::getStreamIndex, ZipArchive::getStreamName и ZipArchive::clearError.', + 'new_reflection' => 'Новые методы ReflectionFunction::isAnonymous и ReflectionMethod::hasPrototype.', + 'new_functions' => 'Новые функции curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length.', + 'bc_title' => 'Устаревшая функциональность и изменения в обратной совместимости', + 'bc_string_interpolation' => 'Устарела интерполяция строк ${}.', + 'bc_utf8' => 'Устарели функции utf8_encode и utf8_decode.', + 'bc_datetime' => 'У методов DateTime::createFromImmutable и DateTimeImmutable::createFromMutable предварительный тип возвращаемого значения static.', + 'bc_odbc' => 'Модули ODBC и PDO_ODBC экранирует имя пользователя и пароль.', + 'bc_str_locale_sensitive' => 'Функции strtolower и strtoupper чувствительны к местным условиям.', + 'bc_spl_enforces_signature' => 'Методы SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc и SplFileObject::fpassthru усиливают свою сигнатуру.', + 'bc_spl_false' => 'У метода SplFileObject::hasChildren предварительный тип возвращаемого значения false.', + 'bc_spl_null' => 'У метода SplFileObject::getChildren предварительный тип возвращаемого значения null.', + 'bc_spl_deprecated' => 'Устарел внутренний метод SplFileInfo::_bad_state_ex.', + 'footer_title' => 'Выше производительность, лучше синтаксис, надёжнее система типов.', + 'footer_description' => '

    Для загрузки исходного кода PHP 8.2 посетите страницу Downloads. Бинарные файлы Windows находятся на сайте PHP for Windows. Список изменений перечислен на странице ChangeLog.

    +

    Руководство по миграции доступно в разделе документации.Ознакомьтесь с ним, чтобы узнать обо всех новых возможностях и изменений, затрагивающих обратную совместимость.

    ', +]; diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 59bf90f105..33f628caad 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -156,7 +156,7 @@ PHP

    - Allow null, false, and true as stand-alone types + RFC RFC

    diff --git a/releases/8.2/ru.php b/releases/8.2/ru.php new file mode 100644 index 0000000000..4aefaf9a8c --- /dev/null +++ b/releases/8.2/ru.php @@ -0,0 +1,5 @@ + Date: Fri, 28 Oct 2022 22:10:09 +0300 Subject: [PATCH 09/16] Apply suggestions from code review Co-authored-by: Alexey Pyltsyn --- releases/8.2/languages/ru.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/releases/8.2/languages/ru.php b/releases/8.2/languages/ru.php index a3dea1fb22..8ac4ff21f4 100644 --- a/releases/8.2/languages/ru.php +++ b/releases/8.2/languages/ru.php @@ -8,15 +8,15 @@ 'upgrade_now' => 'Переходите на PHP 8.2!', 'readonly_classes_title' => 'Readonly-классы', 'dnf_types_title' => 'Типы дизъюнктивной нормальной формы (DNF)', - 'dnf_types_description' => 'Типы DNF позволяют объединять типы union и intersection, следуя строгому правилу: при объединении типов union и intersection, типы intersection должны быть сгруппированы скобками.', + 'dnf_types_description' => 'ДНФ позволяет совместить объединение и пересечение типов, при этом обязательно типы пересечения следует сгруппировать скобками.', 'null_false_true_types_title' => 'Самостоятельные типы null, false и true', 'random_title' => 'Новый модуль "Random"', - 'random_description' => '

    Модуль "random" предоставляет новый объектно-ориентированный API для генерации случайных чисел. Вместо того чтобы полагаться на глобальный генератор случайных чисел (RNG), использующий алгоритм Mersenne Twister, объектно-ориентированный API предоставляет несколько классов ("Движков"), обеспечивающих доступ к современным алгоритмам, которые хранят свое состояние в объектах, что позволяет создавать несколько независимых последовательностей.

    -

    Класс \Random\Randomizer предоставляет высокоуровневый интерфейс для использования случайности движка для генерации случайного целого числа, перемешивания массива или строки, выбора случайных ключей массива и многого другого.

    ', - 'constants_in_traits_title' => 'Констаны в трейтах', + 'random_description' => '

    Модуль "random" предлагает новый объектно-ориентированный API для генерации случайных чисел. Вместо использования глобального генератора случайных чисел (ГСЧ) на базе алгоритма вихря Мерсенна, в объектно-ориентированном API доступно несколько ГСЧ, представленных отдельными классами (как реализации интерфейса Engine), которые хранят внутреннее состояние, позволяя создавать несколько независимых последовательностей случайных чисел.

    +

    Класс \Random\Randomizer представляет высокоуровневый интерфейс по использованию движков для генерации случайного целого числа, перемешивания массива или строки, выбора случайных ключей массива и многое другое.

    ', + 'constants_in_traits_title' => 'Константы в трейтах', 'constants_in_traits_description' => 'Нельзя получить доступ к константе через имя трейта, но можно через класс, который использует этот трейт.', - 'deprecate_dynamic_properties_title' => 'Динамические свойства устарели', - 'deprecate_dynamic_properties_description' => '

    Создание динамических свойств устарело, чтобы помочь избежать ошибок и опечаток, если только класс не разрешит это с помощью атрибута #[\AllowDynamicProperties]. stdClass разрешает динамические свойства.

    + 'deprecate_dynamic_properties_title' => 'Динамические свойства объявлены устаревшими', + 'deprecate_dynamic_properties_description' => '

    Чтобы помочь избежать ошибок и опечаток, больше не рекомендуется определять динамические свойства, только если сам класс явно не разрешит это при помощи атрибута #[\AllowDynamicProperties]. В экземплярах stdClass по-прежнему можно использовать динамические свойства.

    Это изменение не влияет на использование магических методов __get/__set.

    ', 'new_classes_title' => 'Новые классы, интерфейсы и функции', 'new_mysqli' => 'Новая функция mysqli_execute_query и метод mysqli::execute_query.', @@ -25,16 +25,16 @@ 'new_reflection' => 'Новые методы ReflectionFunction::isAnonymous и ReflectionMethod::hasPrototype.', 'new_functions' => 'Новые функции curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length.', 'bc_title' => 'Устаревшая функциональность и изменения в обратной совместимости', - 'bc_string_interpolation' => 'Устарела интерполяция строк ${}.', - 'bc_utf8' => 'Устарели функции utf8_encode и utf8_decode.', - 'bc_datetime' => 'У методов DateTime::createFromImmutable и DateTimeImmutable::createFromMutable предварительный тип возвращаемого значения static.', + 'bc_string_interpolation' => 'Интерполяции строк вида ${} следует избегать.', + 'bc_utf8' => 'Не рекомендуется использовать функции utf8_encode и utf8_decode.', + 'bc_datetime' => 'У методов DateTime::createFromImmutable и DateTimeImmutable::createFromMutable задан предварительный тип возвращаемого значения static.', 'bc_odbc' => 'Модули ODBC и PDO_ODBC экранирует имя пользователя и пароль.', - 'bc_str_locale_sensitive' => 'Функции strtolower и strtoupper чувствительны к местным условиям.', + 'bc_str_locale_sensitive' => 'При работе функции strtolower и strtoupper теперь не учитывают локаль.', 'bc_spl_enforces_signature' => 'Методы SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc и SplFileObject::fpassthru усиливают свою сигнатуру.', - 'bc_spl_false' => 'У метода SplFileObject::hasChildren предварительный тип возвращаемого значения false.', - 'bc_spl_null' => 'У метода SplFileObject::getChildren предварительный тип возвращаемого значения null.', - 'bc_spl_deprecated' => 'Устарел внутренний метод SplFileInfo::_bad_state_ex.', + 'bc_spl_false' => 'У метода SplFileObject::hasChildren предварительный тип возвращаемого значения задан как false.', + 'bc_spl_null' => 'У метода SplFileObject::getChildren предварительный тип возвращаемого значения задан как null.', + 'bc_spl_deprecated' => 'Внутренний метод SplFileInfo::_bad_state_ex объявлен устаревшим.', 'footer_title' => 'Выше производительность, лучше синтаксис, надёжнее система типов.', 'footer_description' => '

    Для загрузки исходного кода PHP 8.2 посетите страницу Downloads. Бинарные файлы Windows находятся на сайте PHP for Windows. Список изменений перечислен на странице ChangeLog.

    -

    Руководство по миграции доступно в разделе документации.Ознакомьтесь с ним, чтобы узнать обо всех новых возможностях и изменений, затрагивающих обратную совместимость.

    ', +

    Руководство по миграции доступно в разделе документации. Ознакомьтесь с ним, чтобы узнать обо всех новых возможностях и изменениях, затрагивающих обратную совместимость.

    ', ]; From 14fdf4b884c8323f1f255f5613fe144c409ef2fa Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 28 Oct 2022 22:13:49 +0300 Subject: [PATCH 10/16] Apply suggestions from code review Co-authored-by: Alexey Pyltsyn --- releases/8.2/languages/en.php | 4 ++-- releases/8.2/languages/ru.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/8.2/languages/en.php b/releases/8.2/languages/en.php index 9b512d77f3..9ffd42c19f 100644 --- a/releases/8.2/languages/en.php +++ b/releases/8.2/languages/en.php @@ -29,8 +29,8 @@ 'bc_utf8' => 'Deprecated utf8_encode and utf8_decode functions.', 'bc_datetime' => 'Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable has a tentative return type of static.', 'bc_odbc' => 'Extensions ODBC and PDO_ODBC escapes the username and password.', - 'bc_str_locale_sensitive' => 'Functions strtolower and strtoupper are locale-sensitive.', - 'bc_spl_enforces_signature' => 'Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc,and SplFileObject::fpassthru enforces their signature.', + 'bc_str_locale_sensitive' => 'Functions strtolower and strtoupper are no longer locale-sensitive.', + 'bc_spl_enforces_signature' => 'Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc, and SplFileObject::fpassthru enforces their signature.', 'bc_spl_false' => 'Method SplFileObject::hasChildren has a tentative return type of false.', 'bc_spl_null' => 'Method SplFileObject::getChildren has a tentative return type of null.', 'bc_spl_deprecated' => 'The internal method SplFileInfo::_bad_state_ex has been deprecated.', diff --git a/releases/8.2/languages/ru.php b/releases/8.2/languages/ru.php index 8ac4ff21f4..475cf39c8e 100644 --- a/releases/8.2/languages/ru.php +++ b/releases/8.2/languages/ru.php @@ -7,7 +7,7 @@ 'main_subtitle' => 'PHP 8.2 — большое обновление языка PHP.
    Оно содержит множество новых возможностей, включая readonly-классы, самостоятельные типы null, false и true, устаревшие динамические свойства, улучшение производительности и многое другое.', 'upgrade_now' => 'Переходите на PHP 8.2!', 'readonly_classes_title' => 'Readonly-классы', - 'dnf_types_title' => 'Типы дизъюнктивной нормальной формы (DNF)', + 'dnf_types_title' => 'Типы в виде дизъюнктивной нормальной формы (ДНФ)', 'dnf_types_description' => 'ДНФ позволяет совместить объединение и пересечение типов, при этом обязательно типы пересечения следует сгруппировать скобками.', 'null_false_true_types_title' => 'Самостоятельные типы null, false и true', 'random_title' => 'Новый модуль "Random"', From e3b49c77964869b2ee5668f2f290f295e19eccc0 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 28 Oct 2022 22:22:21 +0300 Subject: [PATCH 11/16] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.2/release.inc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 33f628caad..3e74b83290 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -217,22 +217,29 @@ PHP
    jump(); // Moves the blueprint ahead 2**128 steps, giving the Fiber 2**128 unique values without needing to reseed. + // Xoshiro256**'s 'jump()' method moves the blueprint ahead 2**128 steps, as if calling 'generate()' 2**128 times, + // giving the Fiber 2**128 unique values without needing to reseed. + $blueprintRng->jump(); $fibers[] = new Fiber(function () use ($fiberRng, $i): void { - $randomizer = new \Random\Randomizer($fiberRng); + $randomizer = new Randomizer($fiberRng); - echo "$i: " . $randomizer->getInt(0, 100), PHP_EOL; + echo "{$i}: " . $randomizer->getInt(0, 100), PHP_EOL; }); } // The randomizer will use a CSPRNG by default. -$randomizer = new \Random\Randomizer(); +$randomizer = new Randomizer(); // Even though the fibers execute in a random order, they will print the same value // each time, because each has its own unique instance of the RNG. From 0b566e25d282adb8048711dfec16584b898f21c3 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 7 Dec 2022 02:56:34 +0300 Subject: [PATCH 12/16] Update releases/8.2/release.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.2/release.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 3e74b83290..0460e4e858 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -227,8 +227,8 @@ $blueprintRng = new Xoshiro256StarStar( $fibers = []; for ($i = 0; $i < 8; $i++) { $fiberRng = clone $blueprintRng; - // Xoshiro256**'s 'jump()' method moves the blueprint ahead 2**128 steps, as if calling 'generate()' 2**128 times, - // giving the Fiber 2**128 unique values without needing to reseed. + // Xoshiro256**'s 'jump()' method moves the blueprint ahead 2**128 steps, as if calling + // 'generate()' 2**128 times, giving the Fiber 2**128 unique values without needing to reseed. $blueprintRng->jump(); $fibers[] = new Fiber(function () use ($fiberRng, $i): void { From ec0f808ad92253c928cda16c044741f684d379d9 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 7 Dec 2022 03:27:26 +0300 Subject: [PATCH 13/16] Add links to doc --- releases/8.2/languages/en.php | 26 +++++++++++++------------- releases/8.2/languages/ru.php | 26 +++++++++++++------------- releases/8.2/release.inc | 16 ++++++---------- 3 files changed, 32 insertions(+), 36 deletions(-) diff --git a/releases/8.2/languages/en.php b/releases/8.2/languages/en.php index 9ffd42c19f..dc3c4bd1fb 100644 --- a/releases/8.2/languages/en.php +++ b/releases/8.2/languages/en.php @@ -8,7 +8,7 @@ 'upgrade_now' => 'Upgrade to PHP 8.2 now!', 'readonly_classes_title' => 'Readonly classes', 'dnf_types_title' => 'Disjunctive Normal Form (DNF) Types', - 'dnf_types_description' => 'DNF types allow us to combine union and intersection types, following a strict rule: when combining union and intersection types, intersection types must be grouped with brackets.', + 'dnf_types_description' => 'DNF types allow us to combine union and intersection types, following a strict rule: when combining union and intersection types, intersection types must be grouped with brackets.', 'null_false_true_types_title' => 'Allow null, false, and true as stand-alone types', 'random_title' => 'New "Random" extension', 'random_description' => '

    The "random" extension provides a new object-oriented API to random number generation. Instead of relying on a globally seeded random number generator (RNG) using the Mersenne Twister algorithm the object-oriented API provides several classes ("Engine"s) providing access to modern algorithms that store their state within objects to allow for multiple independent seedable sequences.

    @@ -19,22 +19,22 @@ 'deprecate_dynamic_properties_description' => '

    The creation of dynamic properties is deprecated to help avoid mistakes and typos, unless the class opts in by using the #[\AllowDynamicProperties] attribute. stdClass allows dynamic properties.

    Usage of the __get/__set magic methods is not affected by this change.

    ', 'new_classes_title' => 'New Classes, Interfaces, and Functions', - 'new_mysqli' => 'New mysqli_execute_query function and mysqli::execute_query method.', - 'new_attributes' => 'New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes.', - 'new_zip' => 'New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError methods.', - 'new_reflection' => 'New ReflectionFunction::isAnonymous and ReflectionMethod::hasPrototype methods.', - 'new_functions' => 'New curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length functions.', + 'new_mysqli' => 'New mysqli_execute_query function and mysqli::execute_query method.', + 'new_attributes' => 'New #[\AllowDynamicProperties] and #[\SensitiveParameter] attributes.', + 'new_zip' => 'New ZipArchive::getStreamIndex, ZipArchive::getStreamName, and ZipArchive::clearError methods.', + 'new_reflection' => 'New ReflectionFunction::isAnonymous and ReflectionMethod::hasPrototype methods.', + 'new_functions' => 'New curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length functions.', 'bc_title' => 'Deprecations and backward compatibility breaks', 'bc_string_interpolation' => 'Deprecated ${} string interpolation.', - 'bc_utf8' => 'Deprecated utf8_encode and utf8_decode functions.', - 'bc_datetime' => 'Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable has a tentative return type of static.', + 'bc_utf8' => 'Deprecated utf8_encode and utf8_decode functions.', + 'bc_datetime' => 'Methods DateTime::createFromImmutable and DateTimeImmutable::createFromMutable has a tentative return type of static.', 'bc_odbc' => 'Extensions ODBC and PDO_ODBC escapes the username and password.', - 'bc_str_locale_sensitive' => 'Functions strtolower and strtoupper are no longer locale-sensitive.', - 'bc_spl_enforces_signature' => 'Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc, and SplFileObject::fpassthru enforces their signature.', - 'bc_spl_false' => 'Method SplFileObject::hasChildren has a tentative return type of false.', - 'bc_spl_null' => 'Method SplFileObject::getChildren has a tentative return type of null.', + 'bc_str_locale_sensitive' => 'Functions strtolower and strtoupper are no longer locale-sensitive.', + 'bc_spl_enforces_signature' => 'Methods SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc, and SplFileObject::fpassthru enforces their signature.', + 'bc_spl_false' => 'Method SplFileObject::hasChildren has a tentative return type of false.', + 'bc_spl_null' => 'Method SplFileObject::getChildren has a tentative return type of null.', 'bc_spl_deprecated' => 'The internal method SplFileInfo::_bad_state_ex has been deprecated.', 'footer_title' => 'Better performance, better syntax, improved type safety.', - 'footer_description' => '

    For source downloads of PHP 8.2 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.

    + 'footer_description' => '

    For source downloads of PHP 8.2 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.

    The migration guide is available in the PHP Manual. Please consult it for a detailed list of new features and backward-incompatible changes.

    ', ]; diff --git a/releases/8.2/languages/ru.php b/releases/8.2/languages/ru.php index 475cf39c8e..64b8100262 100644 --- a/releases/8.2/languages/ru.php +++ b/releases/8.2/languages/ru.php @@ -8,7 +8,7 @@ 'upgrade_now' => 'Переходите на PHP 8.2!', 'readonly_classes_title' => 'Readonly-классы', 'dnf_types_title' => 'Типы в виде дизъюнктивной нормальной формы (ДНФ)', - 'dnf_types_description' => 'ДНФ позволяет совместить объединение и пересечение типов, при этом обязательно типы пересечения следует сгруппировать скобками.', + 'dnf_types_description' => 'ДНФ позволяет совместить объединение и пересечение типов, при этом обязательно типы пересечения следует сгруппировать скобками.', 'null_false_true_types_title' => 'Самостоятельные типы null, false и true', 'random_title' => 'Новый модуль "Random"', 'random_description' => '

    Модуль "random" предлагает новый объектно-ориентированный API для генерации случайных чисел. Вместо использования глобального генератора случайных чисел (ГСЧ) на базе алгоритма вихря Мерсенна, в объектно-ориентированном API доступно несколько ГСЧ, представленных отдельными классами (как реализации интерфейса Engine), которые хранят внутреннее состояние, позволяя создавать несколько независимых последовательностей случайных чисел.

    @@ -19,22 +19,22 @@ 'deprecate_dynamic_properties_description' => '

    Чтобы помочь избежать ошибок и опечаток, больше не рекомендуется определять динамические свойства, только если сам класс явно не разрешит это при помощи атрибута #[\AllowDynamicProperties]. В экземплярах stdClass по-прежнему можно использовать динамические свойства.

    Это изменение не влияет на использование магических методов __get/__set.

    ', 'new_classes_title' => 'Новые классы, интерфейсы и функции', - 'new_mysqli' => 'Новая функция mysqli_execute_query и метод mysqli::execute_query.', - 'new_attributes' => 'Новые атрибуты #[\AllowDynamicProperties] и #[\SensitiveParameter].', - 'new_zip' => 'Новые методы ZipArchive::getStreamIndex, ZipArchive::getStreamName и ZipArchive::clearError.', - 'new_reflection' => 'Новые методы ReflectionFunction::isAnonymous и ReflectionMethod::hasPrototype.', - 'new_functions' => 'Новые функции curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length.', + 'new_mysqli' => 'Новая функция mysqli_execute_query и метод mysqli::execute_query.', + 'new_attributes' => 'Новые атрибуты #[\AllowDynamicProperties] и #[\SensitiveParameter].', + 'new_zip' => 'Новые методы ZipArchive::getStreamIndex, ZipArchive::getStreamName и ZipArchive::clearError.', + 'new_reflection' => 'Новые методы ReflectionFunction::isAnonymous и ReflectionMethod::hasPrototype.', + 'new_functions' => 'Новые функции curl_upkeep, memory_reset_peak_usage, ini_parse_quantity, libxml_get_external_entity_loader, sodium_crypto_stream_xchacha20_xor_ic, openssl_cipher_key_length.', 'bc_title' => 'Устаревшая функциональность и изменения в обратной совместимости', 'bc_string_interpolation' => 'Интерполяции строк вида ${} следует избегать.', - 'bc_utf8' => 'Не рекомендуется использовать функции utf8_encode и utf8_decode.', - 'bc_datetime' => 'У методов DateTime::createFromImmutable и DateTimeImmutable::createFromMutable задан предварительный тип возвращаемого значения static.', + 'bc_utf8' => 'Не рекомендуется использовать функции utf8_encode и utf8_decode.', + 'bc_datetime' => 'У методов DateTime::createFromImmutable и DateTimeImmutable::createFromMutable задан предварительный тип возвращаемого значения static.', 'bc_odbc' => 'Модули ODBC и PDO_ODBC экранирует имя пользователя и пароль.', - 'bc_str_locale_sensitive' => 'При работе функции strtolower и strtoupper теперь не учитывают локаль.', - 'bc_spl_enforces_signature' => 'Методы SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc и SplFileObject::fpassthru усиливают свою сигнатуру.', - 'bc_spl_false' => 'У метода SplFileObject::hasChildren предварительный тип возвращаемого значения задан как false.', - 'bc_spl_null' => 'У метода SplFileObject::getChildren предварительный тип возвращаемого значения задан как null.', + 'bc_str_locale_sensitive' => 'При работе функции strtolower и strtoupper теперь не учитывают локаль.', + 'bc_spl_enforces_signature' => 'Методы SplFileObject::getCsvControl, SplFileObject::fflush, SplFileObject::ftell, SplFileObject::fgetc и SplFileObject::fpassthru усиливают свою сигнатуру.', + 'bc_spl_false' => 'У метода SplFileObject::hasChildren предварительный тип возвращаемого значения задан как false.', + 'bc_spl_null' => 'У метода SplFileObject::getChildren предварительный тип возвращаемого значения задан как null.', 'bc_spl_deprecated' => 'Внутренний метод SplFileInfo::_bad_state_ex объявлен устаревшим.', 'footer_title' => 'Выше производительность, лучше синтаксис, надёжнее система типов.', - 'footer_description' => '

    Для загрузки исходного кода PHP 8.2 посетите страницу Downloads. Бинарные файлы Windows находятся на сайте PHP for Windows. Список изменений перечислен на странице ChangeLog.

    + 'footer_description' => '

    Для загрузки исходного кода PHP 8.2 посетите страницу Downloads. Бинарные файлы Windows находятся на сайте PHP for Windows. Список изменений перечислен на странице ChangeLog.

    Руководство по миграции доступно в разделе документации. Ознакомьтесь с ним, чтобы узнать обо всех новых возможностях и изменениях, затрагивающих обратную совместимость.

    ', ]; diff --git a/releases/8.2/release.inc b/releases/8.2/release.inc index 0460e4e858..dcab6314fb 100644 --- a/releases/8.2/release.inc +++ b/releases/8.2/release.inc @@ -42,7 +42,7 @@ common_header(message('common_header', $lang)); RFC /language.oop5.basic.php#language.oop5.basic.class.readonly"> @@ -100,7 +100,7 @@ PHP RFC /migration82.new-features.php#migration82.new-features.core.type-system"> @@ -205,11 +205,7 @@ PHP RFC RFC - +
    @@ -229,7 +225,7 @@ for ($i = 0; $i < 8; $i++) { $fiberRng = clone $blueprintRng; // Xoshiro256**'s 'jump()' method moves the blueprint ahead 2**128 steps, as if calling // 'generate()' 2**128 times, giving the Fiber 2**128 unique values without needing to reseed. - $blueprintRng->jump(); + $blueprintRng->jump(); $fibers[] = new Fiber(function () use ($fiberRng, $i): void { $randomizer = new Randomizer($fiberRng); @@ -262,7 +258,7 @@ PHP RFC /migration82.new-features.php#migration82.new-features.core.constant-in-traits"> @@ -329,7 +325,7 @@ PHP RFC /migration82.deprecated.php#migration82.deprecated.core.dynamic-properties"> From f5346dbc5480650c3665ecaa4c2e0da036151ccd Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 7 Dec 2022 14:06:53 +0300 Subject: [PATCH 14/16] Prepare for preview --- include/header.inc | 4 ++-- releases/8.2/languages/en.php | 2 +- releases/8.2/languages/ru.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/header.inc b/include/header.inc index 2aff9d8a78..3a099d7ba4 100644 --- a/include/header.inc +++ b/include/header.inc @@ -105,8 +105,8 @@ if (!isset($config["languages"])) {
  • ">Get Involved
  • ">Help
  • "> - - php8.2 + + php8.1
  • diff --git a/releases/8.2/languages/en.php b/releases/8.2/languages/en.php index dc3c4bd1fb..39add58800 100644 --- a/releases/8.2/languages/en.php +++ b/releases/8.2/languages/en.php @@ -3,7 +3,7 @@ return [ 'common_header' => 'PHP 8.2 is a major update of the PHP language. Readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more', 'documentation' => 'Doc', - 'main_title' => 'Released!', + 'main_title' => 'To be released tomorrow!', 'main_subtitle' => 'PHP 8.2 is a major update of the PHP language.
    It contains many new features, including readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more.', 'upgrade_now' => 'Upgrade to PHP 8.2 now!', 'readonly_classes_title' => 'Readonly classes', diff --git a/releases/8.2/languages/ru.php b/releases/8.2/languages/ru.php index 64b8100262..6cbb51d636 100644 --- a/releases/8.2/languages/ru.php +++ b/releases/8.2/languages/ru.php @@ -3,7 +3,7 @@ return [ 'common_header' => 'PHP 8.2 — большое обновление языка PHP. Readonly-классы, самостоятельные типы null, false и true, устаревшие динамические свойства, улучшение производительности и многое другое.', 'documentation' => 'Документация', - 'main_title' => 'выпущен!', + 'main_title' => 'будет выпущен завтра!', 'main_subtitle' => 'PHP 8.2 — большое обновление языка PHP.
    Оно содержит множество новых возможностей, включая readonly-классы, самостоятельные типы null, false и true, устаревшие динамические свойства, улучшение производительности и многое другое.', 'upgrade_now' => 'Переходите на PHP 8.2!', 'readonly_classes_title' => 'Readonly-классы', From 23131f3aab98e4587e1836f34e4bd138f6bc5a23 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 7 Dec 2022 14:08:13 +0300 Subject: [PATCH 15/16] Prepare for preview, part 2 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index c935b22344..0e2a21de41 100644 --- a/index.php +++ b/index.php @@ -95,7 +95,7 @@

    A popular general-purpose scripting language that is especially suited to web development.
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

    EOF; From 2ae7d4a6802c06c7573ca75c0e87938c7e0e18f3 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 7 Dec 2022 14:10:34 +0300 Subject: [PATCH 16/16] Update index.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 0e2a21de41..437bd15949 100644 --- a/index.php +++ b/index.php @@ -95,7 +95,7 @@

    A popular general-purpose scripting language that is especially suited to web development.
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

    EOF;