Skip to content

Commit ac05dea

Browse files
author
Yevhen Miroshnychenko
committed
MAGETWO-92986: Write Logs for Failed Process of Generating Factories in Extensions
1 parent 34af30a commit ac05dea

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Framework\Code;
77

8-
use Magento\Framework\Code\Generator;
98
use Magento\Framework\App\Filesystem\DirectoryList;
109
use Magento\Framework\Filesystem;
1110
use Magento\Framework\Interception\Code\Generator as InterceptionGenerator;

lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ public function generate()
108108
}
109109
}
110110
} catch (FileSystemException $e) {
111-
$message = <<<'EOT'
112-
Error: an object of a generated class may be a dependency for another object, but this dependency has not been defined or set correctly in the signature of the related construct method.
113-
Due to the current error, executing the CLI commands `bin/magento setup:di:compile` or `bin/magento deploy:mode:set production` does not create the required generated classes.
114-
Magento cannot write a class file to the "generated" directory that is read-only. Before using the read-only file system, the classes to be generated must be created beforehand in the "generated" directory.
115-
For details, see the "File systems access permissions" topic at http://devdocs.magento.com.
116-
EOT;
111+
$message = 'Error: an object of a generated class may be a dependency for another object, but this '
112+
. 'dependency has not been defined or set correctly in the signature of the related construct method.'
113+
. 'Due to the current error, executing the CLI commands `bin/magento setup:di:compile` or `bin/magento '
114+
. 'deploy:mode:set production` does not create the required generated classes.'
115+
. 'Magento cannot write a class file to the "generated" directory that is read-only. Before using the '
116+
. 'read-only file system, the classes to be generated must be created beforehand in the "generated" directory.'
117+
. 'For details, see the "File systems access permissions" topic at http://devdocs.magento.com.';
117118
$this->_addError($message);
118119
$this->_addError($e->getMessage());
119120
} catch (\Exception $e) {

0 commit comments

Comments
 (0)