Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined method in SoapClient #262

Closed
honzagula opened this issue May 9, 2017 · 3 comments
Closed

Undefined method in SoapClient #262

honzagula opened this issue May 9, 2017 · 3 comments

Comments

@honzagula
Copy link

When you use \SoapClient, it's called with method name defined in WSDL:

$client = new \SoapClient($url);
$client->getCalendar($data);

PHPStan returns error:
Call to an undefined method SoapClient::getCalendar().

Is it possible to ignore this error or whole class?

@ondrejmirtes
Copy link
Member

You can either create your own class reflection extension that defines these methods, or ignore this error with a regular expression:

ignoreErrors:
	- '#Call to an undefined method SoapClient::#'

@honzagula
Copy link
Author

Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Dec 20, 2019
@ondrejmirtes
Copy link
Member

PHPStan now includes the class reflection extension for SoapClient's magic methods out of the box: phpstan/phpstan-src@f6107ad

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants