Fix Doctrine deprecations (#4608)

This commit is contained in:
Kevin Papst
2024-02-02 15:48:11 +01:00
committed by GitHub
parent 49e69d1ae3
commit c2afebbb5e
11 changed files with 446 additions and 369 deletions

View File

@@ -0,0 +1,34 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DoctrineMigrations;
use App\Doctrine\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* @version 2.x
*/
final class <className> extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
<up>
}
public function down(Schema $schema): void
{
<down>
}<override>
}

View File

@@ -51,9 +51,4 @@ final class Version20230327143628 extends AbstractMigration
$workingTimes->removeForeignKey('FK_F95E49334EA3CB3D');
$schema->dropTable('kimai2_working_times');
}
public function isTransactional(): bool
{
return false;
}
}

View File

@@ -35,9 +35,4 @@ final class Version20230606125948 extends AbstractMigration
$tags = $schema->getTable('kimai2_tags');
$tags->dropColumn('visible');
}
public function isTransactional(): bool
{
return false;
}
}

View File

@@ -11,8 +11,8 @@ declare(strict_types=1);
namespace DoctrineMigrations;
use App\Doctrine\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* @version 2.0.31
@@ -40,9 +40,4 @@ final class Version20230819090536 extends AbstractMigration
$table->dropIndex('IDX_B9AC5BCE19E9AC5F');
$table->dropColumn('supervisor_id');
}
public function isTransactional(): bool
{
return false;
}
}

View File

@@ -11,8 +11,8 @@ declare(strict_types=1);
namespace DoctrineMigrations;
use App\Doctrine\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* @version 2.5.0
@@ -34,10 +34,6 @@ final class Version20231130000719 extends AbstractMigration
public function down(Schema $schema): void
{
}
public function isTransactional(): bool
{
return false;
$this->preventEmptyMigrationWarning();
}
}