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 303fbbf9..0fd60eac 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 b6b1cfd3..40dac01f 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 e83388dd..bee13a1a 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 8ea183db..aff09df1 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 eb774d5d..ba22e089 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 5a0a854b..dddd226b 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 1043c4d8..db12976c 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 a62aab11..88f7b0ff 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 bee13a1a..4f14c597 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 3a8898b4..89bc2821 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 b23bc298..10693b7b 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 a29c6d7c..aaa72971 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 0d53db39..1139f402 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 df7d3c5f..6426d3c3 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 e9c9d259..7ea5618b 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 aff09df1..eb12728f 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 ba22e089..1b6c8e09 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 dddd226b..26fec48b 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 db12976c..212c66d5 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 88f7b0ff..5e31ea9d 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 aa14d98a..abdb9549 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 4f14c597..d6b2307f 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 89bc2821..72113e0a 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 10693b7b..071fd337 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 aaa72971..0c370981 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 1139f402..3c3938f7 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 b3abcd50..1ee41ad5 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 6426d3c3..58bcd886 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 7ea5618b..ef64e1a2 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 c2f235d4..f1a0aa4a 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;