Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -10,6 +10,7 @@
namespace App\Doctrine;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration as BaseAbstractMigration;
@@ -20,17 +21,6 @@ use Doctrine\Migrations\AbstractMigration as BaseAbstractMigration;
*/
abstract class AbstractMigration extends BaseAbstractMigration
{
/**
* @param string $name
* @return string
*/
protected function getTableName($name)
{
@trigger_error('AbstractMigration::getTableName() is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
return 'kimai2_' . $name;
}
/**
* @see https://github.com/doctrine/migrations/issues/1104
*/
@@ -39,16 +29,6 @@ abstract class AbstractMigration extends BaseAbstractMigration
return false;
}
/**
* @deprecated since 1.14 - will be removed with 2.0
*/
protected function isSupportingForeignKeys(): bool
{
@trigger_error('isSupportingForeignKeys() is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
return true;
}
/**
* @param Schema $schema
* @throws Exception
@@ -74,46 +54,12 @@ abstract class AbstractMigration extends BaseAbstractMigration
*/
protected function abortIfPlatformNotSupported()
{
$platform = $this->getPlatform();
if (!$this->isPlatformMysql()) {
$this->abortIf(true, 'Unsupported database platform: ' . $platform);
$platform = $this->connection->getDatabasePlatform();
if (!($platform instanceof MySQLPlatform)) {
$this->abortIf(true, 'Unsupported database platform: ' . \get_class($platform));
}
}
/**
* @deprecated since 1.14 - will be removed with 2.0
*/
protected function isPlatformSqlite(): bool
{
@trigger_error('isPlatformSqlite() is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
return ($this->getPlatform() === 'sqlite');
}
protected function isPlatformMysql(): bool
{
return ($this->getPlatform() === 'mysql');
}
/**
* @return string
* @throws Exception
*/
protected function getPlatform()
{
return $this->connection->getDatabasePlatform()->getName();
}
/**
* @deprecated since 1.14 - will be removed with 2.0
*/
protected function addSqlDropIndex($indexName, $tableName)
{
@trigger_error('addSqlDropIndex() is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
$this->addSql('DROP INDEX ' . $indexName . ' ON ' . $tableName);
}
protected function preventEmptyMigrationWarning(): void
{
$this->addSql('#prevent empty warning - no SQL to execute');