WsdlToPhp / PackageGenerator

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

Prefix/Suffix option used in namespace should not be used in namespace #243

Closed mikaelcom closed 3 years ago

mikaelcom commented 3 years ago

Describe the bug When I generate the classes with prefix=Ews option, the composer.json's autoload section looks like this:

    "autoload": {
        "psr-4": {
            "Ews\\": "./src/Ews",
            "SoapClient\\": "./SoapClient/"
        }
    }

This is wrong as the suffix and prefix options should only be used to prefix and suffix generated classes name

To Reproduce Set the prefix or the suffix option to any value and let the namespace option to an empty value.

Expected behavior If the namespace option value is empty and the suffix or prefix option is set to a value, the composer.json's autoload section should look like this:

    "autoload": {
        "psr-4": {
            "": "./src",
            "SoapClient\\": "./SoapClient/"
        }
    }

Additional context