Skip to content

Commit

Permalink
Update rector/rector dependency + Enable rector CI and apply suggesti…
Browse files Browse the repository at this point in the history
…ons (#256)
  • Loading branch information
dependabot[bot] committed May 8, 2023
1 parent 5f0b18c commit 8b83434
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -30,7 +30,7 @@
"ext-json": "*",
"maglnet/composer-require-checker": "^4.2",
"phpunit/phpunit": "^9.6|^10.0",
"rector/rector": "^0.14",
"rector/rector": "^0.16",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.3|^5.6",
Expand Down
2 changes: 0 additions & 2 deletions src/Schema.php
Expand Up @@ -604,8 +604,6 @@ private function loadTableConstraints(string $tableName, string $returnType): Co
* This method may be overridden by child classes to create a DBMS-specific column schema.
*
* @param string $name Name of the column.
*
* @return ColumnSchemaInterface
*/
private function createColumnSchema(string $name): ColumnSchemaInterface
{
Expand Down
19 changes: 7 additions & 12 deletions src/Transaction.php
Expand Up @@ -33,17 +33,12 @@ final class Transaction extends AbstractPdoTransaction
*/
protected function setTransactionIsolationLevel(string $level): void
{
switch ($level) {
case self::SERIALIZABLE:
$this->db->createCommand('PRAGMA read_uncommitted = False;')->execute();
break;
case self::READ_UNCOMMITTED:
$this->db->createCommand('PRAGMA read_uncommitted = True;')->execute();
break;
default:
throw new NotSupportedException(
self::class . ' only supports transaction isolation levels READ UNCOMMITTED and SERIALIZABLE.'
);
}
match ($level) {
self::SERIALIZABLE => $this->db->createCommand('PRAGMA read_uncommitted = False;')->execute(),
self::READ_UNCOMMITTED => $this->db->createCommand('PRAGMA read_uncommitted = True;')->execute(),
default => throw new NotSupportedException(
self::class . ' only supports transaction isolation levels READ UNCOMMITTED and SERIALIZABLE.'
),
};
}
}

0 comments on commit 8b83434

Please sign in to comment.