f00b4r / nusoap

:smirk: Fixed NuSOAP for PHP 5.6 - 8.2
https://f00b4r.github.io/nusoap/
320 stars 356 forks source link

Depreciated Error in Laravel 5.5 #19

Open mariedavis-abn opened 6 years ago

mariedavis-abn commented 6 years ago

I am getting this message when I call the class 'soapclient'. _Methods with the same name as their class will not be constructors in a future version of PHP; nusoapclient has a deprecated constructor I am using Laravel 5.5 with PHP 7.0. What do I need to do to fix this ?

f3l1x commented 6 years ago

Hi @mariedavis-abn, well I'm not sure. :(

Anyone else could help out?

alexmpereira commented 5 years ago

Hello @mariedavis-abn , In PHP version 7.0 you can no longer create constructors with the class name. To create a constructor, use __construct.

Check the nusoap_client class, there is a method called nusoap_client that in the old versions of PHP would be our constructor. Replace the soapclient method name for __construc equal to the PHP documentation: http://php.net/manual/pt_BR/language.oop5.decon.php

If it does not solve, it would be interesting to publish the codes for better analysis. Thank you