-
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):
...then I will get the following directory structure:
...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:
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! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Indeed, you're right! It was a personal decision and I considered that setting the namespace would mean that the files should be located at the corresponding directory structure. This was not the 3.x behaviour. But you're right, namespace can be defined as you want without matching the directory structure using composer. To match your desired behaviour, it would require a new option to disable the namespace-structured directory destination. Do you agree that by default, the directory structure must match the namespace? |
Beta Was this translation helpful? Give feedback.
Indeed, you're right!
It was a personal decision and I considered that setting the namespace would mean that the files should be located at the corresponding directory structure. This was not the 3.x behaviour.
But you're right, namespace can be defined as you want without matching the directory structure using composer.
To match your desired behaviour, it would require a new option to disable the namespace-structured directory destination.
Do you agree that by default, the directory structure must match the namespace?