WsdlToPhp / PackageGenerator

Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
https://providr.io
MIT License
418 stars 73 forks source link

Remove deprecated message #267

Closed Oipnet closed 2 years ago

Oipnet commented 2 years ago

Add the return type for methods :

mikaelcom commented 2 years ago

What are the deprecated message exactly?

Oipnet commented 2 years ago

Sorry I forgot that it was not avaible for PHP 7.4. I think it was ok.

This is the trace (I use php 8)

2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetGet()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObj
ectContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObje
ctContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractOb
jectContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::current()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectCo
ntainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::next()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectContai
ner" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::key()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectContai
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::rewind()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectCont
ainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Countable::count()" might add "int" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectConta
iner" now to avoid errors or add an explicit @return annotation to suppress this message.

You can reject this pull request.

mikaelcom commented 2 years ago

Sorry I forgot that it was not avaible for PHP 7.4. I think it was ok.

This is the trace (I use php 8)

2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetGet()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObj
ectContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObje
ctContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractOb
jectContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::current()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectCo
ntainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::next()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectContai
ner" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::key()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectContai
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Iterator::rewind()" might add "void" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectCont
ainer" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-02T06:58:10+00:00 [info] User Deprecated: Method "Countable::count()" might add "int" as a native return type declaration in the future. Do the same in implementation "WsdlToPhp\PackageGenerator\Container\AbstractObjectConta
iner" now to avoid errors or add an explicit @return annotation to suppress this message.

You can reject this pull request.

Or you simply remove the mixed return type which would be best than nothing. For the mixed, add the @return annotation and it would solve the deprecated messages, no?

Oipnet commented 2 years ago

I remove mixed and add the @return annotation. It seems ok for me.