[web-php] php-85-focus: wip

From: Date: Sat, 08 Nov 2025 18:29:53 +0000
Subject: [web-php] php-85-focus: wip
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-33316@lists.php.net to get a copy of this message
Author: Sergey Panteleev (saundefined) Date: 2025-10-03T21:06:25+03:00 Commit: https://github.com/php/web-php/commit/4c0fe2b3b2694fcb758f80aa9f89a435a2a4c88c Raw diff: https://github.com/php/web-php/commit/4c0fe2b3b2694fcb758f80aa9f89a435a2a4c88c.diff wip 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 fd084ded5c..bc46e46c6c 100644 --- a/releases/8.5/languages/en.php +++ b/releases/8.5/languages/en.php @@ -16,7 +16,7 @@ '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' => 'Attribute <code>#[\Deprecated]</code> available for traits', + '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 eb0bfa3711..5bcd54a186 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -238,9 +238,16 @@ PHP final class CalculatorTest extends \PHPUnit\Framework\TestCase { #[DataProvider('subtractionProvider')] - public function testSubtraction(int $minuend, int $subtrahend, int $result): void + public function testSubtraction( + int $minuend, + int $subtrahend, + int $result + ): void { - $this->assertSame($result, Calculator::subtract($minuend, $subtrahend)); + $this->assertSame( + $result, + Calculator::subtract($minuend, $subtrahend) + ); } public static function subtractionProvider(): iterable @@ -272,9 +279,15 @@ final class CalculatorTest yield [0, $i, ($i * -1)]; } })] - public function testSubtraction(int $minuend, int $subtrahend, int $result) + public function testSubtraction( + int $minuend, + int $subtrahend, + int $result + ) { - \assert(Calculator::subtract($minuend, $subtrahend) === $result); + \assert( + Calculator::subtract($minuend, $subtrahend) === $result + ); } } PHP @@ -349,56 +362,6 @@ $versions = ['PHP 8.1', 'PHP 8.2', 'PHP 8.3', 'PHP 8.4', 'PHP 8.5']; var_dump(array_first($versions)); // string(7) "PHP 8.1" -PHP - ); ?> - </div> - </div> - </div> - </div> - - <div class="php8-compare"> - <h2 class="php8-h2" id="deprecated_traits"> - <?= message('deprecated_traits_title', $lang) ?> - <a class="php8-rfc" href="https://wiki.php.net/rfc/deprecated_traits">RFC</a> - </h2> - <div class="php8-compare__main"> - <div class="php8-compare__block example-contents"> - <div class="php8-compare__label">PHP &lt; 8.5</div> - <div class="php8-code phpcode"> - <?php highlight_php_trimmed( - <<<'PHP' -/** -* @deprecated 8.4 use UsePhpVersion instead -*/ -trait UseVersion -{ - public function getVersion(): string - { - return '8.4'; - } -} -PHP - - ); ?> - </div> - </div> - <div class="php8-compare__arrow"></div> - <div class="php8-compare__block example-contents" style="display: table;"> - <div class="php8-compare__label php8-compare__label_new">PHP 8.5</div> - <div class="php8-code phpcode" style="display: table-cell;"> - <?php highlight_php_trimmed( - <<<'PHP' -#[\Deprecated( - message: "use UsePhpVersion instead", - since: "8.5", -)] -trait UseVersion -{ - public function getVersion(): string - { - return '8.5'; - } -} PHP ); ?> </div> @@ -415,6 +378,7 @@ PHP <li>Property Promotion is now available for <code>final</code></li> <li>Attributes are now available for constants</li> <li>Attribute <code>#[\Override]</code> now works on properties</li> + <li>Attribute <code>#[\Deprecated]</code> available for traits</li> <li>Asymmetric Visibility for Static Properties</li> <li>New <code>#[\DelayedTargetValidation]</code> attribute is available</li> <li>New <code>get_error_handler()</code>, <code>get_exception_handler()</code> functions, and <code>Closure::getCurrent</code> method are available.</li>

« previous php.webmaster (#33316) next »