Restructure Storage to new paradigm

This commit is contained in:
Philipp
2021-10-23 12:11:38 +02:00
parent 24f8ee8e67
commit 2ab0d06996
29 changed files with 229 additions and 199 deletions

View File

@@ -41,6 +41,7 @@
*/
use Friendica\Core\Logger;
use Friendica\Core\Storage\Capability\ICanReadFromStorage;
use Friendica\Core\Update;
use Friendica\Core\Worker;
use Friendica\Database\Database;
@@ -54,7 +55,6 @@ use Friendica\Model\Notification;
use Friendica\Model\Photo;
use Friendica\Model\Post;
use Friendica\Model\Profile;
use Friendica\Model\Storage;
use Friendica\Security\PermissionSet\Repository\PermissionSet;
use Friendica\Worker\Delivery;
@@ -183,7 +183,7 @@ function update_1330()
// set the name of the storage instead of the classpath as config
if (!empty($currStorage)) {
/** @var Storage\IStorage $currStorage */
/** @var ICanReadFromStorage $currStorage */
if (!DI::config()->set('storage', 'name', $currStorage::getName())) {
return Update::FAILED;
}
@@ -989,7 +989,7 @@ function update_1434()
// in case of an empty config, set "Database" as default storage backend
if (empty($name)) {
DI::config()->set('storage', 'name', Storage\Database::getName());
DI::config()->set('storage', 'name', \Friendica\Core\Storage\Type\Database::getName());
}
// In case of a Using deprecated storage class value, set the right name for it