Repository navigation
[WIP] PHP 8.6 release page #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
saundefined
wants to merge
23
commits into
php:master
Choose a base branch
from
saundefined:php86
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+918
−9
Draft
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4315db7
Initial PHP 8.6 release page
saundefined 4563a1d
wip
saundefined 0db8291
Apply suggestions from code review
saundefined 03e9c7c
Reorder features
saundefined 4b7d434
Apply batched suggestions from code review
saundefined f0ca38b
indentation fixed
saundefined 9eb014d
Fix mobile layout
saundefined a62bcec
Apply batched suggestions from code review
saundefined 44bb7ff
Wording + icons
saundefined dd04dee
Finish PHP 8.6 release page (#52)
theodorejb fa7a0f8
Apply batched suggestions from code review
saundefined f497021
Apply suggestions from code review
saundefined 8c16bb0
cs fix
saundefined ad00ad3
Update public/releases/8.6/release.inc
saundefined f093a5b
fix error
saundefined 458e9f9
Add release unavailable note
saundefined a213f1a
add: ru translation
saundefined 77aa650
Update Duration examples
saundefined 9d57d11
Apply batched suggestions from code review
saundefined 252d4aa
Update public/releases/8.6/release.inc
saundefined 03aa232
Clarify Partial Function Application description on 8.6 release page …
theodorejb 8582eaa
Update public/releases/8.6/release.inc
saundefined 3548e50
add cache_control
saundefined File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace releases\php86; | ||
|
|
||
| require_once __DIR__ . '/../../../include/prepend.inc'; | ||
|
|
||
| const LANGUAGES = [ | ||
| 'en' => 'English', | ||
| 'ru' => 'Русский', | ||
| ]; | ||
|
|
||
| function common_header(string $description): void { | ||
| global $MYSITE, $lang; | ||
|
|
||
| $meta_image_url = \filter_var($MYSITE . 'images/php8/php_8_6_released.png', \FILTER_VALIDATE_URL); | ||
| $meta_image_path = $meta_image_url === false ? '' : \htmlspecialchars($meta_image_url); | ||
| $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', | ||
| 'css' => ['php85.css'], | ||
| 'language_switcher' => $languages, | ||
| 'theme_switcher' => true, | ||
| 'cache_control' => 60 * 60, // 1 hour | ||
| '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 | ||
| ]); | ||
| } | ||
|
|
||
| /** | ||
| * @param array<int|string, string> $interpolations | ||
| */ | ||
| function message(string $code, string $language = 'en', array $interpolations = []): string | ||
| { | ||
| $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; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?php | ||
|
|
||
| $lang = 'en'; | ||
|
|
||
| require_once __DIR__ . '/release.inc'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.