File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ mod tests {
255
255
#[ test]
256
256
#[ should_panic]
257
257
fn test_panic ( ) {
258
- Embed :: run ( || {
258
+ Embed :: run :: < ( ) , _ > ( || {
259
259
panic ! ( "test panic" ) ;
260
260
} ) ;
261
261
}
Original file line number Diff line number Diff line change 2
2
#![ cfg( feature = "embed" ) ]
3
3
extern crate ext_php_rs;
4
4
5
+ use cfg_if:: cfg_if;
6
+
5
7
use ext_php_rs:: embed:: Embed ;
6
8
use ext_php_rs:: ffi:: zend_register_module_ex;
7
9
use ext_php_rs:: prelude:: * ;
@@ -10,7 +12,14 @@ use ext_php_rs::prelude::*;
10
12
fn test_module ( ) {
11
13
Embed :: run ( || {
12
14
// Allow to load the module
13
- unsafe { zend_register_module_ex ( get_module ( ) ) } ;
15
+ cfg_if ! {
16
+ if #[ cfg( php84) ] {
17
+ // Register as temporary (2) module
18
+ unsafe { zend_register_module_ex( get_module( ) , 2 ) } ;
19
+ } else {
20
+ unsafe { zend_register_module_ex( get_module( ) ) } ;
21
+ }
22
+ }
14
23
15
24
let result = Embed :: eval ( "$foo = hello_world('foo');" ) ;
16
25
You can’t perform that action at this time.
0 commit comments