Skip to content
Open
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
419 changes: 0 additions & 419 deletions include/errors.inc

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions include/manual-lookup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ function find_manual_page_slow($lang, $keyword)
}
}

// Fall back to the third-party extensions manual (English only) for the
// pages that moved to php/doc-extensions
foreach ($sections as $section) {
$found = tryprefix("extensions", $keyword, $section);
if ($found) { return $found; }
}

// BC: Few references pages where moved to book.
if (strpos($keyword, "ref.") === 0) {
$kw = substr_replace($keyword, "book.", 0, 4);
Expand Down
11 changes: 9 additions & 2 deletions include/shared-manual.inc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ function manual_setup($setup): void {
}
$PGI = $setup;
// Set base href for this manual page
$base = 'manual/' . (new Languages())->convert($setup['head'][1]) . "/";
// The third-party extensions manual (php/doc-extensions) is English only
// and served from manual/extensions/, which is not a language.
$isExtensionsManual = $setup['head'][1] === 'extensions';
$base = 'manual/' . ($isExtensionsManual ? 'extensions' : (new Languages())->convert($setup['head'][1])) . "/";
$_SERVER['BASE_PAGE'] = $base . $setup['this'][0];
$_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE'];

Expand Down Expand Up @@ -314,7 +317,7 @@ function manual_setup($setup): void {
$config = [
"current" => "docs",
"breadcrumbs" => $breadcrumbs,
"languages" => array_keys(Languages::ACTIVE_ONLINE_LANGUAGES),
"languages" => $isExtensionsManual ? [] : array_keys(Languages::ACTIVE_ONLINE_LANGUAGES),
"meta-navigation" => [
"contents" => $base . $setup["home"][0],
"index" => $base . $setup["up"][0],
Expand All @@ -331,6 +334,10 @@ function manual_setup($setup): void {
];
site_header($setup["this"][1] . " - Manual", $config);

if ($isExtensionsManual) {
return;
}

$languageChooser = manual_language_chooser($config['lang'], $config['thispage']);

echo <<<PAGE_TOOLS
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ parameters:
-
message: '#^Variable \$LANG might not be defined\.$#'
identifier: variable.undefined
count: 8
count: 7
path: public/error.php

-
Expand Down
31 changes: 31 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import {defineConfig, devices} from '@playwright/test';

/**
* The tests of the move of the extensions to the extensions manual need the
* manuals built by tests/extensions-migration.sh, so they only exist when
* EXTENSIONS_MIGRATION=1 (that script sets it).
*/
const extensionsMigration = process.env.EXTENSIONS_MIGRATION === '1';

/**
* See https://playwright.dev/docs/test-configuration.
*/
Expand Down Expand Up @@ -34,6 +41,30 @@ export default defineConfig({
name: 'End-to-End Chromium',
use: {...devices['Desktop Chrome']},
testDir: './tests/EndToEnd',
testIgnore: '**/ExtensionsMigration/**',
},
...(extensionsMigration
? [
{
name: 'Extensions migration (API)',
testDir: './tests/EndToEnd/ExtensionsMigration',
testMatch: '*.api.spec.ts',
timeout: 120_000,
use: {baseURL: process.env.HTTP_HOST ?? 'http://localhost:8080'},
},
{
name: 'Extensions migration (Chromium)',
testDir: './tests/EndToEnd/ExtensionsMigration',
testMatch: '*.browser.spec.ts',
timeout: 30_000,
expect: {timeout: 10_000},
use: {
...devices['Desktop Chrome'],
baseURL: process.env.HTTP_HOST ?? 'http://localhost:8080',
actionTimeout: 10_000,
},
},
]
: []),
],
});
Loading
Loading