Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/composer/rector/rector-tw-1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Feb 16, 2024
2 parents 21c433f + 276af87 commit 218e2ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:

- name: Run infection.
run: |
vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered
vendor/bin/roave-infection-static-analysis-plugin --threads=2 --ignore-msi-with-no-mutations --only-covered
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Enh #286: Change property `Schema::$typeMap` to constant `Schema::TYPE_MAP` (@Tigrov)
- Bug #287: Fix `DMLQueryBuilder::insertWithReturningPks()` and `Command::insertWithReturningPks()` methods (@Tigrov)
- Enh #292: Minor refactoring of `Command` and `Quoter` (@Tigrov)
- Enh #291: Resolve deprecated methods (@Tigrov)

## 1.1.0 November 12, 2023

Expand Down
7 changes: 5 additions & 2 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 @@ -901,6 +902,8 @@ private function loadTableConstraints(string $tableName, string $returnType): mi
* @param string $name The table name.
*
* @return array The cache key.
*
* @psalm-suppress DeprecatedMethod
*/
protected function getCacheKey(string $name): array
{
Expand Down
2 changes: 1 addition & 1 deletion tests/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function testNotConnectionPDO(): void
$this->expectException(NotSupportedException::class);
$this->expectExceptionMessage('Only PDO connections are supported.');

$schema->refreshTableSchema('customer');
$schema->refresh();
}

public function testNegativeDefaultValues(): void
Expand Down

0 comments on commit 218e2ec

Please sign in to comment.