Provided Fix does not work for Cloud
Your patch is not a solution because Magento Cloud disables all extensions upon deployment and then re-enables them all so including a fix as a module does not work. The issue with vendor/magento/framework/Module/Dir/Reader.php
needs to be solved in a way that does not modify the Magento core files.
I tried to create a Magento Patch with your fix, which I got to successfully run upon Cloud deployment and the vendor files were modified before Cloud tried to re-enable all the modules but your changes to these made to these files causes the Magento installation process to break, stopping installation progress % preventing it from reaching 100%…and so module or patch it is not a solution either.
Is there anything else that can be done to make Stripe compatible with Cloud? Something you can modify on the module end instead of the vendor files end?
thanks
Magento Patch for m2-hotfixes folder upon deployment
index c60270d..c449718 100644
--- a/vendor/magento/framework/Module/Dir/Reader.php
+++ b/vendor/magento/framework/Module/Dir/Reader.php
@@ -122,13 +122,15 @@ class Reader
$result = [];
foreach ($this->modulesList->getNames() as $moduleName) {
$moduleSubDir = $this->getModuleDir($subDir, $moduleName);
- $file = $moduleSubDir . '/' . $filename;
- $directoryRead = $this->readFactory->create($moduleSubDir);
- $path = $directoryRead->getRelativePath($file);
- if ($directoryRead->isExist($path)) {
- $result[] = $file;
- }
}
+ if ($moduleSubDir) {
+ $file = $moduleSubDir . '/' . $filename;
+ $directoryRead = $this->readFactory->create($moduleSubDir);
+ $path = $directoryRead->getRelativePath($file);
+ if ($directoryRead->isExist($path)) {
+ $result[] = $file;
+ }
+ }
return $result;
}