4
votes

I would like to use nusoap on Laravel 5.3 with PHP7. But when ill try to install it with composer from that package:

https://github.com/codecasts/nusoap-php7 (v.0.9.6)

It still returns me:

ErrorException in class.soapclient.php line 26: Methods with the same name as their class will not be constructors in a future version of PHP; nusoap_client has a deprecated constructor

Ill cleared the cache, but all with no success. Anyone has successfully implemented nusoap in Laravel with PHP7 ?

1
Are you sure you are using the code you linked? It has proper constructor name (__construct), so it shouldn't throw that error. - Furgas
Of course. I installed it with composer, and it says me that it is correct installed. Also checked my vendor plugins. Thats why i am not sure what cause the problem (and asking is someone has it successfully installed) - so youre working with nosuap on php7? - derdida
To be sure, break that file you think you are using (for example change word class to start_working_damnit ;) and check if you get parse error. If not, then you'are not using this file. Other than that I don't have a clue. - Furgas
Already tried, everything seems to be correct ;) - but thanks for your help - derdida

1 Answers

14
votes

I've had the same problem. I've found on GitHub a new version of the nusoap.php file that you will have to copy in your actual NuSoap folder. The deprecated constructor has been rewritten.

Here is the link where you'll be able to get the file: https://github.com/econea/nusoap