ext-php-rs
ext-php-rs copied to clipboard
[stubs] missing type declarations for properties
| Component | Version |
|---|---|
| ext_php_rs | git:master |
| cargo-php | v0.1.7 |
Extension code:
#[php_class]
pub struct Example {
#[prop] pub foo: String,
#[prop] pub bar: Option<String>,
}
#[php_impl]
impl Example {
#[getter]
pub fn get_baz(&self) -> Vec<bool> {
vec![true, false]
}
}
#[php_startup]
pub fn startup_function() {}
#[php_module]
pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
module
}
Expected stubs:
<?php
class Example {
public string $foo;
public string|null $bar;
/**
* @var array<bool>
*/
public readonly array $baz;
}
Actual stubs:
<?php
class Example {
public $foo;
public $bar;
public $baz;
public function getBaz(): array {}
}