-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduce result cache bug with type aliases
- Loading branch information
1 parent
83bfbdf
commit 0fa6903
Showing
7 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Offset 'foo' does not exist on array\\{foo\\?\\: int\\}\\.$#" | ||
count: 1 | ||
path: src/Bar.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- src/Foo.php 2023-07-13 09:01:37 | ||
+++ src/Foo.php 2023-07-13 09:02:20 | ||
@@ -3,7 +3,7 @@ | ||
namespace Bug9622; | ||
|
||
/** | ||
- * @phpstan-type AnArray array{foo: int} | ||
+ * @phpstan-type AnArray array{foo?: int} | ||
*/ | ||
class Foo | ||
{ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 8 | ||
paths: | ||
- src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Bug9622; | ||
|
||
/** | ||
* @phpstan-import-type AnArray from Foo | ||
*/ | ||
class Bar | ||
{ | ||
|
||
/** | ||
* @param AnArray $a | ||
*/ | ||
public function doFoo(array $a): void | ||
{ | ||
echo 1 + $a['foo']; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Bug9622; | ||
|
||
/** | ||
* @phpstan-type AnArray array{foo: int} | ||
*/ | ||
class Foo | ||
{ | ||
|
||
} |