Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeGenerator can't generate types if parent directory contains underscores #76

Closed
marek-pietrzak-tg opened this issue Sep 29, 2017 · 1 comment · Fixed by #78
Closed
Assignees
Labels

Comments

@marek-pietrzak-tg
Copy link
Contributor

Introduced in #71

I have just tried to create types for the configuration stored in /config/code_generator folder.
It failed with:

  [Phpro\SoapClient\Exception\RuntimeException]
  /mnt/c/Apache24/htdocs/xxx/config/code/generator/../../src/Types/Payment does not exist and could not be created.


Exception trace:
 () at /mnt/c/Apache24/htdocs/xxx/vendor/phpro/soap-client/src/Phpro/SoapClient/Util/Filesystem.php:29
 Phpro\SoapClient\Util\Filesystem->ensureDirectoryExists() at /mnt/c/Apache24/htdocs/xxx/vendor/phpro/soap-client/src/Phpro/SoapClient/Console/Command/GenerateTypesCommand.php:120
 Phpro\SoapClient\Console\Command\GenerateTypesCommand->handleType() at /mnt/c/Apache24/htdocs/xxx/vendor/phpro/soap-client/src/Phpro/SoapClient/Console/Command/GenerateTypesCommand.php:96
 Phpro\SoapClient\Console\Command\GenerateTypesCommand->execute() at /mnt/c/Apache24/htdocs/xxx/vendor/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at /mnt/c/Apache24/htdocs/xxx/vendor/symfony/console/Application.php:888
 Symfony\Component\Console\Application->doRunCommand() at /mnt/c/Apache24/htdocs/xxx/vendor/symfony/console/Application.php:224
 Symfony\Component\Console\Application->doRun() at /mnt/c/Apache24/htdocs/xxx/vendor/symfony/console/Application.php:125
 Symfony\Component\Console\Application->run() at /mnt/c/Apache24/htdocs/xxx/vendor/phpro/soap-client/bin/soap-client:26

generate:types [--config CONFIG] [-o|--overwrite]

The config file I used for configuration started with

return Config::create()
    ->setWsdl(__DIR__ . '/../wsdl/PaymentService.wsdl')
    ->setDestination(__DIR__ . '/../../src/Types/Payment')

As you can see all underscores from my __DIR__ have been replaced with /. In this case code_generator was replaced by /code/generator.

@veewee veewee added the bug label Sep 29, 2017
janvernieuwe added a commit to janvernieuwe/soap-client that referenced this issue Sep 29, 2017
@marek-pietrzak-tg
Copy link
Contributor Author

Thanks @janvernieuwe for the quick fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants