Author: Sergey Panteleev (saundefined)
Date: 2025-10-05T21:15:27+03:00

Commit: 
https://github.com/php/web-php/commit/7301dd8f1a29e04374f3bcf5e6f5f41530c950a5
Raw diff: 
https://github.com/php/web-php/commit/7301dd8f1a29e04374f3bcf5e6f5f41530c950a5.diff

Apply suggestions from code review

Co-authored-by: Tim Düsterhus <[email protected]>

Changed paths:
  M  releases/8.5/languages/en.php
  M  releases/8.5/release.inc


Diff:

diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php
index bc46e46c6c..a0c2f2e947 100644
--- a/releases/8.5/languages/en.php
+++ b/releases/8.5/languages/en.php
@@ -16,7 +16,6 @@
     'fcc_in_const_expr_title' => 'First Class Callables in constant 
expressions',
     'curl_share_persistence_improvement_title' => 'Persistent cURL share 
handle improvement',
     'array_first_last_title' => 'New <code>array_first()</code> and 
<code>array_last()</code> functions',
-    'deprecated_traits_title' => '',
 
     'new_classes_title' => 'New Classes, Interfaces, and Functions',
 
diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc
index 3a833189ba..00545de762 100644
--- a/releases/8.5/release.inc
+++ b/releases/8.5/release.inc
@@ -88,12 +88,14 @@ PHP
                     <div class="php8-code phpcode">
                         <?php highlight_php_trimmed(
                                 <<<'PHP'
-final readonly class PhpVersion {
+final readonly class PhpVersion
+{
     public function __construct(
         public string $version = 'PHP 8.4',
     ) {}
 
-    public function withVersion(string $version) {
+    public function withVersion(string $version): self
+    {
         $newObject = clone $this;
         $newObject->version = $version;
 
@@ -119,12 +121,14 @@ PHP
                     <div class="php8-code phpcode" style="display: 
table-cell;">
                         <?php highlight_php_trimmed(
                                 <<<'PHP'
-final readonly class PhpVersion {
+final readonly class PhpVersion
+{
     public function __construct(
         public string $version = 'PHP 8.4',
     ) {}
 
-    public function withVersion(string $version) {
+    public function withVersion(string $version): self
+    {
         return clone($this, [
             'version' => $version,
         ]);
@@ -186,8 +190,8 @@ $input = ' Some kind of string. ';
 
 $output = $input
     |> trim(...)
-    |> (fn (string $string) => str_replace(' ', '-', $string))
-    |> (fn (string $string) => str_replace(['.', '/', '…'], '', $string))
+    |> (fn($string) => str_replace(' ', '-', $string))
+    |> (fn($string) => str_replace(['.', '/', '…'], '', $string))
     |> strtolower(...);
 
 var_dump($output);
@@ -339,8 +343,6 @@ curl_exec($ch1);
 $ch2 = curl_init('https://thephp.foundation/');
 curl_setopt($ch2, CURLOPT_SHARE, $sh);
 curl_exec($ch2);
-
-curl_share_close($sh);
 PHP
 
                         ); ?>

Reply via email to