mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 23:44:33 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -37,13 +37,8 @@ class LogDBMigrationSubscriber implements EventSubscriber
|
|||
protected ?string $old_version = null;
|
||||
protected ?string $new_version = null;
|
||||
|
||||
protected EventLogger $eventLogger;
|
||||
protected DependencyFactory $dependencyFactory;
|
||||
|
||||
public function __construct(EventLogger $eventLogger, DependencyFactory $dependencyFactory)
|
||||
public function __construct(protected EventLogger $eventLogger, protected DependencyFactory $dependencyFactory)
|
||||
{
|
||||
$this->eventLogger = $eventLogger;
|
||||
$this->dependencyFactory = $dependencyFactory;
|
||||
}
|
||||
|
||||
public function onMigrationsMigrated(MigrationsEventArgs $args): void
|
||||
|
@ -66,7 +61,7 @@ class LogDBMigrationSubscriber implements EventSubscriber
|
|||
try {
|
||||
$log = new DatabaseUpdatedLogEntry($this->old_version, $this->new_version);
|
||||
$this->eventLogger->logAndFlush($log);
|
||||
} catch (\Throwable $exception) {
|
||||
} catch (\Throwable) {
|
||||
//Ignore any exception occuring here...
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue