You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "jmjoy (via GitHub)" <gi...@apache.org> on 2023/05/19 01:31:34 UTC

[GitHub] [skywalking-php] jmjoy commented on a diff in pull request #76: Fix hook for Doctrine PDO class

jmjoy commented on code in PR #76:
URL: https://github.com/apache/skywalking-php/pull/76#discussion_r1198461169


##########
src/plugin/plugin_pdo.rs:
##########
@@ -198,8 +198,17 @@ fn after_hook(
             );
         }
     } else if let Some(obj) = return_value.as_mut_z_obj() {
-        if obj.get_class().get_name() == &"PDOStatement" {
-            return after_hook_when_pdo_statement(get_this_mut(execute_data)?, obj);
+        let cls=obj.get_class().get_name().to_str()?;
+        match cls {
+            "PDOStatement" => {

Review Comment:
   Use `"PDOStatement" | r"Doctrine\DBAL\Driver\PDO\Statement"` here so you can merge the condition?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org