From 020811fecb235f1249065441e3347fa1fc14657c Mon Sep 17 00:00:00 2001 From: Oleh Posyniak Date: Wed, 18 Jan 2017 17:26:08 +0200 Subject: [PATCH] MAGETWO-63295: Installation fails because 'generated' directory is absent --- .gitignore | 2 ++ .../Magento/Framework/App/Filesystem/DirectoryList.php | 6 ++++++ lib/internal/Magento/Framework/Setup/FilePermissions.php | 1 + 3 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index a5b85031db205..addc0e013545c 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ atlassian* !/var/.htaccess /vendor/* !/vendor/.htaccess +/generated/* +!/generated/.htaccess diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php index 57c903b49198c..8ab0ba3bc3e95 100644 --- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php +++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php @@ -109,6 +109,11 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList const TEMPLATE_MINIFICATION_DIR = 'html'; + /** + * Generated code. + */ + const GENERATED = 'generated'; + /** * {@inheritdoc} */ @@ -135,6 +140,7 @@ public static function getDefaultConfig() self::TEMPLATE_MINIFICATION_DIR => [parent::PATH => 'var/view_preprocessed/html'], self::SETUP => [parent::PATH => 'setup/src'], self::COMPOSER_HOME => [parent::PATH => 'var/composer_home'], + self::GENERATED => [parent::PATH => 'generated'], ]; return parent::getDefaultConfig() + $result; } diff --git a/lib/internal/Magento/Framework/Setup/FilePermissions.php b/lib/internal/Magento/Framework/Setup/FilePermissions.php index 4cc4a1852f0d7..800c9f69cde8d 100644 --- a/lib/internal/Magento/Framework/Setup/FilePermissions.php +++ b/lib/internal/Magento/Framework/Setup/FilePermissions.php @@ -82,6 +82,7 @@ public function getInstallationWritableDirectories() DirectoryList::VAR_DIR, DirectoryList::MEDIA, DirectoryList::STATIC_VIEW, + DirectoryList::GENERATED, ]; foreach ($data as $code) { $this->installationWritableDirectories[$code] = $this->directoryList->getPath($code);