Skip to content

Commit

Permalink
Resolve deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Jan 29, 2024
1 parent 2964f96 commit 239aacb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Yiisoft\Db\Schema\ColumnSchemaInterface;
use Yiisoft\Db\Schema\TableSchemaInterface;

use function array_map;
use function explode;
use function is_array;
use function md5;
Expand Down Expand Up @@ -328,7 +329,7 @@ protected function loadTableIndexes(string $tableName): array
$indexes = $this->db->createCommand($sql, [':fullName' => $resolvedName->getFullName()])->queryAll();

/** @psalm-var array[] $indexes */
$indexes = $this->normalizeRowKeyCase($indexes, true);
$indexes = array_map('array_change_key_case', $indexes);
$indexes = DbArrayHelper::index($indexes, null, ['name']);

$result = [];
Expand Down Expand Up @@ -832,7 +833,7 @@ private function loadTableConstraints(string $tableName, string $returnType): mi
$constraints = $this->db->createCommand($sql, [':fullName' => $resolvedName->getFullName()])->queryAll();

/** @psalm-var array[] $constraints */
$constraints = $this->normalizeRowKeyCase($constraints, true);
$constraints = array_map('array_change_key_case', $constraints);
$constraints = DbArrayHelper::index($constraints, null, ['type', 'name']);

$result = [
Expand Down Expand Up @@ -904,7 +905,7 @@ private function loadTableConstraints(string $tableName, string $returnType): mi
*/
protected function getCacheKey(string $name): array
{
return array_merge([self::class], $this->generateCacheKey(), [$this->getRawTableName($name)]);
return array_merge([self::class], $this->generateCacheKey(), [$this->db->getQuoter()->getRawTableName($name)]);
}

/**
Expand Down

0 comments on commit 239aacb

Please sign in to comment.