Update to upstream ext-php-rs

This commit is contained in:
Daniil Gentili 2023-10-11 19:25:25 +02:00
parent 1c41b1a5ac
commit 8281709cbb
7 changed files with 10 additions and 10 deletions

View File

@ -2,14 +2,14 @@
name = "php-tokio" name = "php-tokio"
repository = "https://github.com/danog/php-tokio" repository = "https://github.com/danog/php-tokio"
homepage = "https://github.com/danog/php-tokio" homepage = "https://github.com/danog/php-tokio"
license = "AGPL-3.0-or-later" license = "Apache-2.0"
description = "Use any async Rust library from PHP!" description = "Use any async Rust library from PHP!"
version = "0.1.2" version = "0.1.2"
authors = ["Daniil Gentili <daniil@daniil.it>"] authors = ["Daniil Gentili <daniil@daniil.it>"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
nicelocal-ext-php-rs = "0.10.4" ext-php-rs = "0.10.2"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tokio-pipe = "^0.2" tokio-pipe = "^0.2"
lazy_static = "1.4.0" lazy_static = "1.4.0"

View File

@ -3,7 +3,7 @@ name = "php-tokio-derive"
description = "Derive macros for php-tokio." description = "Derive macros for php-tokio."
repository = "https://github.com/danog/php-tokio" repository = "https://github.com/danog/php-tokio"
homepage = "https://github.com/danog/php-tokio" homepage = "https://github.com/danog/php-tokio"
license = "AGPL-3.0-or-later" license = "Apache-2.0"
version = "0.1.0" version = "0.1.0"
authors = ["Daniil Gentili <daniil@daniil.it>"] authors = ["Daniil Gentili <daniil@daniil.it>"]
edition = "2021" edition = "2021"

View File

@ -42,7 +42,7 @@ fn parser(input: ItemImpl) -> Result<TokenStream> {
.collect::<Result<Vec<_>>>()?; .collect::<Result<Vec<_>>>()?;
let output = quote! { let output = quote! {
#[::nicelocal_ext_php_rs::php_impl] #[::ext_php_rs::php_impl]
impl #self_ty { impl #self_ty {
#(#tokens)* #(#tokens)*
} }

View File

@ -10,6 +10,6 @@ crate-type = ["cdylib"]
[dependencies] [dependencies]
php-tokio = "^0.1.2" php-tokio = "^0.1.2"
nicelocal-ext-php-rs = { version = "^0.10.4", features = ["anyhow"] } ext-php-rs = { version = "^0.10.2", features = ["anyhow"] }
reqwest = "^0.11" reqwest = "^0.11"
anyhow = "^1.0" anyhow = "^1.0"

View File

@ -1,4 +1,4 @@
use nicelocal_ext_php_rs::prelude::*; use ext_php_rs::prelude::*;
use php_tokio::{php_async_impl, EventLoop}; use php_tokio::{php_async_impl, EventLoop};
#[php_class] #[php_class]

View File

@ -17,7 +17,7 @@
// Once the result of the Future is ready, tokio doesn't need it anymore, // Once the result of the Future is ready, tokio doesn't need it anymore,
// the suspend_on function is resumed, and we safely drop the Future upon exiting. // the suspend_on function is resumed, and we safely drop the Future upon exiting.
use nicelocal_ext_php_rs::binary_slice::{BinarySlice, PackSlice}; use ext_php_rs::binary_slice::{BinarySlice, PackSlice};
#[inline(always)] #[inline(always)]
pub unsafe fn borrow_unchecked< pub unsafe fn borrow_unchecked<

View File

@ -1,6 +1,6 @@
use crate::borrow_unchecked::borrow_unchecked; use crate::borrow_unchecked::borrow_unchecked;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use nicelocal_ext_php_rs::{ use ext_php_rs::{
boxed::ZBox, call_user_func, prelude::*, types::ZendHashTable, zend::Function, boxed::ZBox, call_user_func, prelude::*, types::ZendHashTable, zend::Function,
}; };
use std::{ use std::{
@ -134,7 +134,7 @@ impl EventLoop {
sys_pipe().map_err(|err| format!("Could not create pipe: {}", err))?; sys_pipe().map_err(|err| format!("Could not create pipe: {}", err))?;
if !call_user_func!( if !call_user_func!(
Function::from_function("class_exists"), Function::try_from_function("class_exists").unwrap(),
"\\Revolt\\EventLoop" "\\Revolt\\EventLoop"
)? )?
.bool() .bool()
@ -143,7 +143,7 @@ impl EventLoop {
return Err(format!("\\Revolt\\EventLoop does not exist!").into()); return Err(format!("\\Revolt\\EventLoop does not exist!").into());
} }
if !call_user_func!( if !call_user_func!(
Function::from_function("interface_exists"), Function::try_from_function("interface_exists").unwrap(),
"\\Revolt\\EventLoop\\Suspension" "\\Revolt\\EventLoop\\Suspension"
)? )?
.bool() .bool()