Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions public/images/php8/logo_php8_6.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/php8/php_8_6_released.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions public/releases/8.6/common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

declare(strict_types=1);

namespace releases\php86;

require_once __DIR__ . '/../../../include/prepend.inc';

const LANGUAGES = [
'en' => 'English',
];

function common_header(string $description): void {
global $MYSITE, $lang;

$meta_image_path = \htmlspecialchars(
\filter_var($MYSITE . 'images/php8/php_8_6_released.png', \FILTER_VALIDATE_URL));

Check failure on line 17 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Parameter #1 $string of function htmlspecialchars expects string, string|false given.
$meta_description = \htmlspecialchars($description);

$languages = [];
foreach (LANGUAGES as $code => $text) {
$languages[] = ['name' => $text, 'selected' => $lang === $code, 'url' => '/releases/8.6/' . $code . '.php'];
}

\site_header("PHP 8.6 Release Announcement", [
'current' => 'php85',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these meant to say 8.5 for current and for the css ?

'css' => ['php85.css'],
'language_switcher' => $languages,
'theme_switcher' => true,
'meta_tags' => <<<META
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@official_php" />
<meta name="twitter:title" content="PHP 8.6 Released" />
<meta name="twitter:description" content="{$meta_description}" />
<meta name="twitter:creator" content="@official_php" />
<meta name="twitter:image:src" content="{$meta_image_path}" />

<meta itemprop="name" content="PHP 8.6 Released" />
<meta itemprop="description" content="{$meta_description}" />
<meta itemprop="image" content="{$meta_image_path}" />

<meta property="og:image" content="{$meta_image_path}" />
<meta property="og:description" content="{$meta_description}" />
META
]);
}

function message($code, $language = 'en', array $interpolations = []): string

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $language with no type specified.

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $interpolations with no value type specified in iterable type array.

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $code with no type specified.
{
$original = require __DIR__ . '/languages/en.php';
if (($language !== 'en') && file_exists(__DIR__ . '/languages/' . $language . '.php')) {
$translation = require __DIR__ . '/languages/' . $language . '.php';
}

$message = $translation[$code] ?? $original[$code] ?? $code;

foreach ($interpolations as $name => $value) {
$message = str_replace("{{$name}}", $value, $message);
}

return $message;
}
5 changes: 5 additions & 0 deletions public/releases/8.6/en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$lang = 'en';

require_once __DIR__ . '/release.inc';
13 changes: 13 additions & 0 deletions public/releases/8.6/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

use phpweb\LangChooser;
use const releases\php86\LANGUAGES;

$_SERVER['BASE_PAGE'] = 'releases/8.6/index.php';
require_once __DIR__ . '/common.php';
require_once __DIR__ . '/../../../src/autoload.php';

$langChooser = new LangChooser(LANGUAGES, [], "", "");
[$lang,] = $langChooser->chooseCode("", "", $_SERVER['HTTP_ACCEPT_LANGUAGE']);

mirror_redirect("/releases/8.6/$lang.php");
60 changes: 60 additions & 0 deletions public/releases/8.6/languages/en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?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',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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)

'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>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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>',


'whats_new' => 'What\'s new in 8.6',
'upgrade_now' => 'Upgrade to PHP 8.6',
'old_version' => 'PHP 8.5 and older',
'badge_new' => 'NEW',
'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>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


'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>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_readonly_property_defaults_description' => '<p>Allows default values for instance readonly properties.</p>',
'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>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'features_sort_direction_description' => '<p>Represents a sort directions.</p>',
'features_sort_direction_description' => '<p>Represents possible 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.',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

