2026-06-30 10:22:53 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Runtime requirements — single source of truth.
|
|
|
|
|
*
|
|
|
|
|
* Consumed by:
|
|
|
|
|
* - scripts/check_requirements.php (CI: fails the build if unmet)
|
|
|
|
|
* - api/health.php (production: surfaces drift to monitoring)
|
|
|
|
|
*
|
|
|
|
|
* This exists because a PHP upgrade once silently dropped the ldap extension,
|
|
|
|
|
* which broke avatars with no visible error. Keep this list in sync with the
|
|
|
|
|
* extensions the code actually relies on.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
// Minimum supported PHP version (production runs 8.4).
|
|
|
|
|
'min_php_version' => '8.2',
|
|
|
|
|
|
|
|
|
|
// Extensions the application requires to function.
|
|
|
|
|
'required_extensions' => [
|
|
|
|
|
'ldap', // api/user_avatar.php — lldap avatar lookups
|
|
|
|
|
'mysqli', // helpers/Database.php — all data access
|
|
|
|
|
'curl', // helpers/NotificationHelper.php, SynapseHelper.php — Matrix
|
|
|
|
|
'mbstring', // multibyte string handling
|
|
|
|
|
'fileinfo', // api/upload_attachment.php — MIME validation
|
|
|
|
|
'json', // request/response encoding (bundled, but assert anyway)
|
|
|
|
|
],
|
2026-09-08 11:58:20 -04:00
|
|
|
|
|
|
|
|
// Sanity-check thresholds (warnings, not hard failures). A host with a low
|
|
|
|
|
// default memory_limit passes a bare extension/version check cleanly and
|
|
|
|
|
// only surfaces as a mysterious failure under real load — a large CSV
|
|
|
|
|
// export, an oversized dashboard query on a big install.
|
|
|
|
|
'min_memory_limit_mb' => 256,
|
|
|
|
|
'min_max_execution_time' => 30, // seconds; 0 (unlimited) always passes
|
2026-06-30 10:22:53 -04:00
|
|
|
];
|