Skip to content

Commit

Permalink
composer: use stable rector
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 18, 2019
1 parent 7d6ff1e commit 3d4dd47
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"jakub-onderka/php-parallel-lint": "^1.0",
"phpstan/phpstan": "^0.12.2",
"phpunit/phpunit": "^8.5",
"rector/rector": "dev-master",
"rector/rector": "^0.6.2",
"symplify/easy-coding-standard": "^7.1",
"symplify/phpstan-extensions": "^7.1",
"phpstan/phpstan-doctrine": "^0.12.4",
Expand Down
3 changes: 3 additions & 0 deletions ecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ parameters:
- "*Repository.php"

services:
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
max_cognitive_complexity: 8

PhpCsFixer\Fixer\ClassNotation\FinalClassFixer: ~

# see single LICENSE.txt file in the root directory
Expand Down
18 changes: 14 additions & 4 deletions tests/ORM/BlameableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,20 @@ public function testExtraSqlCalls(): void

$this->assertCount($expectedCount, $this->debugStack->queries);
$this->assertSame('"START TRANSACTION"', $this->debugStack->queries[$startKey]['sql']);
$this->assertSame(
'INSERT INTO BlameableEntity (title, createdBy, updatedBy, deletedBy) VALUES (?, ?, ?, ?)',
$this->debugStack->queries[$startKey + 1]['sql']
);

$sql2 = $this->debugStack->queries[$startKey + 1]['sql'];
if ($this->isPostgreSql()) {
$this->assertSame(
'INSERT INTO BlameableEntity (id, title, createdBy, updatedBy, deletedBy) VALUES (?, ?, ?, ?, ?)',
$sql2
);
} else {
$this->assertSame(
'INSERT INTO BlameableEntity (title, createdBy, updatedBy, deletedBy) VALUES (?, ?, ?, ?)',
$sql2
);
}

$this->assertSame('"COMMIT"', $this->debugStack->queries[$startKey + 2]['sql']);
}
}

0 comments on commit 3d4dd47

Please sign in to comment.