diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index bfa00e614..385160a11 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -76,7 +76,6 @@ public function boot(IBootContext $context): void { $c->query(IServerContainer::class)->getRootFolder(), \OCP\Server::get(PhotofilesService::class), \OCP\Server::get(TracksService::class), - $c->query(IServerContainer::class)->getLogger(), $c->query('AppName'), $c->query(IServerContainer::class)->getLockingProvider() ); diff --git a/lib/Controller/ContactsController.php b/lib/Controller/ContactsController.php index 0062736d1..58225c052 100644 --- a/lib/Controller/ContactsController.php +++ b/lib/Controller/ContactsController.php @@ -24,7 +24,6 @@ use OCP\Files\NotFoundException; use OCP\IAvatarManager; use OCP\IDBConnection; -use OCP\ILogger; use OCP\IRequest; use OCP\IURLGenerator; use Sabre\VObject\Property\Text; @@ -32,7 +31,6 @@ class ContactsController extends Controller { private $userId; - private $logger; private $contactsManager; private $addressService; private $dbconnection; @@ -45,7 +43,6 @@ class ContactsController extends Controller { /** * @param $AppName - * @param ILogger $logger * @param IRequest $request * @param IDBConnection $dbconnection * @param IManager $contactsManager @@ -57,7 +54,6 @@ class ContactsController extends Controller { */ public function __construct( $AppName, - ILogger $logger, IRequest $request, IDBConnection $dbconnection, IManager $contactsManager, @@ -68,7 +64,6 @@ public function __construct( IRootFolder $root, IURLGenerator $urlGenerator) { parent::__construct($AppName, $request); - $this->logger = $logger; $this->userId = $UserId; $this->avatarManager = $avatarManager; $this->contactsManager = $contactsManager; diff --git a/lib/Controller/DevicesApiController.php b/lib/Controller/DevicesApiController.php index 6c122abee..a14d3c087 100644 --- a/lib/Controller/DevicesApiController.php +++ b/lib/Controller/DevicesApiController.php @@ -12,22 +12,16 @@ namespace OCA\Maps\Controller; use OCA\Maps\Service\DevicesService; - use OCP\App\IAppManager; use OCP\AppFramework\ApiController; - use OCP\AppFramework\Http; - - use OCP\AppFramework\Http\DataResponse; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\IUserManager; - use OCP\Share\IManager; class DevicesApiController extends ApiController { @@ -43,7 +37,6 @@ class DevicesApiController extends ApiController { private $dbdblquotes; private $defaultDeviceId; private $l; - private $logger; private $devicesService; protected $appName; @@ -56,7 +49,6 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, DevicesService $devicesService, $UserId) { parent::__construct($AppName, $request, @@ -64,7 +56,6 @@ public function __construct($AppName, 'Authorization, Content-Type, Accept', 1728000); $this->devicesService = $devicesService; - $this->logger = $logger; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); $this->userId = $UserId; diff --git a/lib/Controller/DevicesController.php b/lib/Controller/DevicesController.php index fee5dcd9f..7e8cd7e2d 100644 --- a/lib/Controller/DevicesController.php +++ b/lib/Controller/DevicesController.php @@ -25,12 +25,9 @@ use OCP\IDateTimeZone; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; - use OCP\IUserManager; - use OCP\Share\IManager; //use function \OCA\Maps\Service\endswith; @@ -48,7 +45,6 @@ class DevicesController extends Controller { private $dbdblquotes; private $defaultDeviceId; private $l; - private $logger; private $devicesService; private $deviceShareMapper; private $dateTimeZone; @@ -64,7 +60,6 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, DevicesService $devicesService, DeviceShareMapper $deviceShareMapper, IDateTimeZone $dateTimeZone, @@ -74,7 +69,6 @@ public function __construct($AppName, $this->devicesService = $devicesService; $this->deviceShareMapper = $deviceShareMapper; $this->dateTimeZone = $dateTimeZone; - $this->logger = $logger; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); $this->userId = $UserId; diff --git a/lib/Controller/FavoritesApiController.php b/lib/Controller/FavoritesApiController.php index bd312d79d..c27b033a8 100644 --- a/lib/Controller/FavoritesApiController.php +++ b/lib/Controller/FavoritesApiController.php @@ -19,7 +19,6 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\IUserManager; @@ -37,7 +36,6 @@ class FavoritesApiController extends ApiController { private $dbdblquotes; private $defaultDeviceId; private $l; - private $logger; private $favoritesService; protected $appName; @@ -50,7 +48,6 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, FavoritesService $favoritesService, $UserId) { parent::__construct($AppName, $request, @@ -58,7 +55,6 @@ public function __construct($AppName, 'Authorization, Content-Type, Accept', 1728000); $this->favoritesService = $favoritesService; - $this->logger = $logger; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); $this->userId = $UserId; diff --git a/lib/Controller/FavoritesController.php b/lib/Controller/FavoritesController.php index 2d0b35925..fb02a23ec 100644 --- a/lib/Controller/FavoritesController.php +++ b/lib/Controller/FavoritesController.php @@ -27,7 +27,6 @@ use OCP\IDateTimeZone; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\IUserManager; @@ -44,7 +43,6 @@ class FavoritesController extends Controller { private IGroupManager $groupManager; private string $dbtype; private IL10N $l; - private ILogger $logger; private FavoritesService $favoritesService; private IDateTimeZone $dateTimeZone; private ?string $defaultFavoritsJSON; @@ -62,7 +60,6 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, FavoritesService $favoritesService, IDateTimeZone $dateTimeZone, FavoriteShareMapper $favoriteShareMapper, @@ -70,7 +67,6 @@ public function __construct($AppName, parent::__construct($AppName, $request); $this->favoritesService = $favoritesService; $this->dateTimeZone = $dateTimeZone; - $this->logger = $logger; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); $this->userId = $UserId; diff --git a/lib/Controller/PhotosController.php b/lib/Controller/PhotosController.php index e9c9d7f21..4e21b4a83 100644 --- a/lib/Controller/PhotosController.php +++ b/lib/Controller/PhotosController.php @@ -22,26 +22,21 @@ use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; - -use OCP\ILogger; use OCP\IRequest; class PhotosController extends Controller { private $userId; private $geophotoService; private $photofilesService; - private $logger; private $root; public function __construct($AppName, - ILogger $logger, IRequest $request, GeophotoService $GeophotoService, PhotofilesService $photofilesService, IRootFolder $root, $UserId) { parent::__construct($AppName, $request); - $this->logger = $logger; $this->userId = $UserId; $this->geophotoService = $GeophotoService; $this->photofilesService = $photofilesService; diff --git a/lib/Controller/PublicFavoritePageController.php b/lib/Controller/PublicFavoritePageController.php index 2b455656b..4d94c71d5 100644 --- a/lib/Controller/PublicFavoritePageController.php +++ b/lib/Controller/PublicFavoritePageController.php @@ -32,7 +32,6 @@ use OCP\AppFramework\Http\Template\PublicTemplateResponse; use OCP\AppFramework\PublicShareController; use OCP\IConfig; -use OCP\ILogger; use OCP\IRequest; use OCP\ISession; use OCP\IUserManager; @@ -40,7 +39,6 @@ class PublicFavoritePageController extends PublicShareController { private $config; - private $logger; /* @var FavoriteShareMapper */ private $favoriteShareMapper; @@ -50,12 +48,10 @@ public function __construct( IRequest $request, ISession $session, IConfig $config, - ILogger $logger, FavoriteShareMapper $favoriteShareMapper ) { parent::__construct($appName, $request, $session); $this->config = $config; - $this->logger = $logger; $this->favoriteShareMapper = $favoriteShareMapper; } diff --git a/lib/Controller/PublicFavoritesController.php b/lib/Controller/PublicFavoritesController.php index 45dd977cf..b5ee421fd 100644 --- a/lib/Controller/PublicFavoritesController.php +++ b/lib/Controller/PublicFavoritesController.php @@ -33,7 +33,6 @@ use OCP\IUserManager; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; -use Psr\Log\LoggerInterface; class PublicFavoritesController extends PublicPageController { @@ -61,7 +60,6 @@ public function __construct( IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - private LoggerInterface $logger, FavoritesService $favoritesService, IDateTimeZone $dateTimeZone, FavoriteShareMapper $favoriteShareMapper, diff --git a/lib/Controller/PublicTracksController.php b/lib/Controller/PublicTracksController.php index 7eedb5a31..0bde397d2 100644 --- a/lib/Controller/PublicTracksController.php +++ b/lib/Controller/PublicTracksController.php @@ -21,7 +21,6 @@ use OCP\IGroupManager; use OCP\IInitialStateService; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\ISession; @@ -39,7 +38,6 @@ class PublicTracksController extends PublicPageController { protected ShareManager $shareManager; protected IUserManager $userManager; protected IL10N $l; - protected ILogger $logger; protected TracksService $tracksService; protected $appName; protected IRootFolder $root; @@ -57,12 +55,10 @@ public function __construct( IServerContainer $serverContainer, protected IGroupManager $groupManager, IL10N $l, - ILogger $logger, TracksService $tracksService, IRootFolder $root) { parent::__construct($appName, $request, $session, $urlGenerator, $eventDispatcher, $config, $initialStateService, $shareManager, $userManager); $this->tracksService = $tracksService; - $this->logger = $logger; $this->l = $l; $this->root = $root; } diff --git a/lib/Controller/RoutingController.php b/lib/Controller/RoutingController.php index f511c382c..4b3666317 100644 --- a/lib/Controller/RoutingController.php +++ b/lib/Controller/RoutingController.php @@ -13,17 +13,12 @@ use OCA\Maps\Service\TracksService; use OCP\App\IAppManager; - use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; - - - use OCP\IConfig; use OCP\IDateTimeZone; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\IUserManager; @@ -42,7 +37,6 @@ class RoutingController extends Controller { private $dbdblquotes; private $defaultDeviceId; private $l; - private $logger; private $dateTimeZone; private $tracksService; protected $appName; @@ -56,12 +50,10 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, IDateTimeZone $dateTimeZone, TracksService $tracksService, $UserId) { parent::__construct($AppName, $request); - $this->logger = $logger; $this->dateTimeZone = $dateTimeZone; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); diff --git a/lib/Controller/TracksController.php b/lib/Controller/TracksController.php index c268fcbf2..a576fd6bd 100644 --- a/lib/Controller/TracksController.php +++ b/lib/Controller/TracksController.php @@ -12,21 +12,15 @@ namespace OCA\Maps\Controller; use OCA\Maps\Service\TracksService; - use OCP\App\IAppManager; use OCP\AppFramework\Controller; - - - use OCP\AppFramework\Http\DataResponse; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IServerContainer; use OCP\IUserManager; - use OCP\Share\IManager; use function OCA\Maps\Helper\remove_utf8_bom; @@ -43,7 +37,6 @@ class TracksController extends Controller { private $dbtype; private $dbdblquotes; private $l; - private $logger; private $tracksService; protected $appName; @@ -56,12 +49,10 @@ public function __construct($AppName, IUserManager $userManager, IGroupManager $groupManager, IL10N $l, - ILogger $logger, TracksService $tracksService, $UserId) { parent::__construct($AppName, $request); $this->tracksService = $tracksService; - $this->logger = $logger; $this->appName = $AppName; $this->appVersion = $config->getAppValue('maps', 'installed_version'); $this->userId = $UserId; diff --git a/lib/Hooks/FileHooks.php b/lib/Hooks/FileHooks.php index a0e8c31b0..53d5ef81b 100644 --- a/lib/Hooks/FileHooks.php +++ b/lib/Hooks/FileHooks.php @@ -18,7 +18,6 @@ use OCP\Files\FileInfo; use OCP\Files\IHomeStorage; use OCP\Files\IRootFolder; -use OCP\ILogger; use OCP\Lock\ILockingProvider; use OCP\Share; use OCP\Util; @@ -31,17 +30,14 @@ class FileHooks { private $photofilesService; private $tracksService; - private $logger; - private $root; private ILockingProvider $lockingProvider; public function __construct(IRootFolder $root, PhotofilesService $photofilesService, TracksService $tracksService, - ILogger $logger, $appName, ILockingProvider $lockingProvider) { + $appName, ILockingProvider $lockingProvider) { $this->photofilesService = $photofilesService; $this->tracksService = $tracksService; - $this->logger = $logger; $this->root = $root; $this->lockingProvider = $lockingProvider; } diff --git a/lib/Listener/CardCreatedListener.php b/lib/Listener/CardCreatedListener.php index f14787c39..5c2e890b5 100644 --- a/lib/Listener/CardCreatedListener.php +++ b/lib/Listener/CardCreatedListener.php @@ -27,7 +27,6 @@ use OCA\Maps\Service\AddressService; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\ILogger; /** @template-implements IEventListener */ class CardCreatedListener implements IEventListener { @@ -35,14 +34,10 @@ class CardCreatedListener implements IEventListener { /** @var AddressService */ private $addressService; - /** @var ILogger */ - private $logger; - public function __construct( AddressService $addressService, - ILogger $logger) { + ) { $this->addressService = $addressService; - $this->logger = $logger; } public function handle(Event $event): void { diff --git a/lib/Listener/CardDeletedListener.php b/lib/Listener/CardDeletedListener.php index 2c377bcfb..1eaefef10 100644 --- a/lib/Listener/CardDeletedListener.php +++ b/lib/Listener/CardDeletedListener.php @@ -27,7 +27,6 @@ use OCA\Maps\Service\AddressService; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\ILogger; /** @template-implements IEventListener */ class CardDeletedListener implements IEventListener { @@ -35,14 +34,10 @@ class CardDeletedListener implements IEventListener { /** @var AddressService */ private $addressService; - /** @var ILogger */ - private $logger; - public function __construct( AddressService $addressService, - ILogger $logger) { + ) { $this->addressService = $addressService; - $this->logger = $logger; } public function handle(Event $event): void { diff --git a/lib/Listener/CardUpdatedListener.php b/lib/Listener/CardUpdatedListener.php index 05d2e13ba..6092b02f5 100644 --- a/lib/Listener/CardUpdatedListener.php +++ b/lib/Listener/CardUpdatedListener.php @@ -27,7 +27,6 @@ use OCA\Maps\Service\AddressService; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\ILogger; /** @template-implements IEventListener */ class CardUpdatedListener implements IEventListener { @@ -35,14 +34,10 @@ class CardUpdatedListener implements IEventListener { /** @var AddressService */ private $addressService; - /** @var ILogger */ - private $logger; - public function __construct( AddressService $addressService, - ILogger $logger) { + ) { $this->addressService = $addressService; - $this->logger = $logger; } public function handle(Event $event): void { diff --git a/lib/Service/AddressService.php b/lib/Service/AddressService.php index 3ba520922..dc3132a78 100644 --- a/lib/Service/AddressService.php +++ b/lib/Service/AddressService.php @@ -18,9 +18,9 @@ use OCP\Files\IAppData; use OCP\ICacheFactory; use OCP\IDBConnection; -use OCP\ILogger; use OCP\IMemcache; use OpenLocationCode\OpenLocationCode; +use Psr\Log\LoggerInterface; use Sabre\VObject\Reader; /** @@ -41,19 +41,22 @@ class AddressService { private $qb; private $dbconnection; - private $logger; private $jobList; private $appData; /** @var IMemcache */ private $memcache; - public function __construct(ICacheFactory $cacheFactory, ILogger $logger, IJobList $jobList, - IAppData $appData, IDBConnection $dbconnection) { + public function __construct( + ICacheFactory $cacheFactory, + private LoggerInterface $logger, + IJobList $jobList, + IAppData $appData, + IDBConnection $dbconnection, + ) { $this->dbconnection = $dbconnection; $this->qb = $dbconnection->getQueryBuilder(); $this->memcache = $cacheFactory->createLocal('maps'); - $this->logger = $logger; $this->jobList = $jobList; $this->appData = $appData; } diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index 41ca799b2..10207cfe6 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -27,9 +27,6 @@ use OCP\Files\Search\ISearchComparison; use OCP\ICacheFactory; use OCP\IL10N; -use OCP\ILogger; - - use OCP\IPreview; class GeophotoService { @@ -37,7 +34,6 @@ class GeophotoService { private $l10n; private $root; private $photoMapper; - private $logger; private $preview; private $tracksService; private $timeorderedPointSets; @@ -48,7 +44,7 @@ class GeophotoService { private \OCP\ICache $timeOrderedPointSetsCache; private \OCP\ICache $backgroundJobCache; - public function __construct(ILogger $logger, + public function __construct( IRootFolder $root, IL10N $l10n, GeophotoMapper $photoMapper, @@ -60,7 +56,6 @@ public function __construct(ILogger $logger, $this->root = $root; $this->l10n = $l10n; $this->photoMapper = $photoMapper; - $this->logger = $logger; $this->preview = $preview; $this->tracksService = $tracksService; $this->timeorderedPointSets = null; diff --git a/lib/Service/PhotofilesService.php b/lib/Service/PhotofilesService.php index 621a9c3f4..461b0c3ca 100644 --- a/lib/Service/PhotofilesService.php +++ b/lib/Service/PhotofilesService.php @@ -25,11 +25,10 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Node; - use OCP\ICacheFactory; use OCP\IL10N; -use OCP\ILogger; use OCP\Share\IManager; +use Psr\Log\LoggerInterface; require_once __DIR__ . '/../../vendor/autoload.php'; use lsolesen\pel\PelDataWindow; @@ -49,13 +48,13 @@ class PhotofilesService { private $root; private $photoMapper; private $shareManager; - private $logger; private $jobList; private ICacheFactory $cacheFactory; private \OCP\ICache $photosCache; private \OCP\ICache $backgroundJobCache; - public function __construct(ILogger $logger, + public function __construct( + private LoggerInterface $logger, ICacheFactory $cacheFactory, IRootFolder $root, IL10N $l10n, @@ -66,7 +65,6 @@ public function __construct(ILogger $logger, $this->l10n = $l10n; $this->photoMapper = $photoMapper; $this->shareManager = $shareManager; - $this->logger = $logger; $this->jobList = $jobList; $this->cacheFactory = $cacheFactory; $this->photosCache = $this->cacheFactory->createDistributed('maps:photos'); diff --git a/tests/Unit/Controller/ContactsControllerTest.php b/tests/Unit/Controller/ContactsControllerTest.php index d06438c36..a44a39058 100644 --- a/tests/Unit/Controller/ContactsControllerTest.php +++ b/tests/Unit/Controller/ContactsControllerTest.php @@ -18,6 +18,7 @@ use OCA\Maps\AppInfo\Application; use OCA\Maps\Service\AddressService; use OCP\IServerContainer; +use Psr\Log\LoggerInterface; class ContactsControllerTest extends \PHPUnit\Framework\TestCase { private $appName; @@ -97,7 +98,7 @@ protected function setUp(): void { $this->addressService = new AddressService( $c->query(IServerContainer::class)->getMemCacheFactory(), - $c->query(IServerContainer::class)->getLogger(), + $c->query(IServerContainer::class)->get(LoggerInterface::class), $c->query(IServerContainer::class)->getJobList(), $this->appData, $c->query(IServerContainer::class)->query(\OCP\IDBConnection::class) @@ -122,7 +123,6 @@ protected function setUp(): void { $this->contactsController = new ContactsController( $this->appName, - $c->query(IServerContainer::class)->getLogger(), $this->request, $c->query(IServerContainer::class)->query(\OCP\IDBConnection::class), $this->contactsManager, @@ -138,7 +138,6 @@ protected function setUp(): void { $this->contactsController2 = new ContactsController( $this->appName, - $c->query(IServerContainer::class)->getLogger(), $this->request, $c->query(IServerContainer::class)->query(\OCP\IDBConnection::class), $this->contactsManager, diff --git a/tests/Unit/Controller/DevicesApiControllerTest.php b/tests/Unit/Controller/DevicesApiControllerTest.php index 519011359..012ddcc43 100644 --- a/tests/Unit/Controller/DevicesApiControllerTest.php +++ b/tests/Unit/Controller/DevicesApiControllerTest.php @@ -87,7 +87,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(DevicesService::class), 'test' ); @@ -102,7 +101,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(DevicesService::class), 'test2' ); diff --git a/tests/Unit/Controller/DevicesControllerTest.php b/tests/Unit/Controller/DevicesControllerTest.php index 15e120f85..2a3d1a79f 100644 --- a/tests/Unit/Controller/DevicesControllerTest.php +++ b/tests/Unit/Controller/DevicesControllerTest.php @@ -89,7 +89,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(DevicesService::class), $c->query(DeviceShareMapper::class), $c->query(IServerContainer::class)->getDateTimeZone(), @@ -107,7 +106,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(DevicesService::class), $c->query(DeviceShareMapper::class), $c->query(IServerContainer::class)->getDateTimeZone(), diff --git a/tests/Unit/Controller/FavoritesApiControllerTest.php b/tests/Unit/Controller/FavoritesApiControllerTest.php index 1018874a7..bcdfc21f0 100644 --- a/tests/Unit/Controller/FavoritesApiControllerTest.php +++ b/tests/Unit/Controller/FavoritesApiControllerTest.php @@ -87,7 +87,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(FavoritesService::class), 'test' ); @@ -102,7 +101,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(FavoritesService::class), 'test2' ); diff --git a/tests/Unit/Controller/FavoritesControllerTest.php b/tests/Unit/Controller/FavoritesControllerTest.php index 73f13044c..d24419858 100644 --- a/tests/Unit/Controller/FavoritesControllerTest.php +++ b/tests/Unit/Controller/FavoritesControllerTest.php @@ -97,7 +97,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(FavoritesService::class), $c->query(IServerContainer::class)->getDateTimeZone(), $c->query(FavoriteShareMapper::class), @@ -114,7 +113,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(FavoritesService::class), $c->query(IServerContainer::class)->getDateTimeZone(), $c->query(FavoriteShareMapper::class), diff --git a/tests/Unit/Controller/PhotosControllerTest.php b/tests/Unit/Controller/PhotosControllerTest.php index 1e46d9514..23e00a67a 100644 --- a/tests/Unit/Controller/PhotosControllerTest.php +++ b/tests/Unit/Controller/PhotosControllerTest.php @@ -86,7 +86,7 @@ protected function setUp(): void { $this->GeoPhotosService = $c->query(GeoPhotoService::class); $this->photoFileService = new PhotoFilesService( - $c->query(IServerContainer::class)->getLogger(), + $c->query(IServerContainer::class)->get(\Psr\Log\LoggerInterface::class), $c->query(IServerContainer::class)->getMemCacheFactory(), $this->rootFolder, $c->query(IServerContainer::class)->getL10N($c->query('AppName')), @@ -97,7 +97,6 @@ protected function setUp(): void { $this->photosController = new PhotosController( $this->appName, - $c->query(IServerContainer::class)->getLogger(), $this->request, $this->GeoPhotosService, $this->photoFileService, @@ -107,7 +106,6 @@ protected function setUp(): void { $this->photosController2 = new PhotosController( $this->appName, - $c->query(IServerContainer::class)->getLogger(), $this->request, $c->query(GeoPhotoService::class), $this->photoFileService, diff --git a/tests/Unit/Controller/PublicFavoritePageControllerTest.php b/tests/Unit/Controller/PublicFavoritePageControllerTest.php index 74846c047..cf1f00325 100644 --- a/tests/Unit/Controller/PublicFavoritePageControllerTest.php +++ b/tests/Unit/Controller/PublicFavoritePageControllerTest.php @@ -88,7 +88,6 @@ protected function setUp(): void { $requestMock, $sessionMock, $this->config, - $container->query(LoggerInterface::class), $this->favoriteShareMapper ); } diff --git a/tests/Unit/Controller/PublicFavoritesApiControllerTest.php b/tests/Unit/Controller/PublicFavoritesApiControllerTest.php index f9290af33..0ef83d714 100644 --- a/tests/Unit/Controller/PublicFavoritesApiControllerTest.php +++ b/tests/Unit/Controller/PublicFavoritesApiControllerTest.php @@ -59,7 +59,7 @@ protected function setUp(): void { $this->config = $container->query(IServerContainer::class)->getConfig(); $this->favoritesService = new FavoritesService( - $container->query(IServerContainer::class)->getLogger(), + $container->query(IServerContainer::class)->get(\Psr\Log\LoggerInterface::class), $container->query(IServerContainer::class)->getL10N($appName), $container->query(IServerContainer::class)->getSecureRandom(), $container->query(\OCP\IDBConnection::class) diff --git a/tests/Unit/Controller/TracksControllerTest.php b/tests/Unit/Controller/TracksControllerTest.php index 447e73272..3c9e7e1e2 100644 --- a/tests/Unit/Controller/TracksControllerTest.php +++ b/tests/Unit/Controller/TracksControllerTest.php @@ -81,7 +81,7 @@ protected function setUp(): void { $this->rootFolder = $c->query(IServerContainer::class)->getRootFolder(); $this->tracksService = new TracksService( - $c->query(IServerContainer::class)->getLogger(), + $c->query(IServerContainer::class)->get(\Psr\Log\LoggerInterface::class), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), $this->rootFolder, $c->query(IServerContainer::class)->getShareManager(), @@ -98,7 +98,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(TracksService::class), 'test', ); @@ -113,7 +112,6 @@ protected function setUp(): void { $c->getServer()->getUserManager(), $c->getServer()->getGroupManager(), $c->query(IServerContainer::class)->getL10N($c->query('AppName')), - $c->query(IServerContainer::class)->getLogger(), $c->query(TracksService::class), 'test2', );