Skip to content

Commit 4e34264

Browse files
committed
fix(viewer): satisfy server lint, psalm, autoloader and openapi checks
Align the vendored Viewer app with the server's stricter checks: - eslint: camelCase bound attributes, import order, attach `cause` to the re-thrown rename error, typed `@throws` - stylelint: explicit .scss import extension, scope the shared Plyr partial - php-cs/rector: format the Files event test stub - register the app in psalm.xml and regenerate its composer autoloader - mark the app as having no OpenAPI spec (.noopenapi) Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 116c178 commit 4e34264

22 files changed

Lines changed: 1103 additions & 632 deletions

apps/viewer/.noopenapi

Whitespace-only changes.

apps/viewer/composer/autoload.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33
// autoload.php @generated by Composer
44

55
if (PHP_VERSION_ID < 50600) {
6-
if (!headers_sent()) {
7-
header('HTTP/1.1 500 Internal Server Error');
8-
}
9-
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running ' . PHP_VERSION . ', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.' . PHP_EOL;
10-
if (!ini_get('display_errors')) {
11-
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12-
fwrite(STDERR, $err);
13-
} elseif (!headers_sent()) {
14-
echo $err;
15-
}
16-
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
6+
if (!headers_sent()) {
7+
header('HTTP/1.1 500 Internal Server Error');
8+
}
9+
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10+
if (!ini_get('display_errors')) {
11+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12+
fwrite(STDERR, $err);
13+
} elseif (!headers_sent()) {
14+
echo $err;
15+
}
16+
}
17+
throw new RuntimeException($err);
2118
}
2219

2320
require_once __DIR__ . '/composer/autoload_real.php';

apps/viewer/composer/composer.lock

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)