Repository navigation
[WIP] PHP 8.6 release page - #2030
saundefined wants to merge 4 commits into
Conversation
|
📊 Regression report for commit 9048311 is at https://web-php-regression-report-pr-2030.preview.thephp.foundation |
|
🚀 Preview for commit 9048311 is available at https://web-php-pr-2030.preview.thephp.foundation |
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
| /** | ||
| * Returns up to $limit items matching the $query. | ||
| */ |
There was a problem hiding this comment.
| /** | |
| * Returns up to $limit items matching the $query. | |
| */ | |
| /** | |
| * Returns up to $limit items matching the $query. | |
| */ |
| /** Terms to search */ | ||
| string $query, | ||
|
|
||
| /** int Terms to search */ |
There was a problem hiding this comment.
| /** int Terms to search */ | |
| /** Maximum number of results */ |
| ], | ||
| before: '', | ||
| after: <<<'PHP' | ||
| class NewsEntry { |
There was a problem hiding this comment.
| class NewsEntry { | |
| class NewsEntry | |
| { |
| ], | ||
| before: '', | ||
| after: <<<'PHP' | ||
| class DB { |
There was a problem hiding this comment.
| class DB { | |
| class DB | |
| { |
| class QueryBuilder { | ||
| private SortDirection $sort; | ||
|
|
||
| public function setSort(SortDirection $sort): void { | ||
| $this->sort = $sort; | ||
| } | ||
|
|
||
| private function getSortKeyword(): string { | ||
| return match($this->sort) { | ||
| SortDirection::Ascending => 'ASC', | ||
| SortDirection::Descending => 'DESC', | ||
| }; | ||
| } | ||
| } |
There was a problem hiding this comment.
| class QueryBuilder { | |
| private SortDirection $sort; | |
| public function setSort(SortDirection $sort): void { | |
| $this->sort = $sort; | |
| } | |
| private function getSortKeyword(): string { | |
| return match($this->sort) { | |
| SortDirection::Ascending => 'ASC', | |
| SortDirection::Descending => 'DESC', | |
| }; | |
| } | |
| } | |
| class QueryBuilder | |
| { | |
| private SortDirection $sort; | |
| public function setSort(SortDirection $sort): void | |
| { | |
| $this->sort = $sort; | |
| } | |
| private function getSortKeyword(): string | |
| { | |
| return match($this->sort) { | |
| SortDirection::Ascending => 'ASC', | |
| SortDirection::Descending => 'DESC', | |
| }; | |
| } | |
| } |
| class QueryBuilder { | ||
| private int $sort; | ||
|
|
||
| public function setSort(int $sort): void { | ||
| $this->sort = $sort; | ||
| } | ||
|
|
||
| private function getSortKeyword(): string { | ||
| return match($this->sort) { | ||
| SORT_ASC => 'ASC', | ||
| SORT_DESC => 'DESC', | ||
| }; | ||
| } | ||
| } |
There was a problem hiding this comment.
| class QueryBuilder { | |
| private int $sort; | |
| public function setSort(int $sort): void { | |
| $this->sort = $sort; | |
| } | |
| private function getSortKeyword(): string { | |
| return match($this->sort) { | |
| SORT_ASC => 'ASC', | |
| SORT_DESC => 'DESC', | |
| }; | |
| } | |
| } | |
| class QueryBuilder | |
| { | |
| private int $sort; | |
| public function setSort(int $sort): void | |
| { | |
| $this->sort = $sort; | |
| } | |
| private function getSortKeyword(): string | |
| { | |
| return match($this->sort) { | |
| SORT_ASC => 'ASC', | |
| SORT_DESC => 'DESC', | |
| }; | |
| } | |
| } |
| new FeatureComparison( | ||
| id: 'duration-class', | ||
| title: message('duration_title', $lang), | ||
| description: message('duration_description', $lang), | ||
| links: [ | ||
| 'RFC|https://wiki.php.net/rfc/duration_class', | ||
| ], | ||
| before: <<<'PHP' | ||
| // TODO | ||
| PHP, | ||
| after: <<<'PHP' | ||
| // TODO | ||
| PHP, | ||
| ), |
There was a problem hiding this comment.
For Duration perhaps a custom wrapper around time_nanosleep()? The class nicely maps directly onto the parameters of time_nanosleep().
And then perhaps showcase some of the mathematical operations, e.g. the delay example from the RFC: https://wiki.php.net/rfc/duration_class#examples
| <?php | ||
|
|
||
| return [ | ||
| 'common_header' => 'PHP 8.6 is a major update of the PHP language, with new features including the Partial Function Application, new Duration class, Polling API, and new clamp() function', |
There was a problem hiding this comment.
| 'common_header' => 'PHP 8.6 is a major update of the PHP language, with new features including the Partial Function Application, new Duration class, Polling API, and new clamp() function', | |
| 'common_header' => 'PHP 8.6 is a major update of the PHP language, with new features including Partial Function Application, a new Duration class, a Polling API, and a new clamp() function', |
("a" can also be "the", both here and in the main_subtitle message)
| return [ | ||
| 'common_header' => 'PHP 8.6 is a major update of the PHP language, with new features including the Partial Function Application, new Duration class, Polling API, and new clamp() function', | ||
| 'main_title' => 'Smarter, Faster, Built for Tomorrow.', | ||
| 'main_subtitle' => '<p xmlns="http://www.w3.org/1999/html"><strong>PHP 8.6 is a major update of the PHP language</strong>, with new features including the <strong>Partial Function Application</strong>, new <strong>Duration</strong> class, <strong>Polling API</strong>, and new <strong>clamp()</strong> function</p>', |
There was a problem hiding this comment.
| 'main_subtitle' => '<p xmlns="http://www.w3.org/1999/html"><strong>PHP 8.6 is a major update of the PHP language</strong>, with new features including the <strong>Partial Function Application</strong>, new <strong>Duration</strong> class, <strong>Polling API</strong>, and new <strong>clamp()</strong> function</p>', | |
| 'main_subtitle' => '<p xmlns="http://www.w3.org/1999/html"><strong>PHP 8.6 is a major update of the PHP language</strong>, with new features including <strong>Partial Function Application</strong>, a new <strong>Duration</strong> class, a <strong>Polling API</strong>, and a new <strong>clamp()</strong> function</p>', |
| 'documentation' => 'Doc', | ||
| 'released' => 'Released Nov 19, 2026', | ||
| 'key_features' => 'Key Features in PHP 8.6', | ||
| 'key_features_description' => '<p><strong>Faster</strong>, <strong>cleaner</strong>, and <strong>built for developers</strong>.</p>', |
There was a problem hiding this comment.
Can we avoid putting the <p> tags in the message contents, if the entire message is a single paragraph? Just wrap the actual usage in the tags, to make translating easier
| 'key_features' => 'Key Features in PHP 8.6', | ||
| 'key_features_description' => '<p><strong>Faster</strong>, <strong>cleaner</strong>, and <strong>built for developers</strong>.</p>', | ||
|
|
||
| 'features_pfa_description' => '<p>Allows functions to be called with only a subset of the required parameters, deferring the passing of the remaining ones to a later time.</p>', |
There was a problem hiding this comment.
this description is wrong - functions are not called with a subset of the required parameters, rather a subset of parameters is specified and the call is delayed until the remaining ones are provided
| 'features_sort_direction_description' => '<p>Represents a sort directions.</p>', | ||
|
|
||
| 'pfa_title' => 'Partial Function Application', | ||
| 'pfa_description' => 'Allows functions to be called with only a subset of the required parameters, deferring the passing of the remaining ones to a later time.', |
There was a problem hiding this comment.
any expected difference between this and features_pfa_description? Same with some of the other description messages - if they are expected to be the same, just reuse the original one?
Not repeating my comments on the various features_* and other messages
| 'features_polling_api_description' => '<p>The new API is available at the user-code level, allowing low-level frameworks such as ReactPHP or Amp to utilize it.</p>', | ||
| 'features_clamp_description' => '<p>Ensures that a given value (numeric or otherwise) falls within a specified range.</p>', | ||
| 'features_duration_description' => '<p>Represents a duration of time.</p>', | ||
| 'features_sort_direction_description' => '<p>Represents a sort directions.</p>', |
There was a problem hiding this comment.
| 'features_sort_direction_description' => '<p>Represents a sort directions.</p>', | |
| 'features_sort_direction_description' => '<p>Represents possible sort directions.</p>', |
| 'stream_error_handling_description' => 'TODO.', | ||
| 'doc_comments_title' => 'DocComments For Function Parameters', | ||
| 'doc_comments_description' => 'TODO.', | ||
| 'isreadable_iswriteable_title' => 'New <code>ReflectionProperty::isReadable</code> and <code>ReflectionProperty::isWritable</code> methods', |
There was a problem hiding this comment.
| 'isreadable_iswriteable_title' => 'New <code>ReflectionProperty::isReadable</code> and <code>ReflectionProperty::isWritable</code> methods', | |
| 'isreadable_iswriteable_title' => 'New <code>ReflectionProperty::isReadable()</code> and <code>ReflectionProperty::isWritable()</code> methods', |
| } | ||
|
|
||
| \site_header("PHP 8.6 Release Announcement", [ | ||
| 'current' => 'php85', |
There was a problem hiding this comment.
are these meant to say 8.5 for current and for the css ?


URL: https://web-php-pr-2030.preview.thephp.foundation/releases/8.6/en.php