1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #9099 from lptn/auto-load-random-ext-stub-on-php82

Automatically load stubs for random ext on PHP 8.2
This commit is contained in:
orklah 2023-01-12 21:15:32 +01:00 committed by GitHub
commit d1c2294252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2207,6 +2207,7 @@ class Config
if ($codebase->analysis_php_version_id >= 8_02_00) { if ($codebase->analysis_php_version_id >= 8_02_00) {
$stringable_path = $dir_lvl_2 . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'Php82.phpstub'; $stringable_path = $dir_lvl_2 . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'Php82.phpstub';
$this->internal_stubs[] = $stringable_path; $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"; $ext_stubs_dir = $dir_lvl_2 . DIRECTORY_SEPARATOR . "stubs" . DIRECTORY_SEPARATOR . "extensions";