File tree Expand file tree Collapse file tree 7 files changed +30
-2
lines changed Expand file tree Collapse file tree 7 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 53
53
- " 8.1"
54
54
- " 8.2"
55
55
- " 8.3"
56
+ - " 8.4"
56
57
57
58
runs-on : ${{ matrix.os }}
58
59
steps :
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ The framework that allows us to write PHP extensions using pure and safe Rust wh
18
18
19
19
### Necessary
20
20
21
- - ** rust** 1.65 or later
21
+ - ** rust** 1.79 or later
22
22
- ** libclang** 9.0 or later
23
23
- ** php** 7.0 or later
24
24
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ fn main() {
44
44
. allowlist_file ( "php_wrapper\\ .c" )
45
45
// Block the `zend_ini_parse_quantity` because it's document causes the doc test to fail.
46
46
. blocklist_function ( "zend_ini_parse_quantity" )
47
+ // Block the `zend_startup` because it fails checks.
48
+ . blocklist_function ( "zend_startup" )
49
+ // Block the `zend_random_bytes_insecure` because it fails checks.
50
+ . blocklist_item ( "zend_random_bytes_insecure" )
47
51
. clang_args ( & includes)
48
52
. derive_default ( true ) ;
49
53
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ repository = { workspace = true }
22
22
license = { workspace = true }
23
23
24
24
[dependencies ]
25
+ cfg-if = " 1.0.0"
25
26
derive_more = " 0.99.18"
26
27
indexmap = " 2.3.0"
27
28
once_cell = " 1.19.0"
Original file line number Diff line number Diff line change @@ -890,7 +890,25 @@ unsafe extern "C" fn create_object(ce: *mut zend_class_entry) -> *mut zend_objec
890
890
let object = state_object. as_mut_object ( ) . as_mut_ptr ( ) ;
891
891
zend_object_std_init ( object, ce) ;
892
892
object_properties_init ( object, ce) ;
893
- rebuild_object_properties ( object) ;
893
+
894
+ cfg_if:: cfg_if! {
895
+ if #[ cfg( any(
896
+ phper_major_version = "7" ,
897
+ all(
898
+ phper_major_version = "8" ,
899
+ any(
900
+ phper_minor_version = "0" ,
901
+ phper_minor_version = "1" ,
902
+ phper_minor_version = "2" ,
903
+ phper_minor_version = "3" ,
904
+ ) ,
905
+ )
906
+ ) ) ] {
907
+ rebuild_object_properties( object) ;
908
+ } else {
909
+ rebuild_object_properties_internal( object) ;
910
+ }
911
+ }
894
912
895
913
// Set handlers
896
914
let mut handlers = Box :: new ( std_object_handlers) ;
Original file line number Diff line number Diff line change @@ -482,6 +482,7 @@ thread_local! {
482
482
impl Default for ExceptionGuard {
483
483
fn default ( ) -> Self {
484
484
EXCEPTION_STACK . with ( |stack| unsafe {
485
+ #[ allow( static_mut_refs) ]
485
486
stack
486
487
. borrow_mut ( )
487
488
. push ( replace ( & mut eg ! ( exception) , null_mut ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -178,12 +178,14 @@ impl FunctionEntry {
178
178
179
179
let flags = visibility. unwrap_or ( Visibility :: default ( ) as u32 ) ;
180
180
181
+ #[ allow( clippy:: needless_update) ]
181
182
zend_function_entry {
182
183
fname : name. as_ptr ( ) . cast ( ) ,
183
184
handler : raw_handler,
184
185
arg_info : Box :: into_raw ( infos. into_boxed_slice ( ) ) . cast ( ) ,
185
186
num_args : arguments. len ( ) as u32 ,
186
187
flags,
188
+ ..Default :: default ( )
187
189
}
188
190
}
189
191
@@ -657,6 +659,7 @@ pub(crate) fn call_raw_common(call_fn: impl FnOnce(&mut ZVal)) -> crate::Result<
657
659
658
660
unsafe {
659
661
if !eg ! ( exception) . is_null ( ) {
662
+ #[ allow( static_mut_refs) ]
660
663
let e = ptr:: replace ( & mut eg ! ( exception) , null_mut ( ) ) ;
661
664
let obj = ZObject :: from_raw ( e) ;
662
665
match ThrowObject :: new ( obj) {
You can’t perform that action at this time.
0 commit comments