Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize install files #2590

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Command/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace OCA\Libresign\Command;

use OC\Core\Command\Base as CommandBase;
use OCA\Libresign\Service\InstallService;
use OCA\Libresign\Service\Install\InstallService;
use Psr\Log\LoggerInterface;

class Base extends CommandBase {
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/Configure/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace OCA\Libresign\Command\Configure;

use OC\Core\Command\Base;
use OCA\Libresign\Service\ConfigureCheckService;
use OCA\Libresign\Service\Install\ConfigureCheckService;
use OCP\IConfig;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableCell;
Expand Down
4 changes: 3 additions & 1 deletion lib/Command/Developer/Reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Joas Schilling <[email protected]>
* @copyright Copyright (c) 2023 Vitor Mattos <[email protected]>
*
* @author Vitor Mattos <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
use OCA\Libresign\Exception\LibresignException;
use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngineHandler;
use OCA\Libresign\Helper\ConfigureCheckHelper;
use OCA\Libresign\Service\ConfigureCheckService;
use OCA\Libresign\Service\InstallService;
use OCA\Libresign\Service\Install\ConfigureCheckService;
use OCA\Libresign\Service\Install\InstallService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
Expand Down
2 changes: 1 addition & 1 deletion lib/Handler/CertificateEngine/CfsslHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use OCA\Libresign\Exception\LibresignException;
use OCA\Libresign\Handler\CfsslServerHandler;
use OCA\Libresign\Helper\ConfigureCheckHelper;
use OCA\Libresign\Service\InstallService;
use OCA\Libresign\Service\Install\InstallService;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Files\AppData\IAppDataFactory;
use OCP\IConfig;
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version8000Date20230730032402.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace OCA\Libresign\Migration;

use Closure;
use OCA\Libresign\Service\InstallService;
use OCA\Libresign\Service\Install\InstallService;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace OCA\Libresign\Service;
namespace OCA\Libresign\Service\Install;

use OC\SystemConfig;
use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace OCA\Libresign\Service;
namespace OCA\Libresign\Service\Install;

use InvalidArgumentException;
use OC;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Service/InstallServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace OCA\Libresign\Tests\Unit\Service;

use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngineHandler;
use OCA\Libresign\Service\InstallService;
use OCA\Libresign\Service\Install\InstallService;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Files\AppData\IAppDataFactory;
use OCP\Files\IRootFolder;
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ public function deleteUserIfExists($username): void {
}

private function getBinariesFromCache(): void {
/** @var \OCA\Libresign\Service\InstallService */
$install = \OC::$server->get(\OCA\Libresign\Service\InstallService::class);
/** @var \OCA\Libresign\Service\Install\InstallService */
$install = \OC::$server->get(\OCA\Libresign\Service\Install\InstallService::class);
$appPath = $install->getFullPath();
$cachePath = preg_replace('/\/.*\/appdata_[a-z0-9]*/', \OC::$server->getTempManager()->getTempBaseDir(), $appPath);
if (!file_exists($cachePath)) {
Expand All @@ -194,8 +194,8 @@ private function getBinariesFromCache(): void {
}

private function backupBinaries(): void {
/** @var \OCA\Libresign\Service\InstallService */
$install = \OC::$server->get(\OCA\Libresign\Service\InstallService::class);
/** @var \OCA\Libresign\Service\Install\InstallService */
$install = \OC::$server->get(\OCA\Libresign\Service\Install\InstallService::class);
$appPath = $install->getFullPath();
if (!is_readable($appPath)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<code>private</code>
</UndefinedClass>
</file>
<file src="lib/Service/InstallService.php">
<file src="lib/Service/Install/InstallService.php">
<UndefinedClass occurrences="1">
<code>Process</code>
</UndefinedClass>
Expand Down
Loading