ext-php-rs
ext-php-rs copied to clipboard
Bindings for the Zend API to build PHP extensions natively in Rust.
When compiling the linter [complained ](https://github.com/jdrouet/ext-php-rs/actions/runs/10925975755/job/30328756324?pr=1#step:3:1490)that `php8x` was not defined. I fixed it using `rustc-check-cfg` as defined [here](https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#cargorustc-check-cfg-for-buildrsbuild-script). The compiler also [complained](https://github.com/jdrouet/ext-php-rs/actions/runs/10925975755/job/30328756324?pr=1#step:3:1384) that `cfg(docs)` was invalid. It's because it should...
Since in #327 (and maybe #328) I run into issues with registration order, I think that Rust compilation order, which ext-php-rs relied has been broken at least under some circumstances,...
During development in VS Code with Rust analyzer, even if the build succeeds, I still get a lot of spurious errors in my editor: `"The `#[php_module]` macro must be called...
The docs here: https://davidcole1340.github.io/ext-php-rs/macros/classes.html#implementing-an-interface tell me I can use `#[implements()]` to implement an interface. And indeed using this test code: ``` use ext_php_rs::prelude::*; use ext_php_rs::{exception::PhpResult, types::Zval, zend::ce}; #[php_class] #[implements(ce::arrayaccess())] #[implements(ce::countable())]...
Yesterday I got this error when I started up my PHP test script: ``` PHP Fatal error: Xee\SequenceIterator must be registered before Xee\Sequence in Unknown on line 0 ``` `XeeSequenceIterator`...
Returning static str reference from class getter fail to build witth the error: ` implementation of `FromZval` is not general enough` ### Example: ``` use ext_php_rs::prelude::*; #[php_class] struct Test; #[php_impl]...