mozart icon indicating copy to clipboard operation
mozart copied to clipboard

Error processing package with no composer.json file

Open olegabr opened this issue 4 years ago • 1 comments

https://github.com/Freemius/wordpress-sdk/issues/463

It can not process freemius/wordpress-sdk because it prunes the composer.json file: https://github.com/Freemius/wordpress-sdk/blob/master/package.json#L12

> "vendor/bin/mozart" compose
PHP Warning:  file_get_contents(/home/USERNAME/PROJECTDIR/vendor/freemius/wordpress-sdk//composer.json): failed to open stream: No such file or directory in /home/USERNAME/PROJECTDIR/vendor/coenjacobs/mozart/src/Composer/Package.php on line 33
PHP Warning:  file_get_contents(/home/USERNAME/PROJECTDIR/vendor/freemius/wordpress-sdk/composer.json): failed to open stream: No such file or directory in /home/USERNAME/PROJECTDIR/vendor/coenjacobs/mozart/src/Console/Commands/Compose.php on line 171
PHP Notice:  Trying to get property 'name' of non-object in /home/USERNAME/PROJECTDIR/vendor/coenjacobs/mozart/src/Mover.php on line 103

olegabr avatar Dec 21 '20 14:12 olegabr

It shouldn't prune the composer.json file if the package is installable via Composer (which I am not sure it actually is, but I'm confident it can). Actually, does this even prune the file after you install it via Composer? The composer.json file is in the repository, so if you composer install it, it should be there still after installation, right?

coenjacobs avatar Jan 17 '21 18:01 coenjacobs