more deprecation logging
authorgggeek <giunta.gaetano@gmail.com>
Mon, 30 Jan 2023 22:51:04 +0000 (22:51 +0000)
committergggeek <giunta.gaetano@gmail.com>
Mon, 30 Jan 2023 22:51:04 +0000 (22:51 +0000)
src/Client.php
src/Helper/XMLParser.php
src/Wrapper.php

index da15e65..775fe23 100644 (file)
@@ -726,6 +726,8 @@ class Client
      */
     public function setSSLVerifyPeer($i)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->verifypeer = $i;
         return $this;
     }
@@ -741,6 +743,8 @@ class Client
      */
     public function setSSLVerifyHost($i)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->verifyhost = $i;
         return $this;
     }
@@ -754,6 +758,8 @@ class Client
      */
     public function setSSLVersion($i)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->sslversion = $i;
         return $this;
     }
@@ -817,6 +823,8 @@ class Client
      */
     public function setRequestCompression($compMethod)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->request_compression = $compMethod;
         return $this;
     }
@@ -866,6 +874,8 @@ class Client
      */
     public function setCurlOptions($options)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->extracurlopts = $options;
         return $this;
     }
@@ -877,6 +887,8 @@ class Client
      */
     public function setUseCurl($useCurlMode)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->use_curl = $useCurlMode;
         return $this;
     }
@@ -893,6 +905,8 @@ class Client
      */
     public function setUserAgent($agentString)
     {
+        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
+
         $this->user_agent = $agentString;
         return $this;
     }
index 4e2d187..efba338 100644 (file)
@@ -317,7 +317,7 @@ class XMLParser
             if ($acceptSingleVals === false) {
                 $accept = $this->current_parsing_options['accept'];
             } else {
-                //trigger_error('using argument $acceptSingleVals is deprecated', E_USER_DEPRECATED);
+                $this->logDeprecation('Using argument $acceptSingleVals for method ' . __METHOD__ . ' is deprecated');
                 $accept = self::ACCEPT_REQUEST | self::ACCEPT_RESPONSE | self::ACCEPT_VALUE;
             }
             if (($name == 'METHODCALL' && ($accept & self::ACCEPT_REQUEST)) ||
@@ -489,7 +489,8 @@ class XMLParser
      */
     public function xmlrpc_se_any($parser, $name, $attrs)
     {
-        //trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);
+        // avoid spamming the log with warnings in case this is in use...
+        //$this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
 
         $this->xmlrpc_se($parser, $name, $attrs, true);
     }
index b1013c2..4ede26e 100644 (file)
@@ -160,7 +160,7 @@ class Wrapper
      * @todo decide how to deal with params passed by ref in function definition: bomb out or allow?
      * @todo finish using phpdoc info to build method sig if all params are named but out of order
      * @todo add a check for params of 'resource' type
-     * @todo add some trigger_errors / error_log when returning false?
+     * @todo add some error logging when returning false?
      * @todo what to do when the PHP function returns NULL? We are currently returning an empty string value...
      * @todo add an option to suppress php warnings in invocation of user function, similar to server debug level 3?
      * @todo add a verbatim_object_copy parameter to allow avoiding usage the same obj instance?