mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
@@ -26,7 +26,7 @@ namespace SP\Domain\Config\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\Domain\Config\Ports\UpgradeConfigService;
|
||||
use SP\Domain\Log\Ports\FileLogHandlerProvider;
|
||||
use SP\Domain\Log\Ports\FileHandlerProvider;
|
||||
use SP\Domain\Upgrade\Services\UpgradeBase;
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ final class UpgradeConfig extends UpgradeBase implements UpgradeConfigService
|
||||
{
|
||||
public function __construct(
|
||||
Application $application,
|
||||
FileLogHandlerProvider $fileLogHandlerProvider
|
||||
FileHandlerProvider $fileLogHandlerProvider
|
||||
) {
|
||||
parent::__construct($application, $fileLogHandlerProvider);
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace SP\Domain\Log\Ports;
|
||||
use SP\Domain\Core\Events\EventReceiver;
|
||||
|
||||
/**
|
||||
* Interface FileLogHandlerProvider
|
||||
* Interface FileHandlerProvider
|
||||
*/
|
||||
interface FileLogHandlerProvider extends EventReceiver
|
||||
interface FileHandlerProvider extends EventReceiver
|
||||
{
|
||||
|
||||
}
|
||||
@@ -26,12 +26,12 @@ namespace SP\Domain\Log\Providers;
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use SP\Domain\Common\Providers\EventsTrait;
|
||||
use SP\Domain\Log\Ports\FileLogHandlerProvider;
|
||||
use SP\Domain\Log\Ports\FileHandlerProvider;
|
||||
|
||||
/**
|
||||
* Class FileHandler
|
||||
*/
|
||||
final class FileHandler extends LoggerBase implements FileLogHandlerProvider
|
||||
final class FileHandler extends LoggerBase implements FileHandlerProvider
|
||||
{
|
||||
use EventsTrait;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use SP\Core\Events\EventMessage;
|
||||
use SP\Domain\Common\Providers\Version;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Log\Ports\FileLogHandlerProvider;
|
||||
use SP\Domain\Log\Ports\FileHandlerProvider;
|
||||
use SP\Domain\Upgrade\Ports\UpgradeService;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
|
||||
@@ -44,11 +44,11 @@ abstract class UpgradeBase extends Service implements UpgradeService
|
||||
{
|
||||
protected ?ConfigDataInterface $configData = null;
|
||||
|
||||
public function __construct(Application $application, FileLogHandlerProvider $fileLogHandler)
|
||||
public function __construct(Application $application, FileHandlerProvider $fileHandlerProvider)
|
||||
{
|
||||
parent::__construct($application);
|
||||
|
||||
$this->eventDispatcher->attach($fileLogHandler);
|
||||
$this->eventDispatcher->attach($fileHandlerProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\Domain\Database\Ports\DatabaseInterface;
|
||||
use SP\Domain\Log\Providers\FileHandler;
|
||||
use SP\Domain\Log\Ports\FileHandlerProvider;
|
||||
use SP\Infrastructure\Database\MysqlFileParser;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
use SP\Infrastructure\File\FileHandler;
|
||||
@@ -46,10 +46,10 @@ final class UpgradeDatabase extends UpgradeBase
|
||||
{
|
||||
public function __construct(
|
||||
Application $application,
|
||||
FileHandler $fileLogHandler,
|
||||
FileHandlerProvider $fileHandlerProvider,
|
||||
private readonly DatabaseInterface $database,
|
||||
) {
|
||||
parent::__construct($application, $fileLogHandler);
|
||||
parent::__construct($application, $fileHandlerProvider);
|
||||
}
|
||||
|
||||
protected static function getUpgrades(): array
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -28,8 +28,6 @@ use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class UpgradeException
|
||||
*
|
||||
* @package SP\Domain\Upgrade\Services
|
||||
*/
|
||||
final class UpgradeException extends SPException
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ use SP\Core\Application;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Config\Ports\ConfigFileService;
|
||||
use SP\Domain\Config\Services\UpgradeConfig;
|
||||
use SP\Domain\Log\Ports\FileLogHandlerProvider;
|
||||
use SP\Domain\Log\Ports\FileHandlerProvider;
|
||||
use SP\Domain\Upgrade\Services\UpgradeException;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
use SPT\UnitaryTestCase;
|
||||
@@ -44,7 +44,7 @@ use SPT\UnitaryTestCase;
|
||||
#[Group('unitary')]
|
||||
class UpgradeConfigTest extends UnitaryTestCase
|
||||
{
|
||||
private FileLogHandlerProvider|MockObject $fileLogHandlerProvider;
|
||||
private FileHandlerProvider|MockObject $fileLogHandlerProvider;
|
||||
|
||||
public static function versionDataProvider(): array
|
||||
{
|
||||
@@ -95,6 +95,6 @@ class UpgradeConfigTest extends UnitaryTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->fileLogHandlerProvider = $this->createMock(FileLogHandlerProvider::class);
|
||||
$this->fileLogHandlerProvider = $this->createMock(FileHandlerProvider::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user