From 9c997189a033a0bfbdd578d7e3d7222a3665e77a Mon Sep 17 00:00:00 2001 From: Eddie Lau Date: Mon, 31 Aug 2015 12:00:27 -0500 Subject: [PATCH 01/23] MAGETWO-41553: [Github] Not all required PHP extensions are checked in setup - added required extension to composer.json --- composer.json | 1 + composer.lock | 39 ++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index e447e81b3a0d0..da35322abddd9 100644 --- a/composer.json +++ b/composer.json @@ -61,6 +61,7 @@ "ext-intl": "*", "ext-xsl": "*", "ext-mbstring": "*", + "ext-pdo_mysql": "*", "sjparkinson/static-review": "~4.1", "fabpot/php-cs-fixer": "~1.2", "lusitanian/oauth": "~0.3" diff --git a/composer.lock b/composer.lock index d2fd58a42d594..def69720ed766 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b06fa6ec127580416633b88e4ea6a6d0", + "hash": "a47eff2843a02e74591f5c458fd55060", "packages": [ { "name": "braintree/braintree_php", @@ -94,7 +94,7 @@ "Composer": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -223,7 +223,7 @@ "MagentoHackathon\\Composer\\Magento": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0" ], @@ -293,7 +293,7 @@ "Zend_": "library/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "include-path": [ "library/" ], @@ -409,7 +409,7 @@ "lessc.inc.php" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -613,7 +613,7 @@ "Psr\\Log\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -657,7 +657,7 @@ "Seld\\JsonLint\\": "src/Seld/JsonLint/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -902,7 +902,7 @@ "cssmin.php" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -2552,7 +2552,7 @@ "League\\CLImate\\": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2613,7 +2613,7 @@ "OAuth\\Unit": "tests" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2668,7 +2668,7 @@ "PDepend\\": "src/main/php/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -2709,7 +2709,7 @@ "PHPMD\\": "src/main/php" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -2822,7 +2822,7 @@ "File/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "include-path": [ "" ], @@ -3025,7 +3025,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "include-path": [ "", "../../symfony/yaml/" @@ -3200,7 +3200,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -3464,7 +3464,7 @@ "StaticReview\\": "src/" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -3535,7 +3535,7 @@ "CodeSniffer/Standards/Zend/Sniffs/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -3893,6 +3893,7 @@ "ext-iconv": "*", "ext-intl": "*", "ext-xsl": "*", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-pdo_mysql": "*" } } From 8c5660afde75df680843847e2a24d2f2e7532d3e Mon Sep 17 00:00:00 2001 From: Safwan Khan Date: Mon, 31 Aug 2015 17:21:06 -0500 Subject: [PATCH 02/23] MAGETWO-30737: [Usability] UI installer wording improvements - Changed the wording. --- setup/view/magento/setup/landing.phtml | 4 ++-- setup/view/magento/setup/web-configuration.phtml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/view/magento/setup/landing.phtml b/setup/view/magento/setup/landing.phtml index 1c02d8970ddd0..07ce620501372 100644 --- a/setup/view/magento/setup/landing.phtml +++ b/setup/view/magento/setup/landing.phtml @@ -13,9 +13,9 @@ version; ?>

- Welcome to Magento Admin, your online store headquarters. + Welcome to the Magento Admin, your online store headquarters.
- Click 'Agree and Set Up Magento' or read Getting Started to learn more. + Click 'Agree and Set Up Magento' to continue or read Getting Started to learn more.

