Skip to content

Commit 6bd522c

Browse files
committed
Fixed internal error with LevelDB stub
1 parent e81d732 commit 6bd522c

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"nette/schema": "^1.0",
1616
"nette/utils": "^3.0",
1717
"nikic/php-parser": "^4.3.0",
18-
"ondrejmirtes/better-reflection": "^3.5.4",
18+
"ondrejmirtes/better-reflection": "^3.5.5",
1919
"phpstan/phpdoc-parser": "^0.4.2",
2020
"symfony/console": "^4.3",
2121
"symfony/finder": "^4.3"

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ public function testPropertyAssignIntersectionStaticTypeBug(): void
195195
$this->assertCount(0, $errors);
196196
}
197197

198+
public function testBug2823(): void
199+
{
200+
$errors = $this->runAnalyse(__DIR__ . '/data/bug-2823.php');
201+
$this->assertCount(0, $errors);
202+
}
203+
198204
/**
199205
* @param string $file
200206
* @return \PHPStan\Analyser\Error[]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug2823;
4+
5+
class Foo
6+
{
7+
8+
public function sayHello(): void
9+
{
10+
var_dump(new \LevelDB("./somedir"));
11+
}
12+
13+
}

0 commit comments

Comments
 (0)