diff --git a/app/code/Magento/SampleData/Model/Dependency.php b/app/code/Magento/SampleData/Model/Dependency.php index 09f0c16aac848..2a1849364bd77 100644 --- a/app/code/Magento/SampleData/Model/Dependency.php +++ b/app/code/Magento/SampleData/Model/Dependency.php @@ -88,6 +88,10 @@ protected function getSuggestsFromModules() foreach ($this->componentRegistrar->getPaths(ComponentRegistrar::MODULE) as $moduleDir) { $file = $moduleDir . '/composer.json'; + if (!file_exists($file) || !is_readable($file)) { + continue; + } + /** @var Package $package */ $package = $this->getModuleComposerPackage($file); $suggest = json_decode(json_encode($package->get('suggest')), true);