php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65586 Ambiguity over "deprecation" of SoapClient::__call
Submitted: 2013-08-29 17:36 UTC Modified: 2013-08-30 21:25 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rowan dot collins at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-08-29 17:36 UTC] 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.]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-30 21:24 UTC] 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-30 21:25 UTC] aharvey@php.net
-Status: Open +Status: Closed -Package: SOAP related +Package: Documentation problem -Assigned To: +Assigned To: aharvey
 [2013-08-30 21:25 UTC] aharvey@php.net
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!).
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 09:00:02 2026 UTC