aboutsummaryrefslogtreecommitdiff
path: root/lib/Configuration.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2024-08-30 02:29:51 +0200
committerGravatar GitHub <noreply@github.com> 2024-08-30 02:29:51 +0200
commit3e1a8b29d95fe7fc0120e813ab623720ae056b8b (patch)
tree5b2ffa3210374942c756489d04799764e9c92278 /lib/Configuration.php
parent9f48370eb0fd5aba832b9db9eb9b1bc8915f5417 (diff)
downloadrss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.tar.gz
rss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.tar.zst
rss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.zip
fix: extract duplicate config loading (#4242)
Also fix a problem with bin/cache-prune and FileCache and its enable_purge option
Diffstat (limited to 'lib/Configuration.php')
-rw-r--r--lib/Configuration.php42
1 files changed, 4 insertions, 38 deletions
diff --git a/lib/Configuration.php b/lib/Configuration.php
index b104a251..44fd3612 100644
--- a/lib/Configuration.php
+++ b/lib/Configuration.php
@@ -15,43 +15,6 @@ final class Configuration
{
}
- public static function checkInstallation(): array
- {
- $errors = [];
-
- // OpenSSL: https://www.php.net/manual/en/book.openssl.php
- if (!extension_loaded('openssl')) {
- $errors[] = 'openssl extension not loaded';
- }
-
- // libxml: https://www.php.net/manual/en/book.libxml.php
- if (!extension_loaded('libxml')) {
- $errors[] = 'libxml extension not loaded';
- }
-
- // Multibyte String (mbstring): https://www.php.net/manual/en/book.mbstring.php
- if (!extension_loaded('mbstring')) {
- $errors[] = 'mbstring extension not loaded';
- }
-
- // SimpleXML: https://www.php.net/manual/en/book.simplexml.php
- if (!extension_loaded('simplexml')) {
- $errors[] = 'simplexml extension not loaded';
- }
-
- // Client URL Library (curl): https://www.php.net/manual/en/book.curl.php
- // Allow RSS-Bridge to run without curl module in CLI mode without root certificates
- if (!extension_loaded('curl') && !(php_sapi_name() === 'cli' && empty(ini_get('curl.cainfo')))) {
- $errors[] = 'curl extension not loaded';
- }
-
- // JavaScript Object Notation (json): https://www.php.net/manual/en/book.json.php
- if (!extension_loaded('json')) {
- $errors[] = 'json extension not loaded';
- }
- return $errors;
- }
-
public static function loadConfiguration(array $customConfig = [], array $env = [])
{
if (!file_exists(__DIR__ . '/../config.default.ini.php')) {
@@ -204,7 +167,10 @@ final class Configuration
return self::$config[strtolower($section)][strtolower($key)] ?? $default;
}
- private static function setConfig(string $section, string $key, $value): void
+ /**
+ * @internal Please avoid usage
+ */
+ public static function setConfig(string $section, string $key, $value): void
{
self::$config[strtolower($section)][strtolower($key)] = $value;
}
on value='jarred/zlib'>jarred/zlib Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/which.zig (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-01-02[internal] allow using zig from more directoriesGravatar Jarred Sumner 1-5/+34
2023-01-02fix double `resolve()` in test (#1707)Gravatar Alex Lam S.L 1-6/+6
2023-01-02Support any `ArrayBufferView` in StringDecoderGravatar Jarred Sumner 2-12/+22
2023-01-02implement `net.Socket` (#1701)Gravatar Alex Lam S.L 3-3/+432
2023-01-02Make the error message for unsupported dependency type a little clearerGravatar Jarred Sumner 1-1/+1