Skip to content

Commit

Permalink
Merge branch refs/heads/1.12.x into 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot authored Dec 9, 2024
2 parents 9a718ee + acb109f commit d6409fe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/PHPStan/Rules/Keywords/RequireFileExistsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,18 @@ public function testBug11738(): void
$this->analyse([__DIR__ . '/data/bug-11738/bug-11738.php'], []);
}

public function testBug12203(): void
{
$this->analyse([__DIR__ . '/data/bug-12203.php'], [
[
'Path in require_once() "../bug-12203-sure-does-not-exist.php" is not a file or it does not exist.',
5,
],
[
'Path in require_once() "' . __DIR__ . '/data/../bug-12203-sure-does-not-exist.php" is not a file or it does not exist.',
6,
],
]);
}

}
6 changes: 6 additions & 0 deletions tests/PHPStan/Rules/Keywords/data/bug-12203.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

namespace Bug12203;

require_once '../bug-12203-sure-does-not-exist.php';
require_once __DIR__ . '/../bug-12203-sure-does-not-exist.php';

0 comments on commit d6409fe

Please sign in to comment.