updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -3,10 +3,13 @@
namespace Doctrine\DBAL\Schema\Synchronizer;
use Doctrine\DBAL\Connection;
use Doctrine\Deprecations\Deprecation;
use Throwable;
/**
* Abstract schema synchronizer with methods for executing batches of SQL.
*
* @deprecated
*/
abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
{
@@ -16,10 +19,18 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
public function __construct(Connection $conn)
{
$this->conn = $conn;
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4213',
'SchemaSynchronizer API is deprecated without a replacement and will be removed in DBAL 3.0'
);
}
/**
* @param string[] $sql
*
* @return void
*/
protected function processSqlSafely(array $sql)
{
@@ -33,6 +44,8 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
/**
* @param string[] $sql
*
* @return void
*/
protected function processSql(array $sql)
{

View File

@@ -7,6 +7,8 @@ use Doctrine\DBAL\Schema\Schema;
/**
* The synchronizer knows how to synchronize a schema with the configured
* database.
*
* @deprecated
*/
interface SchemaSynchronizer
{

View File

@@ -7,10 +7,13 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector;
use function count;
/**
* Schema Synchronizer for Default DBAL Connection.
*
* @deprecated
*/
class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
{
@@ -31,7 +34,6 @@ class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
return $createSchema->toSql($this->platform);
}
/**
* {@inheritdoc}
*/
@@ -87,11 +89,14 @@ class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
}
foreach ($dropSchema->getTables() as $table) {
if (! $table->hasPrimaryKey()) {
$primaryKey = $table->getPrimaryKey();
if ($primaryKey === null) {
continue;
}
$columns = $table->getPrimaryKey()->getColumns();
$columns = $primaryKey->getColumns();
if (count($columns) > 1) {
continue;
}