From 03e71282539f741f29ed785d4ae104895a1e1b54 Mon Sep 17 00:00:00 2001 From: Eddie Lau Date: Fri, 11 Sep 2015 10:44:07 -0500 Subject: [PATCH 03/23] MAGETWO-42770: Use sample data checkbox disabled even if Sample Data codebase is present - fixed sample data checkbox disabled --- .../src/Magento/Setup/Controller/CustomizeYourStore.php | 9 ++++----- .../Test/Unit/Controller/CustomizeYourStoreTest.php | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup/src/Magento/Setup/Controller/CustomizeYourStore.php b/setup/src/Magento/Setup/Controller/CustomizeYourStore.php index fe24ddcd5e586..5712a25dbfbb9 100644 --- a/setup/src/Magento/Setup/Controller/CustomizeYourStore.php +++ b/setup/src/Magento/Setup/Controller/CustomizeYourStore.php @@ -5,9 +5,8 @@ */ namespace Magento\Setup\Controller; -use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; -use Magento\Framework\Module\ModuleList; +use Magento\Framework\Module\FullModuleList; use Magento\Framework\Setup\Lists; use Magento\Setup\Model\ObjectManagerProvider; use Zend\Mvc\Controller\AbstractActionController; @@ -17,7 +16,7 @@ class CustomizeYourStore extends AbstractActionController { /** - * @var ModuleList + * @var FullModuleList */ protected $moduleList; @@ -32,11 +31,11 @@ class CustomizeYourStore extends AbstractActionController protected $objectManagerProvider; /** - * @param ModuleList $moduleList + * @param FullModuleList $moduleList * @param Lists $list * @param ObjectManagerProvider $objectManagerProvider */ - public function __construct(ModuleList $moduleList, Lists $list, ObjectManagerProvider $objectManagerProvider) + public function __construct(FullModuleList $moduleList, Lists $list, ObjectManagerProvider $objectManagerProvider) { $this->moduleList = $moduleList; $this->list = $list; diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/CustomizeYourStoreTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/CustomizeYourStoreTest.php index 84a69a4f67a3e..bbefdd16a94cd 100644 --- a/setup/src/Magento/Setup/Test/Unit/Controller/CustomizeYourStoreTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Controller/CustomizeYourStoreTest.php @@ -31,7 +31,7 @@ class CustomizeYourStoreTest extends \PHPUnit_Framework_TestCase private $objectManager; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Module\ModuleList + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Module\FullModuleList */ private $moduleList; @@ -48,7 +48,7 @@ public function setup() false ); $this->lists = $this->getMock('\Magento\Framework\Setup\Lists', [], [], '', false); - $this->moduleList = $this->getMock('Magento\Framework\Module\ModuleList', [], [], '', false); + $this->moduleList = $this->getMock('Magento\Framework\Module\FullModuleList', [], [], '', false); $this->controller = new CustomizeYourStore($this->moduleList, $this->lists, $objectManagerProvider); } From 8cb8b50e7904f7397f9948902858e0ab7fb48c1e Mon Sep 17 00:00:00 2001 From: Eddie Lau Date: Fri, 11 Sep 2015 12:44:23 -0500 Subject: [PATCH 04/23] MAGETWO-42770: Use sample data checkbox disabled even if Sample Data codebase is present - make checkbox disabled when unselect Sample Data module in advanced settings --- setup/pub/magento/setup/customize-your-store.js | 17 ++++++++++++++++- .../magento/setup/customize-your-store.phtml | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/setup/pub/magento/setup/customize-your-store.js b/setup/pub/magento/setup/customize-your-store.js index ef4721f703ab7..fd3ae0b4b7156 100644 --- a/setup/pub/magento/setup/customize-your-store.js +++ b/setup/pub/magento/setup/customize-your-store.js @@ -24,7 +24,8 @@ angular.module('customize-your-store', ['ngStorage', 'ngSanitize']) force: false, advanced: { expanded: false - } + }, + sampleDataModuleSelected: true }; $scope.loading = false; @@ -190,5 +191,19 @@ angular.module('customize-your-store', ['ngStorage', 'ngSanitize']) $scope.customizeStore.submitted = false; } }); + + $scope.$watch( + function() { return $scope.store.selectedModules.indexOf('Magento_SampleData') > -1; }, + function(selected) { + if ($scope.store.loadedAllModules) { + if (selected) { + $scope.store.sampleDataModuleSelected = true; + } else { + $scope.store.useSampleData = false; + $scope.store.sampleDataModuleSelected = false; + } + } + } + ); }]) ; diff --git a/setup/view/magento/setup/customize-your-store.phtml b/setup/view/magento/setup/customize-your-store.phtml index e392296753f3f..e9d05fe9a1e7b 100644 --- a/setup/view/magento/setup/customize-your-store.phtml +++ b/setup/view/magento/setup/customize-your-store.phtml @@ -38,7 +38,7 @@ class="form-el-checkbox" type="checkbox" ng-model="store.useSampleData" - isSampledataEnabled ? '' : 'disabled' ?> + ng-disabled="isSampledataEnabled ? 'false' : 'true' ?> || !store.sampleDataModuleSelected" > - - */ - ?>

