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

UnexpectedValueException under php 8.1 #307

Closed timsterzel closed 3 months ago

timsterzel commented 7 months ago

Describe the bug I'm trying to use the generator under PHP8.1. As I haven't found any specific information about PHP8 in the documentation, I changed the wget call to:

wget https://phar.wsdltophp.com/wsdltophp-php81.phar

The file is found, but when I want to execute the file, even without parameters, I get the following error:

PHP Fatal error:  Uncaught UnexpectedValueException: DirectoryIterator::__construct(phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/../Resources/): Failed to open directory: operation failed in phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/DumpCompletionCommand.php:152
Stack trace:
#0 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/DumpCompletionCommand.php(152): DirectoryIterator->__construct()
#1 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/DumpCompletionCommand.php(55): Symfony\Component\Console\Command\DumpCompletionCommand->getSupportedShells()
#2 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/Command.php(137): Symfony\Component\Console\Command\DumpCompletionCommand->configure()
#3 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Application.php(1136): Symfony\Component\Console\Command\Command->__construct()
#4 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Application.php(1312): Symfony\Component\Console\Application->getDefaultCommands()
#5 phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Application.php(536): Symfony\Component\Console\Application->init()
#6 phar:///usr/local/bin/wsdltophp/console(11): Symfony\Component\Console\Application->add()
#7 /usr/local/bin/wsdltophp(10): require('...')
#8 {main}
  thrown in phar:///usr/local/bin/wsdltophp/vendor/symfony/console/Command/DumpCompletionCommand.php on line 152

I unpacked the phar archive and it looks like it’s version 4.1.10. But when I download version 4.1.10 from the Github Releases, I don’t get any errors. Are the PHP7 version or the latest release version 4.1.11 compatible with PHP 8.1 and 8.2?

To Reproduce

Expected behavior Generation of the files without errors.

mikaelcom commented 7 months ago

Hi, The symfony console command requires files that were not included in the phar file, which I just fixed. You should be able to use the new phar now, Let me know then

mikaelcom commented 3 months ago

fixed