File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1616 - name : " Checkout"
1717 uses : actions/checkout@v4
1818 with :
19- ref : 1.12 .x
19+ ref : 2.0 .x
2020 fetch-depth : ' 0'
2121 token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
2222 - name : " Install PHP"
Original file line number Diff line number Diff line change 1616(function (): void {
1717 require_once __DIR__ . '/../vendor/autoload.php ' ;
1818
19- $ parser = (new ParserFactory ())->create (ParserFactory:: ONLY_PHP7 );
19+ $ parser = (new ParserFactory ())->createForNewestSupportedVersion ( );
2020 $ finder = new Finder ();
2121 $ finder ->in (__DIR__ . '/../vendor/jetbrains/phpstorm-stubs ' )->files ()->name ('*.php ' );
2222
@@ -69,8 +69,19 @@ public function enterNode(Node $node)
6969 $ traverser ->addVisitor (new NodeConnectingVisitor ());
7070 $ traverser ->addVisitor ($ visitor );
7171
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+
7283 $ traverser ->traverse (
73- $ parser ->parse (FileReader:: read ( $ path ) ),
84+ $ parser ->parse ($ contents ),
7485 );
7586 }
7687
You can’t perform that action at this time.
0 commit comments