Skip to content

Commit

Permalink
Merge pull request #9099 from lptn/auto-load-random-ext-stub-on-php82
Browse files Browse the repository at this point in the history
Automatically load stubs for random ext on PHP 8.2
  • Loading branch information
orklah committed Jan 12, 2023
2 parents f723e08 + f471ba9 commit d1c2294
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Psalm/Config.php
Expand Up @@ -2207,6 +2207,7 @@ public function visitStubFiles(Codebase $codebase, ?Progress $progress = null):
if ($codebase->analysis_php_version_id >= 8_02_00) {
$stringable_path = $dir_lvl_2 . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'Php82.phpstub';
$this->internal_stubs[] = $stringable_path;
$this->php_extensions['random'] = true; // random is a part of the PHP core starting from PHP 8.2
}

$ext_stubs_dir = $dir_lvl_2 . DIRECTORY_SEPARATOR . "stubs" . DIRECTORY_SEPARATOR . "extensions";
Expand Down

0 comments on commit d1c2294

Please sign in to comment.