Doc #65586 [Opn->Csd]: Ambiguity over "deprecation" of SoapClient::__call

From: Date: Fri, 30 Aug 2013 21:25:24 +0000
Subject: Doc #65586 [Opn->Csd]: Ambiguity over "deprecation" of SoapClient::__call
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10231@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65586&edit=1 ID: 65586 Updated by: aharvey@php.net Reported by: rowan dot collins at gmail dot com Summary: Ambiguity over "deprecation" of SoapClient::__call -Status: Open +Status: Closed Type: Documentation Problem -Package: SOAP related +Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. I would say that you're right about the intention being solely to deprecate direct calls. I've updated the documentation accordingly (using your wording wholesale — thanks!). Previous Comments: ------------------------------------------------------------------------ [2013-08-30 21:24:42] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=331240 Log: Use Rowan Collins' phrasing to note that SoapClient::__call() is only deprecated for direct calls, not in general. Fixes doc bug #65586 (Ambiguity over "deprecation" of SoapClient::__call). ------------------------------------------------------------------------ [2013-08-29 17:36:37] rowan dot collins at gmail dot com Description: ------------ The manual describes the SoapClient::__call() function as "deprecated" throughout (e.g. http://www.php.net/soapclient.call), stating that one should "Use SoapClient::__soapCall instead of it." This could be read to imply that the use of "magically defined" methods on a SoapClient object is itself deprecated - since __call() will be known to PHP veterans as the mechanism used for these. However, under SoapClient::__soapCall() [http://www.php.net/manual/en/soapclient.soapcall.php] states that "Usually, in WSDL mode, SOAP functions can be called as methods of the SoapClient object." This implies the opposite - that the magic methods are the preferred mechanism. I suspect that the intention is to discourage *direct* calls to __call(), in which case perhaps the following wording would be more appropriate: > Calling this method directly is deprecated. Usually, SOAP functions can be called as methods of > the SoapClient object; in situations where this is not possible or additional options are needed, > use [SoapClient::__soapCall]. Examples of current wording being misinterpreted: - Bug #37355: "SOAP uses deprecated __call method by default" (Closed Not a bug) - Answer given on StackOverflow not to use direct calls http://stackoverflow.com/a/18495482/157957 [If, on the other hand, it is correct that magic calls are deprecated, the wording on http://www.php.net/manual/en/soapclient.soapcall.php should be updated to reflect that.] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65586&edit=1

« previous php.doc.bugs (#10231) next »