Skip to content

Commit

Permalink
Update OCP
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI committed May 17, 2024
1 parent 8d404b2 commit 18d9133
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
22 changes: 22 additions & 0 deletions OCP/AppFramework/Bootstrap/IRegistrationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,26 @@ public function registerSetupCheck(string $setupCheckClass): void;
* @since 29.0.0
*/
public function registerDeclarativeSettings(string $declarativeSettingsClass): void;

/**
* Register an implementation of \OCP\TaskProcessing\IProvider that
* will handle the implementation of task processing
*
* @param string $taskProcessingProviderClass
* @psalm-param class-string<\OCP\TaskProcessing\IProvider> $taskProcessingProviderClass
* @return void
* @since 30.0.0
*/
public function registerTaskProcessingProvider(string $taskProcessingProviderClass): void;

/**
* Register an implementation of \OCP\TaskProcessing\ITaskType that
* will handle the implementation of a task processing type
*
* @param string $taskProcessingTaskTypeClass
* @psalm-param class-string<\OCP\TaskProcessing\ITaskType> $taskProcessingTaskTypeClass
* @return void
* @since 30.0.0
*/
public function registerTaskProcessingTaskType(string $taskProcessingTaskTypeClass): void;
}
2 changes: 1 addition & 1 deletion OCP/Files/Storage/IStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public function getWatcher();
*
* @param string|null $user Owner user id
* @return void
* @since 29.0.0
* @since 30.0.0
*/
public function setOwner(?string $user): void;
}
2 changes: 1 addition & 1 deletion OCP/Group/Backend/ABackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function implementsActions($actions): bool {
if ($this instanceof ICountUsersBackend) {
$implements |= GroupInterface::COUNT_USERS;
}
if ($this instanceof ICreateGroupBackend) {
if ($this instanceof ICreateGroupBackend || $this instanceof ICreateNamedGroupBackend) {
$implements |= GroupInterface::CREATE_GROUP;
}
if ($this instanceof IDeleteGroupBackend) {
Expand Down
1 change: 1 addition & 0 deletions OCP/Group/Backend/ICreateGroupBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

/**
* @since 14.0.0
* @deprecated 30.0.0 Use ICreateNamedGroupBackend instead
*/
interface ICreateGroupBackend {
/**
Expand Down
43 changes: 43 additions & 0 deletions OCP/Group/Backend/ICreateNamedGroupBackend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

declare(strict_types=1);

/**
* @copyright Copyright (c) 2024 Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
*
* @author Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Group\Backend;

/**
* @since 30.0.0
*/
interface ICreateNamedGroupBackend {
/**
* Tries to create a group from its name.
*
* If group name already exists, null is returned.
* Otherwise, new group ID is returned.
*
* @param string $name Group name
* @return ?string Group ID in case of success, null in case of failure
* @since 30.0.0
*/
public function createGroup(string $name): ?string;
}

0 comments on commit 18d9133

Please sign in to comment.