Skip to content

Commit

Permalink
Merge pull request #58 from stof/psalm_max_level
Browse files Browse the repository at this point in the history
Reach psalm max level
  • Loading branch information
greg0ire authored Jun 3, 2023
2 parents ed7d767 + 73cff91 commit 9340e28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/Deprecations/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,19 @@ private static function basename(string $filename): string

public static function enableTrackingDeprecations(): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_TRACK_DEPRECATIONS;
}

public static function enableWithTriggerError(): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_TRIGGER_ERROR;
}

public static function enableWithPsrLogger(LoggerInterface $logger): void
{
self::$type = self::$type ?? 0;
self::$type |= self::TYPE_PSR_LOGGER;
self::$logger = $logger;
}
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
errorLevel="1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Deprecations/DeprecationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function testDeprecationResetsCounts(): void
public function expectDeprecationMock(string $message, string $identifier, string $package): LoggerInterface
{
$mock = $this->createMock(LoggerInterface::class);
$mock->method('notice')->with($message, $this->callback(function ($context) use ($identifier, $package) {
$mock->method('notice')->with($message, $this->callback(function (array $context) use ($identifier, $package) {
$this->assertEquals($package, $context['package']);
$this->assertEquals($identifier, $context['link']);

Expand Down

0 comments on commit 9340e28

Please sign in to comment.