Merge pull request #21891 from nextcloud/techdebt/undeprecate-iappcontainer-iservercontainer

Undeprecate IAppContainer and IServerContainer
This commit is contained in:
Morris Jobke 2020-07-19 22:16:59 +02:00 committed by GitHub
commit a1a1349977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 19 deletions

View File

@ -1,4 +1,7 @@
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, ownCloud, Inc.
* *
@ -27,16 +30,18 @@
namespace OCP\AppFramework; namespace OCP\AppFramework;
use OCP\IContainer; use OCP\IContainer;
use Psr\Container\ContainerInterface;
/** /**
* Class IAppContainer * This is a tagging interface for a container that belongs to an app
* @package OCP\AppFramework *
* The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
* thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
* only.
* *
* This container interface provides short cuts for app developers to access predefined app service.
* @since 6.0.0 * @since 6.0.0
* @deprecated 20.0.0 use \Psr\Container\ContainerInterface
*/ */
interface IAppContainer extends IContainer { interface IAppContainer extends ContainerInterface, IContainer {
/** /**
* used to return the appname of the set application * used to return the appname of the set application

View File

@ -1,4 +1,7 @@
<?php <?php
declare(strict_types=1);
/** /**
* @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, ownCloud, Inc.
* *
@ -37,32 +40,25 @@
* *
*/ */
/**
* Public interface of ownCloud for apps to use.
* Server container interface
*
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP; namespace OCP;
use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudFederationProviderManager;
use OCP\Log\ILogFactory; use OCP\Log\ILogFactory;
use OCP\Security\IContentSecurityPolicyManager; use OCP\Security\IContentSecurityPolicyManager;
use Psr\Container\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/** /**
* Class IServerContainer * This is a tagging interface for the server container
* @package OCP *
* The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
* thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
* only.
* *
* This container holds all ownCloud services
* @since 6.0.0 * @since 6.0.0
* @deprecated 20.0.0 use \Psr\Container\ContainerInterface
*/ */
interface IServerContainer extends IContainer { interface IServerContainer extends ContainerInterface, IContainer {
/** /**
* The calendar manager will act as a broker between consumers for calendar information and * The calendar manager will act as a broker between consumers for calendar information and