Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ public function testBug13945Two(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
public function testBug12246(): void
{
$errors = $this->runAnalyse(__DIR__ . '/data/bug-12246.php');
Expand Down
21 changes: 21 additions & 0 deletions tests/PHPStan/Analyser/nsrt/properties-php80.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php // lint < 8.1

namespace PropertiesNamespacePhp81;

use PropertiesNamespace\Bar;
use function PHPStan\Testing\assertType;

use SomeNamespace\Amet as Dolor;
use SomeGroupNamespace\{One, Two as Too, Three};

/**
* @property-read string $documentElement
*/
abstract class Foo extends Bar
{
public function doFoo()
{
assertType('string', $this->documentElement);
}

}
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/nsrt/properties.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 8.1

namespace PropertiesNamespace;

Expand Down
5 changes: 5 additions & 0 deletions tests/PHPStan/Analyser/nsrt/range-function-php82.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php // lint < 8.3

use function PHPStan\Testing\assertType;

assertType('array{2.0, 3.0, 4.0, 5.0}', range(2, 5, 1.0));
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/nsrt/range-function.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 8.3

use function PHPStan\Testing\assertType;

Expand Down
Loading