Terms & Agreement

From d894c4393112e913866681adc0c2f01a6248a05e Mon Sep 17 00:00:00 2001 From: Paul Lewis Date: Wed, 7 Oct 2015 14:22:15 -0500 Subject: [PATCH 20/23] MAGETWO-43454: Contribute Ogre Sprint 38 Bugs and Tasks - Fix integration test ComponentGridTest --- .../Setup/Controller/ComponentGridTest.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Setup/Controller/ComponentGridTest.php b/dev/tests/integration/testsuite/Magento/Setup/Controller/ComponentGridTest.php index 1df3c28804fa3..e62ef2df8f2f3 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Controller/ComponentGridTest.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Controller/ComponentGridTest.php @@ -111,22 +111,23 @@ public function setUp() $objectManagerProvider->expects($this->once()) ->method('get') ->willReturn($objectManager); - $packageInfoFactory = $this->getMock('Magento\Framework\Module\PackageInfoFactory', [], [], '', false); - $enabledModuleList = $this->getMock('Magento\Framework\Module\ModuleList', [], [], '', false); - $enabledModuleList->expects($this->any())->method('has')->willReturn(true); - $fullModuleList = $this->getMock('Magento\Framework\Module\FullModuleList', [], [], '', false); - $fullModuleList->expects($this->any())->method('getNames')->willReturn($allComponentData); + $this->packageInfoFactoryMock = $this + ->getMock('Magento\Framework\Module\PackageInfoFactory', [], [], '', false); + $this->enabledModuleListMock = $this->getMock('Magento\Framework\Module\ModuleList', [], [], '', false); + $this->enabledModuleListMock->expects($this->any())->method('has')->willReturn(true); + $this->fullModuleListMock = $this->getMock('Magento\Framework\Module\FullModuleList', [], [], '', false); + $this->fullModuleListMock->expects($this->any())->method('getNames')->willReturn($allComponentData); $objectManager->expects($this->exactly(3)) ->method('get') ->willReturnMap([ - ['Magento\Framework\Module\PackageInfoFactory', $packageInfoFactory], - ['Magento\Framework\Module\FullModuleList', $fullModuleList], - ['Magento\Framework\Module\ModuleList', $enabledModuleList] + ['Magento\Framework\Module\PackageInfoFactory', $this->packageInfoFactoryMock], + ['Magento\Framework\Module\FullModuleList', $this->fullModuleListMock], + ['Magento\Framework\Module\ModuleList', $this->enabledModuleListMock] ]); $this->packageInfo = $this->getMock('Magento\Framework\Module\PackageInfo', [], [], '', false); $this->updatePackagesCacheMock = $this->getMock('Magento\Setup\Model\UpdatePackagesCache', [], [], '', false); $this->connectManagerMock = $this->getMock('Magento\Setup\Model\ConnectManager', [], [], '', false); - $packageInfoFactory->expects($this->once())->method('create')->willReturn($this->packageInfo); + $this->packageInfoFactoryMock->expects($this->once())->method('create')->willReturn($this->packageInfo); $this->controller = new ComponentGrid( $this->composerInformationMock, $objectManagerProvider, From 601178956d36db2604e34f680c8a7aee13d98eda Mon Sep 17 00:00:00 2001 From: Paul Lewis Date: Wed, 7 Oct 2015 16:48:26 -0500 Subject: [PATCH 21/23] MAGETWO-43454: Contribute Ogre Sprint 38 Bugs and Tasks - revert change made for sample data, not needed with new sample data code --- setup/pub/magento/setup/customize-your-store.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/setup/pub/magento/setup/customize-your-store.js b/setup/pub/magento/setup/customize-your-store.js index fd3ae0b4b7156..ef4721f703ab7 100644 --- a/setup/pub/magento/setup/customize-your-store.js +++ b/setup/pub/magento/setup/customize-your-store.js @@ -24,8 +24,7 @@ angular.module('customize-your-store', ['ngStorage', 'ngSanitize']) force: false, advanced: { expanded: false - }, - sampleDataModuleSelected: true + } }; $scope.loading = false; @@ -191,19 +190,5 @@ angular.module('customize-your-store', ['ngStorage', 'ngSanitize']) $scope.customizeStore.submitted = false; } }); - - $scope.$watch( - function() { return $scope.store.selectedModules.indexOf('Magento_SampleData') > -1; }, - function(selected) { - if ($scope.store.loadedAllModules) { - if (selected) { - $scope.store.sampleDataModuleSelected = true; - } else { - $scope.store.useSampleData = false; - $scope.store.sampleDataModuleSelected = false; - } - } - } - ); }]) ; From ab13480b346ecd42dc43b991cc3a51f7d35d5a6b Mon Sep 17 00:00:00 2001 From: Paul Lewis Date: Thu, 8 Oct 2015 08:19:07 -0500 Subject: [PATCH 22/23] MAGETWO-43454: Contribute Ogre Sprint 38 Bugs and Tasks - removed unused use statements --- setup/src/Magento/Setup/Controller/ComponentGrid.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup/src/Magento/Setup/Controller/ComponentGrid.php b/setup/src/Magento/Setup/Controller/ComponentGrid.php index 2c95a5521f0c1..c8e21266320e0 100644 --- a/setup/src/Magento/Setup/Controller/ComponentGrid.php +++ b/setup/src/Magento/Setup/Controller/ComponentGrid.php @@ -7,9 +7,7 @@ namespace Magento\Setup\Controller; use Magento\Framework\Composer\ComposerInformation; -use Magento\Framework\Module\FullModuleList; use Magento\Framework\Module\ModuleList; -use Magento\Framework\Module\PackageInfo; use Magento\Setup\Model\ObjectManagerProvider; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\JsonModel; From 0c99de0705247596cc620268966937156ade0156 Mon Sep 17 00:00:00 2001 From: Paul Lewis Date: Thu, 8 Oct 2015 12:10:05 -0500 Subject: [PATCH 23/23] MAGETWO-43454: Contribute Ogre Sprint 38 Bugs and Tasks - fully qualify class names to prevent static error --- .../Setup/Controller/ComponentGrid.php | 47 ++++++++----------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/setup/src/Magento/Setup/Controller/ComponentGrid.php b/setup/src/Magento/Setup/Controller/ComponentGrid.php index c8e21266320e0..128f3335cc770 100644 --- a/setup/src/Magento/Setup/Controller/ComponentGrid.php +++ b/setup/src/Magento/Setup/Controller/ComponentGrid.php @@ -6,19 +6,10 @@ namespace Magento\Setup\Controller; -use Magento\Framework\Composer\ComposerInformation; -use Magento\Framework\Module\ModuleList; -use Magento\Setup\Model\ObjectManagerProvider; -use Zend\Mvc\Controller\AbstractActionController; -use Zend\View\Model\JsonModel; -use Zend\View\Model\ViewModel; -use Magento\Setup\Model\ConnectManager; -use Magento\Setup\Model\UpdatePackagesCache; - /** * Controller for component grid tasks */ -class ComponentGrid extends AbstractActionController +class ComponentGrid extends \Zend\Mvc\Controller\AbstractActionController { /** * @var \Magento\Framework\Composer\ComposerInformation @@ -33,7 +24,7 @@ class ComponentGrid extends AbstractActionController private $packageInfo; /** - * @var ConnectManager + * @var \Magento\Setup\Model\ConnectManager */ private $connectManager; @@ -55,16 +46,16 @@ class ComponentGrid extends AbstractActionController private $updatePackagesCache; /** - * @param ComposerInformation $composerInformation - * @param ObjectManagerProvider $objectManagerProvider - * @param ConnectManager $connectManager - * @param UpdatePackagesCache $updatePackagesCache + * @param \Magento\Framework\Composer\ComposerInformation $composerInformation + * @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider + * @param \Magento\Setup\Model\ConnectManager $connectManager + * @param \Magento\Setup\Model\UpdatePackagesCache $updatePackagesCache */ public function __construct( - ComposerInformation $composerInformation, - ObjectManagerProvider $objectManagerProvider, - UpdatePackagesCache $updatePackagesCache, - ConnectManager $connectManager + \Magento\Framework\Composer\ComposerInformation $composerInformation, + \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider, + \Magento\Setup\Model\UpdatePackagesCache $updatePackagesCache, + \Magento\Setup\Model\ConnectManager $connectManager ) { $this->composerInformation = $composerInformation; $objectManager = $objectManagerProvider->get(); @@ -78,11 +69,11 @@ public function __construct( /** * Index page action * - * @return ViewModel + * @return \Zend\View\Model\ViewModel */ public function indexAction() { - $view = new ViewModel(); + $view = new \Zend\View\Model\ViewModel(); $view->setTerminal(true); return $view; } @@ -90,7 +81,7 @@ public function indexAction() /** * Get Components info action * - * @return JsonModel + * @return \Zend\View\Model\JsonModel * @throws \RuntimeException * @SuppressWarnings(PHPMD.NPathComplexity) */ @@ -105,7 +96,7 @@ public function componentsAction() $components[$component['name']]['uninstall'] = false; $components[$component['name']]['moduleName'] = $this->packageInfo->getModuleName($component['name']); if ($this->composerInformation->isPackageInComposerJson($component['name']) - && ($component['type'] !== ComposerInformation::METAPACKAGE_PACKAGE_TYPE)) { + && ($component['type'] !== \Magento\Framework\Composer\ComposerInformation::METAPACKAGE_PACKAGE_TYPE)) { $components[$component['name']]['uninstall'] = true; if (isset($lastSyncData['packages'][$component['name']]['latestVersion']) && version_compare( @@ -116,7 +107,7 @@ public function componentsAction() $components[$component['name']]['update'] = true; } } - if ($component['type'] === ComposerInformation::MODULE_PACKAGE_TYPE) { + if ($component['type'] === \Magento\Framework\Composer\ComposerInformation::MODULE_PACKAGE_TYPE) { $components[$component['name']]['enable'] = $this->enabledModuleList->has($components[$component['name']]['moduleName']); $components[$component['name']]['disable'] = !$components[$component['name']]['enable']; @@ -134,7 +125,7 @@ public function componentsAction() isset($packagesForInstall['packages']) ? count($packagesForInstall['packages']) : 0; $lastSyncData['countOfUpdate'] = isset($lastSyncData['packages']) ? count($lastSyncData['packages']) : 0; - return new JsonModel( + return new \Zend\View\Model\JsonModel( [ 'success' => true, 'components' => array_values($components), @@ -147,7 +138,7 @@ public function componentsAction() /** * Sync action * - * @return JsonModel + * @return \Zend\View\Model\JsonModel */ public function syncAction() { @@ -162,7 +153,7 @@ public function syncAction() $lastSyncData['countOfUpdate'] = isset($lastSyncData['packages']) ? count($lastSyncData['packages']) : 0; - return new JsonModel( + return new \Zend\View\Model\JsonModel( [ 'success' => true, 'lastSyncData' => $lastSyncData @@ -182,7 +173,7 @@ private function getAllModules() foreach ($allModules as $module) { $moduleName = $this->packageInfo->getPackageName($module); $modules[$moduleName]['name'] = $moduleName; - $modules[$moduleName]['type'] = ComposerInformation::MODULE_PACKAGE_TYPE; + $modules[$moduleName]['type'] = \Magento\Framework\Composer\ComposerInformation::MODULE_PACKAGE_TYPE; $modules[$moduleName]['version'] = $this->packageInfo->getVersion($module); } return $modules;