[ErrorException]
file_get_contents([path]/app/code/[Vendor]/[ModuleName]/composer.json): failed to open stream: No such file or directory
Although in most cases you would have a composer file it seems a trivial task to just check if the composer file exists in app/code/Magento/SampleData/Model/Dependency.php
Happy to send a pull request if this is not intended behaviour to force people to create composer files though
Hello! Please, provide the used version. If the problem is actual for a specific branch, please, specify it and be sure that the latest update was used.
According to contributor guide, tickets without response for two weeks should be closed.
Please feel free to reopen if it's needed.
2.1.1 store, tried to remove sample data, same result:
bin/magento sampledata:remove
Warning: file_get_contents(/home/XXX/www/app/code/Smartwave/Porto/composer.json): failed to open stream: No such file or directory in /home/XXX/www/vendor/magento/module-sample-data/Model/Dependency.php on line 109
I'm getting a similar error when running magento sampledata:deploy on Magento 2.1.1:
[Exception]
Warning: file_get_contents(path/to/app/code/Vendor/SomeModule/composer.json): failed to open stream: No such file or directory in path/to/vendor/magento/module-sample-data/Model/Dependency.php on line 109
The only solution I could find was https://mage2.pro/t/topic/327.
UPDATE: I just applied the patch from above and can confirm that it works :). The only difference is I modified this file: vendor/magento/module-sample-data/Model/Dependency.php.
Most helpful comment
I'm getting a similar error when running
magento sampledata:deployon Magento 2.1.1:The only solution I could find was https://mage2.pro/t/topic/327.
UPDATE: I just applied the patch from above and can confirm that it works :). The only difference is I modified this file:
vendor/magento/module-sample-data/Model/Dependency.php.