Closed tbl0605 closed 3 years ago
Probably the cause of the issue https://github.com/WsdlToPhp/PackageGenerator/issues/206
Actually, the composer.json file is first created by Composer itself at https://github.com/WsdlToPhp/PackageGenerator/blob/develop/src/File/Composer.php#L39-L55.
Could you try adding a exit(); call after these lines and check if Composer succeeds to initiate the composer.json file?
Oh well, you are right! I've previously launched my script using Apache, but when I launch same script as PHP CLI everything works as expected:
Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
Writing composer.json
Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Updating dependencies
Dependency resolution completed in 0.002 seconds
Analyzed 87 packages to resolve dependencies
Analyzed 95 rules to resolve dependencies
Lock file operations: 1 install, 0 updates, 0 removals
Installs: wsdltophp/packagebase:5.0.1
- Locking wsdltophp/packagebase (5.0.1)
Writing lock file
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
Installs: wsdltophp/packagebase:5.0.1
- Installing wsdltophp/packagebase (5.0.1): Extracting archive
Generating optimized autoload files
Feel free to close my bug report, since it works as expected in CLI mode.
And thank you for your great work :)
I'll improve the method anyway, thanks for your feedback.
Hi, after updating the package generator from version 3.3.4 to version 4.1.0, I've get following error when starting the generator in standalone mode:
My code is very similar to the README example:
Workaround: When I manually create a
composer.json
file directly in the output dir, the generator works again (and the PHP files are correctly generated) but thecomposer.json
file isn't updated, thecomposer.lock
file isn't created and thevendor
directory isn't created.Expected: The
composer.json
file, thecomposer.lock
file and thevendor
directory should automatically be created.The culprit is following code in
WsdlToPhp\PackageGenerator\File\Composer
, that expectscomposer.json
to exist, even in standalone mode: