Merge pull request #6661 from nextcloud/feature/remove-deprecated-method

Replace deprecated method
This commit is contained in:
Joas Schilling 2021-12-07 10:40:52 +01:00 коммит произвёл GitHub
Родитель d850e148fe f83800913b
Коммит a60ff07c63
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
19 изменённых файлов: 106 добавлений и 99 удалений

31
composer.lock сгенерированный
Просмотреть файл

@ -179,12 +179,12 @@
"source": {
"type": "git",
"url": "https://github.com/ChristophWurst/nextcloud_composer.git",
"reference": "9b0f84c976df7e9548037762dabc628b4372fe9d"
"reference": "bf812e213fd1e967c9ce71954156d2059acd63dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/9b0f84c976df7e9548037762dabc628b4372fe9d",
"reference": "9b0f84c976df7e9548037762dabc628b4372fe9d",
"url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/bf812e213fd1e967c9ce71954156d2059acd63dc",
"reference": "bf812e213fd1e967c9ce71954156d2059acd63dc",
"shasum": ""
},
"require": {
@ -197,7 +197,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "23.0.0-dev"
"dev-master": "24.0.0-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -215,7 +215,7 @@
"issues": "https://github.com/ChristophWurst/nextcloud_composer/issues",
"source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master"
},
"time": "2021-10-29T01:05:06+00:00"
"time": "2021-12-03T01:08:42+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -2901,16 +2901,16 @@
},
{
"name": "vimeo/psalm",
"version": "4.10.0",
"version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa"
"reference": "14dcbc908ab2625cd7a74258ee6c740cbecc6140"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/916b098b008f6de4543892b1e0651c1c3b92cbfa",
"reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/14dcbc908ab2625cd7a74258ee6c740cbecc6140",
"reference": "14dcbc908ab2625cd7a74258ee6c740cbecc6140",
"shasum": ""
},
"require": {
@ -2930,11 +2930,11 @@
"felixfbecker/advanced-json-rpc": "^3.0.3",
"felixfbecker/language-server-protocol": "^1.5",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^4.12",
"nikic/php-parser": "^4.13",
"openlss/lib-array2xml": "^1.0",
"php": "^7.1|^8",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0",
"webmozart/path-util": "^2.3"
},
"provide": {
@ -2952,11 +2952,12 @@
"psalm/plugin-phpunit": "^0.16",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/process": "^4.3 || ^5.0",
"symfony/process": "^4.3 || ^5.0 || ^6.0",
"weirdan/prophecy-shim": "^1.0 || ^2.0"
},
"suggest": {
"ext-igbinary": "^2.0.5"
"ext-curl": "In order to send data to shepherd",
"ext-igbinary": "^2.0.5 is required, used to serialize caching data"
},
"bin": [
"psalm",
@ -3000,9 +3001,9 @@
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/4.10.0"
"source": "https://github.com/vimeo/psalm/tree/v4.14.0"
},
"time": "2021-09-04T21:00:09+00:00"
"time": "2021-12-04T17:49:24+00:00"
},
{
"name": "webmozart/assert",

Просмотреть файл

@ -76,21 +76,21 @@ class Listener {
public static function register(IEventDispatcher $dispatcher): void {
$listener = static function (ModifyParticipantEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->setActive($event->getRoom(), $event->getParticipant());
};
$dispatcher->addListener(Room::EVENT_AFTER_SESSION_JOIN_CALL, $listener);
$listener = static function (ModifyRoomEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->generateCallActivity($event->getRoom(), true, $event->getActor());
};
$dispatcher->addListener(Room::EVENT_BEFORE_END_CALL_FOR_EVERYONE, $listener);
$listener = static function (RoomEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->generateCallActivity($event->getRoom());
};
$dispatcher->addListener(Room::EVENT_AFTER_PARTICIPANT_REMOVE, $listener);
@ -100,7 +100,7 @@ class Listener {
$listener = static function (AddParticipantsEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->generateInvitationActivity($event->getRoom(), $event->getParticipants());
};
$dispatcher->addListener(Room::EVENT_AFTER_USERS_ADD, $listener);

Просмотреть файл

@ -150,7 +150,7 @@ class Application extends App implements IBootstrap {
$this->registerNavigationLink($server);
/** @var IEventDispatcher $dispatcher */
$dispatcher = $server->query(IEventDispatcher::class);
$dispatcher = $server->get(IEventDispatcher::class);
ActivityListener::register($dispatcher);
NotificationListener::register($dispatcher);
@ -181,7 +181,7 @@ class Application extends App implements IBootstrap {
protected function registerCollaborationResourceProvider(IServerContainer $server): void {
/** @var IProviderManager $resourceManager */
$resourceManager = $server->query(IProviderManager::class);
$resourceManager = $server->get(IProviderManager::class);
$resourceManager->registerResourceProvider(ConversationProvider::class);
$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
\OCP\Util::addScript(self::APP_ID, 'talk-collections');
@ -199,7 +199,7 @@ class Application extends App implements IBootstrap {
protected function registerNavigationLink(IServerContainer $server): void {
$server->getNavigationManager()->add(function () use ($server) {
/** @var Config $config */
$config = $server->query(Config::class);
$config = $server->get(Config::class);
$user = $server->getUserSession()->getUser();
return [
'id' => self::APP_ID,

Просмотреть файл

@ -33,7 +33,7 @@ class Listener {
$userId = $event->getUserId();
/** @var Listener $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->preGetRooms($userId);
}, -100);
}

Просмотреть файл

@ -49,7 +49,7 @@ class Listener {
$participant = $event->getParticipant();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
if (strpos($message->getMessage(), '//') === 0) {
return;

Просмотреть файл

@ -38,7 +38,7 @@ class Listener {
}
/** @var UserMention $parser */
$parser = \OC::$server->query(UserMention::class);
$parser = \OC::$server->get(UserMention::class);
$parser->parseMessage($message);
}, -100);
@ -50,7 +50,7 @@ class Listener {
}
/** @var Changelog $parser */
$parser = \OC::$server->query(Changelog::class);
$parser = \OC::$server->get(Changelog::class);
try {
$parser->parseMessage($message);
$event->stopPropagation();
@ -67,7 +67,7 @@ class Listener {
}
/** @var SystemMessage $parser */
$parser = \OC::$server->query(SystemMessage::class);
$parser = \OC::$server->get(SystemMessage::class);
try {
$parser->parseMessage($message);
@ -85,7 +85,7 @@ class Listener {
}
/** @var CommandParser $parser */
$parser = \OC::$server->query(CommandParser::class);
$parser = \OC::$server->get(CommandParser::class);
try {
$parser->parseMessage($chatMessage);
@ -105,7 +105,7 @@ class Listener {
}
/** @var SystemMessage $parser */
$parser = \OC::$server->query(SystemMessage::class);
$parser = \OC::$server->get(SystemMessage::class);
try {
$parser->parseDeletedMessage($chatMessage);

Просмотреть файл

@ -86,9 +86,9 @@ class Listener implements IEventListener {
$dispatcher->addListener(Room::EVENT_BEFORE_SESSION_JOIN_CALL, static function (ModifyParticipantEvent $event) {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
/** @var ParticipantService $participantService */
$participantService = \OC::$server->query(ParticipantService::class);
$participantService = \OC::$server->get(ParticipantService::class);
if ($participantService->hasActiveSessionsInCall($room)) {
$listener->sendSystemMessage($room, 'call_joined', [], $event->getParticipant());
@ -115,7 +115,7 @@ class Listener implements IEventListener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'call_left', [], $event->getParticipant());
});
@ -123,7 +123,7 @@ class Listener implements IEventListener {
$dispatcher->addListener(Room::EVENT_AFTER_ROOM_CREATE, static function (RoomEvent $event) {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'conversation_created');
});
@ -135,7 +135,7 @@ class Listener implements IEventListener {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'conversation_renamed', [
'newName' => $event->getNewValue(),
@ -158,7 +158,7 @@ class Listener implements IEventListener {
$dispatcher->addListener(Room::EVENT_AFTER_PASSWORD_SET, static function (ModifyRoomEvent $event) {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
if ($event->getNewValue() !== '') {
$listener->sendSystemMessage($room, 'password_set');
@ -175,11 +175,11 @@ class Listener implements IEventListener {
if ($event->getNewValue() === Room::TYPE_PUBLIC) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'guests_allowed');
} elseif ($event->getNewValue() === Room::TYPE_GROUP) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'guests_disallowed');
}
});
@ -191,7 +191,7 @@ class Listener implements IEventListener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
if ($event->getNewValue() === Room::READ_ONLY) {
$listener->sendSystemMessage($room, 'read_only');
@ -203,7 +203,7 @@ class Listener implements IEventListener {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
if ($event->getNewValue() === Room::LISTABLE_NONE) {
$listener->sendSystemMessage($room, 'listable_none');
@ -221,7 +221,7 @@ class Listener implements IEventListener {
$room = $event->getRoom();
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
if ($event->isTimerReached()) {
$listener->sendSystemMessage($room, 'lobby_timer_reached');
@ -239,7 +239,7 @@ class Listener implements IEventListener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$participants = $event->getParticipants();
@ -281,7 +281,7 @@ class Listener implements IEventListener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'user_removed', ['user' => $event->getUser()->getUID()]);
});
$dispatcher->addListener(Room::EVENT_AFTER_PARTICIPANT_TYPE_SET, static function (ModifyParticipantEvent $event) {
@ -294,25 +294,25 @@ class Listener implements IEventListener {
if ($event->getNewValue() === Participant::MODERATOR) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'moderator_promoted', ['user' => $attendee->getActorId()]);
} elseif ($event->getNewValue() === Participant::USER) {
if ($event->getOldValue() === Participant::USER_SELF_JOINED) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'user_added', ['user' => $attendee->getActorId()]);
} else {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'moderator_demoted', ['user' => $attendee->getActorId()]);
}
} elseif ($event->getNewValue() === Participant::GUEST_MODERATOR) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'guest_moderator_promoted', ['session' => $attendee->getActorId()]);
} elseif ($event->getNewValue() === Participant::GUEST) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendSystemMessage($room, 'guest_moderator_demoted', ['session' => $attendee->getActorId()]);
}
});
@ -325,10 +325,10 @@ class Listener implements IEventListener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
/** @var Manager $manager */
$manager = \OC::$server->query(Manager::class);
$manager = \OC::$server->get(Manager::class);
$room = $manager->getRoomByToken($share->getSharedWith());
$metaData = \OC::$server->getRequest()->getParam('talkMetaData') ?? '';

Просмотреть файл

@ -40,7 +40,7 @@ class Listener {
$listener = static function (RoomEvent $event): void {
$room = $event->getRoom();
/** @var IManager $manager */
$resourceManager = \OC::$server->query(IManager::class);
$resourceManager = \OC::$server->get(IManager::class);
try {
$resource = $resourceManager->getResourceForUser('room', $room->getToken(), null);
@ -54,7 +54,7 @@ class Listener {
$listener = static function (AddParticipantsEvent $event): void {
$room = $event->getRoom();
/** @var IManager $manager */
$resourceManager = \OC::$server->query(IManager::class);
$resourceManager = \OC::$server->get(IManager::class);
/** @var IUserManager $userManager */
$userManager = \OC::$server->getUserManager();
try {
@ -78,7 +78,7 @@ class Listener {
$listener = static function (RemoveUserEvent $event): void {
$room = $event->getRoom();
/** @var IManager $manager */
$resourceManager = \OC::$server->query(IManager::class);
$resourceManager = \OC::$server->get(IManager::class);
try {
$resource = $resourceManager->getResourceForUser('room', $room->getToken(), null);
} catch (ResourceException $e) {
@ -92,7 +92,7 @@ class Listener {
$listener = static function (RemoveParticipantEvent $event): void {
$room = $event->getRoom();
/** @var IManager $manager */
$resourceManager = \OC::$server->query(IManager::class);
$resourceManager = \OC::$server->get(IManager::class);
/** @var IUserManager $userManager */
$userManager = \OC::$server->getUserManager();
try {
@ -113,7 +113,7 @@ class Listener {
$listener = static function (RoomEvent $event): void {
$room = $event->getRoom();
/** @var IManager $manager */
$resourceManager = \OC::$server->query(IManager::class);
$resourceManager = \OC::$server->get(IManager::class);
try {
$resource = $resourceManager->getResourceForUser('room', $room->getToken(), null);

Просмотреть файл

@ -75,7 +75,7 @@ class Listener {
public static function register(IEventDispatcher $dispatcher): void {
$listener = static function (JoinRoomUserEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
try {
$listener->preventUsersWithoutAccessToTheFileFromJoining($event->getRoom(), $event->getUser()->getUID());
@ -88,7 +88,7 @@ class Listener {
$listener = static function (JoinRoomGuestEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
try {
$listener->preventGuestsFromJoiningIfNotPubliclyAccessible($event->getRoom());

Просмотреть файл

@ -47,7 +47,7 @@ class RestrictStartingCalls {
public static function register(IEventDispatcher $dispatcher): void {
$dispatcher->addListener(Room::EVENT_BEFORE_SESSION_JOIN_CALL, static function (ModifyParticipantEvent $event) {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->checkStartCallPermissions($event);
}, 1000);
}

Просмотреть файл

@ -77,35 +77,35 @@ class Listener {
}
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->generateInvitation($room, $event->getParticipants());
};
$dispatcher->addListener(Room::EVENT_AFTER_USERS_ADD, $listener);
$listener = static function (JoinRoomUserEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->markInvitationRead($event->getRoom());
};
$dispatcher->addListener(Room::EVENT_AFTER_ROOM_CONNECT, $listener);
$listener = static function (RoomEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->checkCallNotifications($event->getRoom());
};
$dispatcher->addListener(Room::EVENT_BEFORE_SESSION_JOIN_CALL, $listener);
$listener = static function (RoomEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->sendCallNotifications($event->getRoom());
};
$dispatcher->addListener(Room::EVENT_AFTER_SESSION_JOIN_CALL, $listener);
$listener = static function (RoomEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->markCallNotificationsRead($event->getRoom());
};
$dispatcher->addListener(Room::EVENT_AFTER_SESSION_JOIN_CALL, $listener);

Просмотреть файл

@ -41,13 +41,13 @@ class Listener {
public static function listenPreShare(GenericEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->overwriteShareTarget($event);
}
public static function listenVerifyMountPointEvent(VerifyMountPointEvent $event): void {
/** @var self $listener */
$listener = \OC::$server->query(self::class);
$listener = \OC::$server->get(self::class);
$listener->overwriteMountPoint($event);
}

Просмотреть файл

@ -120,7 +120,7 @@ class RoomShareProvider implements IShareProvider {
if ($event->getParticipant()->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED) {
/** @var self $roomShareProvider */
$roomShareProvider = \OC::$server->query(self::class);
$roomShareProvider = \OC::$server->get(self::class);
$roomShareProvider->deleteInRoom($room->getToken(), $event->getParticipant()->getAttendee()->getActorId());
}
};
@ -130,7 +130,7 @@ class RoomShareProvider implements IShareProvider {
$room = $event->getRoom();
/** @var self $roomShareProvider */
$roomShareProvider = \OC::$server->query(self::class);
$roomShareProvider = \OC::$server->get(self::class);
$roomShareProvider->deleteInRoom($room->getToken(), $event->getUser()->getUID());
};
$dispatcher->addListener(Room::EVENT_AFTER_USER_REMOVE, $listener);
@ -139,7 +139,7 @@ class RoomShareProvider implements IShareProvider {
$room = $event->getRoom();
/** @var self $roomShareProvider */
$roomShareProvider = \OC::$server->query(self::class);
$roomShareProvider = \OC::$server->get(self::class);
$roomShareProvider->deleteInRoom($room->getToken());
};
$dispatcher->addListener(Room::EVENT_AFTER_ROOM_DELETE, $listener);

Просмотреть файл

@ -48,7 +48,7 @@ class Listener {
protected static function isUsingInternalSignaling(): bool {
/** @var Config $config */
$config = \OC::$server->query(Config::class);
$config = \OC::$server->get(Config::class);
return $config->getSignalingMode() === Config::SIGNALING_INTERNAL;
}
@ -59,7 +59,7 @@ class Listener {
}
/** @var Messages $messages */
$messages = \OC::$server->query(Messages::class);
$messages = \OC::$server->get(Messages::class);
$messages->addMessageForAllParticipants($event->getRoom(), 'refresh-participant-list');
};
$dispatcher->addListener(Room::EVENT_AFTER_ROOM_CONNECT, $listener);
@ -77,7 +77,7 @@ class Listener {
$room = $event->getRoom();
/** @var Messages $messages */
$messages = \OC::$server->query(Messages::class);
$messages = \OC::$server->get(Messages::class);
$messages->addMessageForAllParticipants($room, 'refresh-participant-list');
};
$dispatcher->addListener(Room::EVENT_BEFORE_USER_REMOVE, $listener);
@ -92,7 +92,7 @@ class Listener {
}
/** @var Messages $messages */
$messages = \OC::$server->query(Messages::class);
$messages = \OC::$server->get(Messages::class);
$messages->addMessageForAllParticipants($room, 'refresh-participant-list');
};
$dispatcher->addListener(Room::EVENT_BEFORE_ROOM_DELETE, $listener);
@ -105,7 +105,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$notifier->roomInvited($event->getRoom(), $event->getParticipants());
});
@ -115,7 +115,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$notifier->roomModified($event->getRoom());
};
@ -138,7 +138,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$sessionIds = [];
// If the participant is not active in the room the "participants"
@ -146,7 +146,7 @@ class Listener {
// property.
/** @var SessionService $sessionService */
$sessionService = \OC::$server->query(SessionService::class);
$sessionService = \OC::$server->get(SessionService::class);
$sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee());
foreach ($sessions as $session) {
$sessionIds[] = $session->getSessionId();
@ -163,9 +163,9 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
/** @var ParticipantService $participantService */
$participantService = \OC::$server->query(ParticipantService::class);
$participantService = \OC::$server->get(ParticipantService::class);
$room = $event->getRoom();
$notifier->roomDeleted($room, $participantService->getParticipantUserIds($room));
@ -176,7 +176,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$notifier->roomsDisinvited($event->getRoom(), [$event->getUser()->getUID()]);
});
@ -186,12 +186,12 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$sessionIds = [];
/** @var SessionService $sessionService */
$sessionService = \OC::$server->query(SessionService::class);
$sessionService = \OC::$server->get(SessionService::class);
$sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee());
foreach ($sessions as $session) {
$sessionIds[] = $session->getSessionId();
@ -212,7 +212,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$sessionIds = [];
if ($event->getParticipant()->getSession()) {
@ -227,12 +227,12 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$sessionIds = [];
/** @var SessionService $sessionService */
$sessionService = \OC::$server->query(SessionService::class);
$sessionService = \OC::$server->get(SessionService::class);
$sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee());
foreach ($sessions as $session) {
$sessionIds[] = $session->getSessionId();
@ -256,7 +256,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
// TODO: The list of removed session ids should be passed through the event
// so the signaling server can optimize forwarding the message.
@ -269,12 +269,12 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$sessionIds = [];
/** @var SessionService $sessionService */
$sessionService = \OC::$server->query(SessionService::class);
$sessionService = \OC::$server->get(SessionService::class);
$sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee());
foreach ($sessions as $session) {
$sessionIds[] = $session->getSessionId();
@ -290,7 +290,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$room = $event->getRoom();
$message = [
@ -307,7 +307,7 @@ class Listener {
}
/** @var BackendNotifier $notifier */
$notifier = \OC::$server->query(BackendNotifier::class);
$notifier = \OC::$server->get(BackendNotifier::class);
$room = $event->getRoom();
$message = [

Просмотреть файл

@ -37,7 +37,7 @@ class SettingTest extends TestCase {
* @param string $settingClass
*/
public function testImplementsInterface($settingClass) {
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertInstanceOf(ISetting::class, $setting);
}
@ -47,7 +47,7 @@ class SettingTest extends TestCase {
*/
public function testGetIdentifier($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsString($setting->getIdentifier());
}
@ -57,7 +57,7 @@ class SettingTest extends TestCase {
*/
public function testGetName($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsString($setting->getName());
}
@ -67,7 +67,7 @@ class SettingTest extends TestCase {
*/
public function testGetPriority($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$priority = $setting->getPriority();
$this->assertIsInt($setting->getPriority());
$this->assertGreaterThanOrEqual(0, $priority);
@ -80,7 +80,7 @@ class SettingTest extends TestCase {
*/
public function testCanChangeStream($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsBool($setting->canChangeStream());
}
@ -90,7 +90,7 @@ class SettingTest extends TestCase {
*/
public function testIsDefaultEnabledStream($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsBool($setting->isDefaultEnabledStream());
}
@ -100,7 +100,7 @@ class SettingTest extends TestCase {
*/
public function testCanChangeMail($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsBool($setting->canChangeMail());
}
@ -110,7 +110,7 @@ class SettingTest extends TestCase {
*/
public function testIsDefaultEnabledMail($settingClass) {
/** @var ISetting $setting */
$setting = \OC::$server->query($settingClass);
$setting = \OC::$server->get($settingClass);
$this->assertIsBool($setting->isDefaultEnabledMail());
}
}

Просмотреть файл

@ -237,7 +237,7 @@ class ConfigTest extends TestCase {
$secureRandom = $this->createMock(ISecureRandom::class);
/** @var IEventDispatcher $dispatcher */
$dispatcher = \OC::$server->query(IEventDispatcher::class);
$dispatcher = \OC::$server->get(IEventDispatcher::class);
$servers = [
[

Просмотреть файл

@ -116,7 +116,7 @@ class SignalingControllerTest extends \Test\TestCase {
]));
$config->setAppValue('spreed', 'signaling_ticket_secret', 'the-app-ticket-secret');
$config->setUserValue($this->userId, 'spreed', 'signaling_ticket_secret', 'the-user-ticket-secret');
$this->dispatcher = \OC::$server->query(IEventDispatcher::class);
$this->dispatcher = \OC::$server->get(IEventDispatcher::class);
$this->config = new Config($config, $this->secureRandom, $groupManager, $timeFactory, $this->dispatcher);
$this->session = $this->createMock(TalkSession::class);
$this->dbConnection = \OC::$server->getDatabaseConnection();

Просмотреть файл

@ -132,7 +132,7 @@ class BackendNotifierTest extends \Test\TestCase {
->method('getSignalingServerForConversation')
->willReturn(['server' => $this->baseUrl]);
$this->dispatcher = \OC::$server->query(IEventDispatcher::class);
$this->dispatcher = \OC::$server->get(IEventDispatcher::class);
$this->config = new Config($config, $this->secureRandom, $groupManager, $this->timeFactory, $this->dispatcher);
$this->recreateBackendNotifier();

Просмотреть файл

@ -204,6 +204,9 @@
<code>IRootFolder</code>
<code>IRootFolder</code>
</MissingDependency>
<InvalidArgument occurrences="1">
<code>SharedStorage::class</code>
</InvalidArgument>
</file>
<file src="lib/Controller/SignalingController.php">
<UndefinedClass occurrences="1">
@ -242,6 +245,9 @@
<code>ShareNotFound</code>
<code>ShareNotFound</code>
</MissingDependency>
<InvalidArgument occurrences="1">
<code>SharedStorage::class</code>
</InvalidArgument>
</file>
<file src="lib/MatterbridgeManager.php">
<UndefinedClass occurrences="3">