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

Creation of dynamic property wsdl::$schemaTargetNamespace is deprecated #126

Open
syntaxerror opened this issue Nov 5, 2024 · 0 comments

Comments

@syntaxerror
Copy link

I was running a script on PHP 8.2 who includes this code:

`require_once('lib/nusoap.php');

$NAMESPACE = 'https://localhost/MyIntegrationWS';

$server = new soap_server;

$server->debug_flag=false;
$server->configureWSDL('MyIntegrationWSPHP', $NAMESPACE);
$server->wsdl->schemaTargetNamespace = $NAMESPACE;`

Which is returning a 'Creation of dynamic property wsdl::$schemaTargetNamespace is deprecated' php error.

ChatGPT recommends to add the following property declaration inside the wsdl class:

class wsdl { public $schemaTargetNamespace; // Other existing properties and methods... }

ChatGPT's explanation is that by declaring public $schemaTargetNamespace; in the wsdl class, you prevent PHP from generating a dynamic property, which eliminates the deprecation warning.

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

No branches or pull requests

1 participant