Skip to content

Commit

Permalink
Change overlooked paths in phpcs.xml.dist
Browse files Browse the repository at this point in the history
It seems that while modernizing the directory structure, I overlooked
some of the paths present in that configuration file.
  • Loading branch information
greg0ire committed Mar 26, 2024
1 parent dc6c94d commit 9b75296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<config name="php_version" value="70400"/>

<file>src</file>
<file>tests</file>

<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
Expand All @@ -22,11 +23,11 @@
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>Tests/*</exclude-pattern>
<exclude-pattern>Repository/RepositoryFactoryCompatibility.php</exclude-pattern>
<exclude-pattern>Repository/ServiceEntityRepository.php</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>src/Repository/RepositoryFactoryCompatibility.php</exclude-pattern>
<exclude-pattern>src/Repository/ServiceEntityRepository.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>Tests/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function testDbalLoadSinglePrimaryReplicaConnection(): void

public function testDbalLoadSavepointsForNestedTransactions(): void
{
if (!method_exists(Connection::class, 'getEventManager')) {
if (! method_exists(Connection::class, 'getEventManager')) {
self::markTestSkipped('This test requires DBAL < 4');
}

Expand Down
8 changes: 5 additions & 3 deletions tests/DependencyInjection/DoctrineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,12 @@ public function testUseSavePointsAddMethodCallToAddSavepointsToTheConnection():

$calls = $container->getDefinition('doctrine.dbal.default_connection')->getMethodCalls();
$this->assertCount((int) $isUsingDBAL3, $calls);
if ($isUsingDBAL3) {
$this->assertEquals('setNestTransactionsWithSavepoints', $calls[0][0]);
$this->assertTrue($calls[0][1][0]);
if (! $isUsingDBAL3) {
return;
}

$this->assertEquals('setNestTransactionsWithSavepoints', $calls[0][0]);
$this->assertTrue($calls[0][1][0]);
}

public function testAutoGenerateProxyClasses(): void
Expand Down

0 comments on commit 9b75296

Please sign in to comment.