MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / set_php_version

Method set_php_version

src/lib.rs:1173–1184  ·  view source on GitHub ↗

Set the PHP version (used by integration tests and during server initialization after reading `composer.json`). Also filters `stub_function_index`, `stub_index`, and `stub_constant_index` to remove entries that do not exist in the given PHP version.

(&self, version: types::PhpVersion)

Source from the content-addressed store, hash-verified

1171 /// `stub_constant_index` to remove entries that do not exist in
1172 /// the given PHP version.
1173 pub fn set_php_version(&self, version: types::PhpVersion) {
1174 *self.php_version.lock() = version;
1175 self.stub_function_index
1176 .write()
1177 .retain(|name, source| !stubs::is_stub_function_removed(source, name, version));
1178 self.stub_index
1179 .write()
1180 .retain(|name, source| !stubs::is_stub_class_removed(source, name, version));
1181 self.stub_constant_index
1182 .write()
1183 .retain(|name, source| !stubs::is_stub_constant_removed(source, name, version));
1184 }
1185
1186 /// Check whether a URI refers to a Blade template file.
1187 /// Returns true if the URI ends with `.blade.php` OR was opened with `languageId == "blade"`.

Calls 4

is_stub_function_removedFunction · 0.85
is_stub_class_removedFunction · 0.85
is_stub_constant_removedFunction · 0.85
writeMethod · 0.80