From 2d3c2b4ee9d6e9df1b09ae5c4e4df1d37fa51365 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 23 Oct 2021 10:49:26 +0200 Subject: [PATCH 1/3] Restructure Cache to follow new paradigm --- curweather/curweather.php | 2 +- mastodoncustomemojis/mastodoncustomemojis.php | 2 +- openstreetmap/openstreetmap.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 303fbbf94..0fd60eac2 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -10,7 +10,7 @@ */ use Friendica\App; -use Friendica\Core\Cache\Duration; +use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\Core\Session; diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index b6b1cfd3c..40dac01f0 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -11,7 +11,7 @@ use Friendica\App; use Friendica\Content\Smilies; -use Friendica\Core\Cache\Duration; +use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Hook; use Friendica\Core\Protocol; use Friendica\DI; diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index e83388dd1..bee13a1a3 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -9,7 +9,7 @@ * */ -use Friendica\Core\Cache\Duration; +use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; From ae86b2e806699634b55def1d48b40de747e53982 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 23 Oct 2021 11:29:15 +0200 Subject: [PATCH 2/3] Restructure (P)Config to follow new paradigm --- geonames/geonames.php | 2 +- gravatar/gravatar.php | 2 +- impressum/impressum.php | 2 +- ldapauth/ldapauth.php | 2 +- libravatar/libravatar.php | 2 +- openstreetmap/openstreetmap.php | 2 +- phpmailer/phpmailer.php | 2 +- piwik/piwik.php | 2 +- public_server/public_server.php | 2 +- pumpio/pumpio.php | 2 +- testdrive/testdrive.php | 2 +- twitter/twitter.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/geonames/geonames.php b/geonames/geonames.php index 8ea183db0..aff09df1f 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -11,7 +11,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\XML; function geonames_install() diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index eb774d5d1..ba22e0894 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -13,7 +13,7 @@ use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\Strings; /** diff --git a/impressum/impressum.php b/impressum/impressum.php index 5a0a854b2..dddd226b1 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -12,7 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index 1043c4d87..db12976c2 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -59,7 +59,7 @@ use Friendica\Core\Logger; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\User; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; function ldapauth_install() { diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index a62aab11d..88f7b0ff5 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -12,7 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\Strings; /** diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index bee13a1a3..4f14c597f 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -14,7 +14,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\Strings; const OSM_TMS = 'https://www.openstreetmap.org'; diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 3a8898b41..89bc2821e 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -11,7 +11,7 @@ use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Object\EMail\IEmail; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; diff --git a/piwik/piwik.php b/piwik/piwik.php index b23bc2983..10693b7b3 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -35,7 +35,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\Strings; function piwik_install() { diff --git a/public_server/public_server.php b/public_server/public_server.php index a29c6d7c4..aaa729712 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -15,7 +15,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 0d53db39f..1139f4026 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -24,7 +24,7 @@ use Friendica\Model\User; use Friendica\Network\HTTPClientOptions; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityNamespace; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; use Friendica\Util\XML; diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index df7d3c5fc..6426d3c34 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -13,7 +13,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\DateTimeFormat; function testdrive_install() { diff --git a/twitter/twitter.php b/twitter/twitter.php index e9c9d2597..7ea5618bf 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -84,7 +84,7 @@ use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; use Friendica\Protocol\Activity; -use Friendica\Util\ConfigFileLoader; +use Friendica\Core\Config\Cache\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Images; use Friendica\Util\Strings; From 63fca0af29909286f0b2d59a46e9afb82486e7db Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 26 Oct 2021 21:44:28 +0200 Subject: [PATCH 3/3] Refactoring Core class structures ... --- geonames/geonames.php | 2 +- gravatar/gravatar.php | 2 +- impressum/impressum.php | 2 +- ldapauth/ldapauth.php | 2 +- libravatar/libravatar.php | 2 +- notifyall/NotifyAllEmail.php | 4 ++-- openstreetmap/openstreetmap.php | 2 +- phpmailer/phpmailer.php | 2 +- piwik/piwik.php | 2 +- public_server/public_server.php | 2 +- pumpio/pumpio.php | 2 +- securemail/SecureTestEmail.php | 6 +++--- testdrive/testdrive.php | 2 +- twitter/twitter.php | 2 +- webdav_storage/src/WebDavConfig.php | 6 +++--- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/geonames/geonames.php b/geonames/geonames.php index aff09df1f..eb12728f0 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -11,7 +11,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\XML; function geonames_install() diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index ba22e0894..1b6c8e092 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -13,7 +13,7 @@ use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\Strings; /** diff --git a/impressum/impressum.php b/impressum/impressum.php index dddd226b1..26fec48bd 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -12,7 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index db12976c2..212c66d59 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -59,7 +59,7 @@ use Friendica\Core\Logger; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\User; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; function ldapauth_install() { diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 88f7b0ff5..5e31ea9dd 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -12,7 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\Strings; /** diff --git a/notifyall/NotifyAllEmail.php b/notifyall/NotifyAllEmail.php index aa14d98a1..abdb95496 100644 --- a/notifyall/NotifyAllEmail.php +++ b/notifyall/NotifyAllEmail.php @@ -23,7 +23,7 @@ namespace Friendica\Addon\notifyall; use Friendica\App\BaseURL; use Friendica\Content\Text\BBCode; -use Friendica\Core\Config\IConfig; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Object\Email; @@ -32,7 +32,7 @@ use Friendica\Object\Email; */ class NotifyAllEmail extends Email { - public function __construct(L10n $l10n, IConfig $config, BaseURL $baseUrl, string $text) + public function __construct(L10n $l10n, IManageConfigValues $config, BaseURL $baseUrl, string $text) { $sitename = $config->get('config', 'sitename'); diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 4f14c597f..d6b2307f4 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -14,7 +14,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\Strings; const OSM_TMS = 'https://www.openstreetmap.org'; diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 89bc2821e..72113e0ac 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -11,7 +11,7 @@ use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Object\EMail\IEmail; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; diff --git a/piwik/piwik.php b/piwik/piwik.php index 10693b7b3..071fd3373 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -35,7 +35,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\Strings; function piwik_install() { diff --git a/public_server/public_server.php b/public_server/public_server.php index aaa729712..0c3709810 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -15,7 +15,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 1139f4026..3c3938f75 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -24,7 +24,7 @@ use Friendica\Model\User; use Friendica\Network\HTTPClientOptions; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityNamespace; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; use Friendica\Util\XML; diff --git a/securemail/SecureTestEmail.php b/securemail/SecureTestEmail.php index b3abcd509..1ee41ad53 100644 --- a/securemail/SecureTestEmail.php +++ b/securemail/SecureTestEmail.php @@ -23,8 +23,8 @@ namespace Friendica\Addon\securemail; use Friendica\App; use Friendica\App\BaseURL; -use Friendica\Core\Config\IConfig; -use Friendica\Core\PConfig\IPConfig; +use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Model\User; use Friendica\Object\Email; @@ -33,7 +33,7 @@ use Friendica\Object\Email; */ class SecureTestEmail extends Email { - public function __construct(App $a, IConfig $config, IPConfig $pConfig, BaseURL $baseUrl) + public function __construct(App $a, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, BaseURL $baseUrl) { $sitename = $config->get('config', 'sitename'); diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index 6426d3c34..58bcd8869 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -13,7 +13,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\DateTimeFormat; function testdrive_install() { diff --git a/twitter/twitter.php b/twitter/twitter.php index 7ea5618bf..ef64e1a2d 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -84,7 +84,7 @@ use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; use Friendica\Protocol\Activity; -use Friendica\Core\Config\Cache\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileLoader; use Friendica\Util\DateTimeFormat; use Friendica\Util\Images; use Friendica\Util\Strings; diff --git a/webdav_storage/src/WebDavConfig.php b/webdav_storage/src/WebDavConfig.php index c2f235d4c..f1a0aa4af 100644 --- a/webdav_storage/src/WebDavConfig.php +++ b/webdav_storage/src/WebDavConfig.php @@ -2,7 +2,7 @@ namespace Friendica\Addon\webdav_storage\src; -use Friendica\Core\Config\IConfig; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Model\Storage\IStorageConfiguration; use Friendica\Network\HTTPClientOptions; @@ -18,7 +18,7 @@ class WebDavConfig implements IStorageConfiguration /** @var L10n */ private $l10n; - /** @var IConfig */ + /** @var IManageConfigValues */ private $config; /** @var string */ @@ -46,7 +46,7 @@ class WebDavConfig implements IStorageConfiguration return $this->authOptions; } - public function __construct(L10n $l10n, IConfig $config, IHTTPClient $client) + public function __construct(L10n $l10n, IManageConfigValues $config, IHTTPClient $client) { $this->l10n = $l10n; $this->config = $config;