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 5353 - " 8.1"
5454 - " 8.2"
5555 - " 8.3"
56+ - " 8.4"
5657
5758 runs-on : ${{ matrix.os }}
5859 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
1818
1919### Necessary
2020
21- - ** rust** 1.65 or later
21+ - ** rust** 1.79 or later
2222- ** libclang** 9.0 or later
2323- ** php** 7.0 or later
2424
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ fn main() {
4444 . allowlist_file ( "php_wrapper\\ .c" )
4545 // Block the `zend_ini_parse_quantity` because it's document causes the doc test to fail.
4646 . 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" )
4751 . clang_args ( & includes)
4852 . derive_default ( true ) ;
4953
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ repository = { workspace = true }
2222license = { workspace = true }
2323
2424[dependencies ]
25+ cfg-if = " 1.0.0"
2526derive_more = " 0.99.18"
2627indexmap = " 2.3.0"
2728once_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
890890 let object = state_object. as_mut_object ( ) . as_mut_ptr ( ) ;
891891 zend_object_std_init ( object, ce) ;
892892 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+ }
894912
895913 // Set handlers
896914 let mut handlers = Box :: new ( std_object_handlers) ;
Original file line number Diff line number Diff line change @@ -482,6 +482,7 @@ thread_local! {
482482impl Default for ExceptionGuard {
483483 fn default ( ) -> Self {
484484 EXCEPTION_STACK . with ( |stack| unsafe {
485+ #[ allow( static_mut_refs) ]
485486 stack
486487 . borrow_mut ( )
487488 . push ( replace ( & mut eg ! ( exception) , null_mut ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -178,12 +178,14 @@ impl FunctionEntry {
178178
179179 let flags = visibility. unwrap_or ( Visibility :: default ( ) as u32 ) ;
180180
181+ #[ allow( clippy:: needless_update) ]
181182 zend_function_entry {
182183 fname : name. as_ptr ( ) . cast ( ) ,
183184 handler : raw_handler,
184185 arg_info : Box :: into_raw ( infos. into_boxed_slice ( ) ) . cast ( ) ,
185186 num_args : arguments. len ( ) as u32 ,
186187 flags,
188+ ..Default :: default ( )
187189 }
188190 }
189191
@@ -657,6 +659,7 @@ pub(crate) fn call_raw_common(call_fn: impl FnOnce(&mut ZVal)) -> crate::Result<
657659
658660 unsafe {
659661 if !eg ! ( exception) . is_null ( ) {
662+ #[ allow( static_mut_refs) ]
660663 let e = ptr:: replace ( & mut eg ! ( exception) , null_mut ( ) ) ;
661664 let obj = ZObject :: from_raw ( e) ;
662665 match ThrowObject :: new ( obj) {
You can’t perform that action at this time.
0 commit comments