'readonly_property_defaults_title' => 'Readonly property defaults',
'readonly_property_defaults_description' => 'Allows default values for instance readonly properties.',
'polling_api_title' => 'Polling API',
'polling_api_description' => 'The new API is available at the user-code level, allowing low-level frameworks such as ReactPHP or Amp to utilize it.',
'clamp_title' => 'New <code>clamp()</code> function',
'clamp_description' => 'Ensures that a given value (numeric or otherwise) falls within a specified range. Otherwise, the nearest boundary value is returned.',
'duration_title' => 'New <code>\Time\Duration</code> class',
'duration_description' => 'Represents a duration of time.',
'sort_direction_title' => 'New <code>SortDirection</code> enum',
'sort_direction_description' => 'Represents a sort directions.',
'stream_error_handling_title' => 'Stream Error Handling',
'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',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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',

'isreadable_iswriteable_description' => 'TODO.',

'new_classes_title' => 'Additional features and improvements',
'new_uri' => 'New <code>Uri\Rfc3986\Uri::getUriType()</code>, <code>Uri\WhatWg\Url::isSpecialScheme()</code>, <code>Uri\Rfc3986\Uri::getHostType()</code>, and <code>Uri\WhatWg\Url::getHostType()</code> methods.',
'new_gmp' => 'New <code>gmp_powm_sec()</code> and <code>gmp_prevprime()</code> functions.',
'new_intl' => 'New <code>grapheme_strrev()</code> function, and <code>IntlDatePatternGenerator::getSkeleton()</code>, <code>IntlDatePatternGenerator::getBaseSkeleton()</code>, <code>Locale::getDisplayKeyword()</code>, <code>Locale::getDisplayKeywordValue()</code>, <code>SpoofChecker::areBidiConfusable()</code>, <code>SpoofChecker::getBidiSkeleton()</code>, <code>SpoofChecker::getSkeleton()</code> methods.',
'new_mysqli' => 'New <code>mysqli::quote_string()</code> method and <code>mysqli_quote_string()</code> function.',
'new_reflection' => 'New <code>ReflectionConstant::inNamespace()</code>, <code>ReflectionAttribute::inNamespace()</code>, <code>ReflectionAttribute::getNamespaceName()</code>, and <code>ReflectionAttribute::getShortName()</code> methods.',
'new_zip' => 'New <code>ZipArchive::openString()</code> and <code>ZipArchive::closeString()</code> methods.',
'new_stream' => 'New <code>stream_last_errors()</code> and <code>stream_clear_errors()</code> functions.',

'bc_title' => 'Deprecations and backward compatibility breaks',
'deprecated_mysqli' => 'The <code>mysqli_get_charset()</code> function and <code>mysqli::get_charset()</code> method are now deprecated.',
'deprecated_spl' => 'The <code>spl_classes()</code>, <code>spl_object_hash()</code> functions, and various <code>ArrayIterator</code> and <code>SplFileObject</code> methods are now deprecated.',
'deprecated_standard' => 'The <code>metaphone()</code>, <code>is_double()</code>, <code>is_long()</code>, <code>is_integer()</code>, <code>doubleval()</code>, and <code>strcoll()</code> functions are now deprecated.',
'deprecated_date' => 'The <code>DateTime::createFromInterface()</code>, <code>DateTimeImmutable::__set_state()</code>, <code>DateTimeImmutable::modify()</code>, <code>DateTimeImmutable::add()</code>, <code>DateTimeImmutable::sub()</code>, <code>DateTimeImmutable::setTimezone()</code>, <code>DateTimeImmutable::setTime()</code>, <code>DateTimeImmutable::setDate()</code>, <code>DateTimeImmutable::setISODate()</code>, <code>DateTimeImmutable::setTimestamp()</code>, <code>DateTimeImmutable::createFromInterface()</code>, <code>DateTimeZone::__set_state()</code>, <code>DateInterval::__set_state()</code>, <code>DatePeriod::__set_state()</code> methods now have tentative static return types.',

'footer_title' => 'Better syntax, improved performance and type safety.',
'footer_description' => '<p class="first-paragraph">The full list of changes is recorded in the <a href="/ChangeLog-8.php#PHP_8_6" target="_blank">ChangeLog</a>.</p><p>Please consult the <a href="/manual/en/migration86.php" target="_blank">migration guide</a> for a detailed list of new features and backward-incompatible changes.</p>',
];
Loading
Loading