You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/04/15 14:05:41 UTC
[skywalking-php] branch master updated: Update and adapt phper. (#66)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-php.git
The following commit(s) were added to refs/heads/master by this push:
new cbb98fe Update and adapt phper. (#66)
cbb98fe is described below
commit cbb98fe9e0316a7d059bbb07ef8e5fa16550b570
Author: jmjoy <jm...@apache.org>
AuthorDate: Sat Apr 15 22:05:35 2023 +0800
Update and adapt phper. (#66)
---
Cargo.lock | 20 ++++++++++----------
Cargo.toml | 2 +-
dist-material/LICENSE | 10 +++++-----
src/execute.rs | 2 +-
src/plugin/plugin_amqplib.rs | 2 +-
src/plugin/plugin_curl.rs | 2 +-
src/plugin/plugin_predis.rs | 2 +-
src/plugin/plugin_redis.rs | 4 ++--
src/plugin/plugin_swoole.rs | 2 +-
9 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 3d29efc..7b375e5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1415,9 +1415,9 @@ dependencies = [
[[package]]
name = "phper"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5cb40cd004cf222434703239b49d07b2bf0f632af9701553b6b9c16c9b05fc3"
+checksum = "c28195fa0313e27a2ac0dfd79d4ee7889f01f66b08f80d2b1e26130c5e01c2ab"
dependencies = [
"derive_more",
"indexmap",
@@ -1431,9 +1431,9 @@ dependencies = [
[[package]]
name = "phper-alloc"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cbb7c06346db332579f4e8d15a46b4bde5130d6c564c4ca94213b2d49ab9348"
+checksum = "ed016d536260adc590ad63edfb8ce409ab5338ef6c7669626580a5332fe4c5f7"
dependencies = [
"phper-build",
"phper-sys",
@@ -1441,18 +1441,18 @@ dependencies = [
[[package]]
name = "phper-build"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90c22104ab577270b22a9774c5b358401b164bd193caf28e297bce8840c08c36"
+checksum = "a15e920851973d22f5a9792ace0d189d90556835f3485ad34ec680a4d6521ccf"
dependencies = [
"phper-sys",
]
[[package]]
name = "phper-macros"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b29fc223f3fb43b69dda7263faf91d553f449af8117ae418f23bf9d280ed61a"
+checksum = "b89278471a6d391aaf0653696ee0a5cc100bcd9d5aa61e031fa243c0ba70ad61"
dependencies = [
"proc-macro2",
"quote",
@@ -1461,9 +1461,9 @@ dependencies = [
[[package]]
name = "phper-sys"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "041c00aa64e0bff7048033a0e425417367258c0a6e42f5db594d327d49090d5e"
+checksum = "e4bcec8fe129beca96a1bbee80e585d58aa70b86149aa822e396744adf44d4ec"
dependencies = [
"bindgen",
"cc",
diff --git a/Cargo.toml b/Cargo.toml
index 3e2c970..107b89e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -44,7 +44,7 @@ futures-util = "0.3.27"
hostname = "0.3.1"
libc = "0.2.140"
once_cell = "1.17.1"
-phper = "0.10.2"
+phper = "0.11.0"
prost = "0.11.8"
serde_json = { version = "1.0.94", features = ["preserve_order"] }
skywalking = { version = "0.6.0", features = ["management"] }
diff --git a/dist-material/LICENSE b/dist-material/LICENSE
index a8528e5..1cff62b 100644
--- a/dist-material/LICENSE
+++ b/dist-material/LICENSE
@@ -578,11 +578,11 @@ MulanPSL-2.0 licenses
The following components are provided under the MulanPSL-2.0 License. See project link for details.
The text of each license is also included in licenses/LICENSE-[project].txt.
- https://crates.io/crates/phper/0.10.2 0.10.2 MulanPSL-2.0
- https://crates.io/crates/phper-alloc/0.10.2 0.10.2 MulanPSL-2.0
- https://crates.io/crates/phper-build/0.10.2 0.10.2 MulanPSL-2.0
- https://crates.io/crates/phper-macros/0.10.2 0.10.2 MulanPSL-2.0
- https://crates.io/crates/phper-sys/0.10.2 0.10.2 MulanPSL-2.0
+ https://crates.io/crates/phper/0.11.0 0.11.0 MulanPSL-2.0
+ https://crates.io/crates/phper-alloc/0.11.0 0.11.0 MulanPSL-2.0
+ https://crates.io/crates/phper-build/0.11.0 0.11.0 MulanPSL-2.0
+ https://crates.io/crates/phper-macros/0.11.0 0.11.0 MulanPSL-2.0
+ https://crates.io/crates/phper-sys/0.11.0 0.11.0 MulanPSL-2.0
========================================================================
Unlicense licenses
diff --git a/src/execute.rs b/src/execute.rs
index 4ec1801..ee78fef 100644
--- a/src/execute.rs
+++ b/src/execute.rs
@@ -303,7 +303,7 @@ fn infer_request_id(execute_data: &mut ExecuteData) -> Option<i64> {
prev_execute_data_ptr = unsafe { (*prev_execute_data_ptr).prev_execute_data };
continue;
}
- let Some(request) = prev_execute_data.get_parameter(0).as_mut_z_obj() else {
+ let Some(request) = prev_execute_data.get_mut_parameter(0).as_mut_z_obj() else {
return None;
};
match request.get_mut_property("fd").as_long() {
diff --git a/src/plugin/plugin_amqplib.rs b/src/plugin/plugin_amqplib.rs
index c894a5a..e6065a8 100644
--- a/src/plugin/plugin_amqplib.rs
+++ b/src/plugin/plugin_amqplib.rs
@@ -143,7 +143,7 @@ impl AmqplibPlugin {
let sw_header = RequestContext::try_get_sw_header(request_id)?;
let message = execute_data
- .get_parameter(0)
+ .get_mut_parameter(0)
.as_mut_z_obj()
.context("message isn't object")?;
diff --git a/src/plugin/plugin_curl.rs b/src/plugin/plugin_curl.rs
index 71eb0db..7ca08f5 100644
--- a/src/plugin/plugin_curl.rs
+++ b/src/plugin/plugin_curl.rs
@@ -110,7 +110,7 @@ impl CurlPlugin {
let options = execute_data.get_parameter(1).as_long();
if options == Some(SKY_CURLOPT_HTTPHEADER) {
- *execute_data.get_parameter(1) = CURLOPT_HTTPHEADER.into();
+ *execute_data.get_mut_parameter(1) = CURLOPT_HTTPHEADER.into();
} else if options == Some(CURLOPT_HTTPHEADER) {
let value = execute_data.get_parameter(2);
if value.get_type_info().is_array() {
diff --git a/src/plugin/plugin_predis.rs b/src/plugin/plugin_predis.rs
index 1f58197..2773095 100644
--- a/src/plugin/plugin_predis.rs
+++ b/src/plugin/plugin_predis.rs
@@ -186,7 +186,7 @@ impl PredisPlugin {
let peer = format!("{}:{}", host, port);
let handle = this.handle();
- let command = execute_data.get_parameter(0).expect_mut_z_obj()?;
+ let command = execute_data.get_mut_parameter(0).expect_mut_z_obj()?;
let command_class_name = command
.get_class()
.get_name()
diff --git a/src/plugin/plugin_redis.rs b/src/plugin/plugin_redis.rs
index ffa5b28..3db2ddf 100644
--- a/src/plugin/plugin_redis.rs
+++ b/src/plugin/plugin_redis.rs
@@ -217,7 +217,7 @@ impl RedisPlugin {
}
let host = {
- let mut f = || {
+ let f = || {
Ok::<_, anyhow::Error>(
execute_data
.get_parameter(0)
@@ -236,7 +236,7 @@ impl RedisPlugin {
}
};
let port = {
- let mut f = || {
+ let f = || {
execute_data
.get_parameter(1)
.as_long()
diff --git a/src/plugin/plugin_swoole.rs b/src/plugin/plugin_swoole.rs
index 7a025c0..57bf2f3 100644
--- a/src/plugin/plugin_swoole.rs
+++ b/src/plugin/plugin_swoole.rs
@@ -58,7 +58,7 @@ impl SwooleServerPlugin {
// Hack the closure with the
// [`crate::request::skywalking_hack_swoole_on_request`].
- let closure = execute_data.get_parameter(1);
+ let closure = execute_data.get_mut_parameter(1);
let ori_closure = replace(
closure,
ZVal::from(ZString::new(