-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Discussed in #261
Originally posted by mwolff-fn February 3, 2022
Hi,
I was using the PackageGenerator via wsdltophp.phar in version 3.2.7 before and now I joyfully discovered that I can now install the latest version via Phar, so I did that, upgrading to 4.1.1.
Now, when I run the generator using the exact same settings as before, the directory structures of the generated files will be completely different. Suppose I run this command with wsdltophp.phar 3.2.7 (additionally, the "standalone" option is set to false in wsdltophp.yml):
wsdltophp generate:package --urlorpath="./resources/SERVICE.wsdl" --destination="./proxy/soap/$SERVICE" --namespace="My\\Namespace\\Proxy\\Soap\\SERVICE" --force --verbose
...then I will get the following directory structure:
/project_root
/proxy
/soap
/SERVICE
/Enum
...enum class files...
/Service
Service.php
/Struct
...struct class files...
ClassMap.php
tutorial.php
...and all class files will be generated with the namespace prefix "My\Namespace\Proxy\Soap\SERVICE", followed by the category name (e.g. "\Service", "\Enum", "\Struct").
If I wanted to generate proxy classes for multiple services, I just need to point Composer's autoloader to /proxy/soap for all namespaces beginning with My\Namespace\Proxy\Soap and I'm done.
Now, if I re-generate the proxy classes using the exact same configuration with the wsdltophp.phar version 4.1.1, then I'm getting this directory structure instead:
/project_root
/proxy
/soap
/SERVICE
/My
/Namespace
/Proxy
/Soap
/SERVICE
/Enum
...enum class files...
/Service
Service.php
/Struct
...struct class files...
ClassMap.php
So basically, the generator now uses the initial destination dir as a base and appends the whole namespace as subdirectory structure, which is neither desired nor the previous behaviour.
How can I fix that and regenerate the classes in the same directory structure as before, while keeping the same namespace settings??
Thanks a lot!