File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 16
16
- name : " Checkout"
17
17
uses : actions/checkout@v4
18
18
with :
19
- ref : 1.12 .x
19
+ ref : 2.0 .x
20
20
fetch-depth : ' 0'
21
21
token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
22
22
- name : " Install PHP"
Original file line number Diff line number Diff line change 16
16
(function (): void {
17
17
require_once __DIR__ . '/../vendor/autoload.php ' ;
18
18
19
- $ parser = (new ParserFactory ())->create (ParserFactory:: ONLY_PHP7 );
19
+ $ parser = (new ParserFactory ())->createForNewestSupportedVersion ( );
20
20
$ finder = new Finder ();
21
21
$ finder ->in (__DIR__ . '/../vendor/jetbrains/phpstorm-stubs ' )->files ()->name ('*.php ' );
22
22
@@ -69,8 +69,19 @@ public function enterNode(Node $node)
69
69
$ traverser ->addVisitor (new NodeConnectingVisitor ());
70
70
$ traverser ->addVisitor ($ visitor );
71
71
72
+ $ contents = FileReader::read ($ path );
73
+ if (str_ends_with ($ path , '/vendor/jetbrains/phpstorm-stubs/Core/Core.php ' )) {
74
+ $ contents = str_replace ([
75
+ 'function exit ' ,
76
+ 'function die ' ,
77
+ ], [
78
+ 'function _exit ' ,
79
+ 'function _die ' ,
80
+ ], $ contents );
81
+ }
82
+
72
83
$ traverser ->traverse (
73
- $ parser ->parse (FileReader:: read ( $ path ) ),
84
+ $ parser ->parse ($ contents ),
74
85
);
75
86
}
76
87
You can’t perform that action at this time.
0 commit comments