From 3b9ba7c6af3b74eb2dea568db860959516abbf71 Mon Sep 17 00:00:00 2001 From: Igor Ludgero Miura Date: Fri, 18 Jan 2019 14:35:47 -0200 Subject: [PATCH 01/24] Remove sku from this condition --- .../Magento/Rule/Model/Condition/Product/AbstractProduct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index c02bbd64e7ca3..b7dd1d6c55f4e 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -713,7 +713,7 @@ protected function _getAttributeSetId($productId) public function getOperatorForValidate() { $operator = $this->getOperator(); - if (in_array($this->getInputType(), ['category', 'sku'])) { + if (in_array($this->getInputType(), ['category'])) { if ($operator == '==') { $operator = '{}'; } elseif ($operator == '!=') { From fe02088e52243c48b0a11c86c53862be8bfc573e Mon Sep 17 00:00:00 2001 From: Jason Woods Date: Thu, 7 Feb 2019 20:16:21 +0000 Subject: [PATCH 02/24] Fix admin quote address being lost when removing all items, causing broken quote process until address is updated --- app/code/Magento/Checkout/etc/di.xml | 3 --- app/code/Magento/Checkout/etc/frontend/di.xml | 3 +++ .../Checkout/Plugin/Model/Quote/ResetQuoteAddressesTest.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 71dfd12bb4779..4ebd594a28562 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -49,7 +49,4 @@ - - - diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml index d80f88786c87b..e203fe5077d26 100644 --- a/app/code/Magento/Checkout/etc/frontend/di.xml +++ b/app/code/Magento/Checkout/etc/frontend/di.xml @@ -95,4 +95,7 @@ + + + diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Plugin/Model/Quote/ResetQuoteAddressesTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Plugin/Model/Quote/ResetQuoteAddressesTest.php index 43108dbca1f5e..85dede0d84c2d 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Plugin/Model/Quote/ResetQuoteAddressesTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Plugin/Model/Quote/ResetQuoteAddressesTest.php @@ -21,6 +21,7 @@ class ResetQuoteAddressesTest extends \PHPUnit\Framework\TestCase { /** * @magentoDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php + * @magentoAppArea frontend * * @return void */ From b4f47f947d6e6b50518553dd9c22e4e722fb86b9 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Mon, 11 Feb 2019 17:22:36 +0200 Subject: [PATCH 03/24] ENGCOM-4000: Integration test fix. --- .../Magento/Rule/Model/Condition/Product/AbstractProduct.php | 2 +- .../Magento/CatalogWidget/Block/Product/ProductListTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index b7dd1d6c55f4e..bedac8c1108e5 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -713,7 +713,7 @@ protected function _getAttributeSetId($productId) public function getOperatorForValidate() { $operator = $this->getOperator(); - if (in_array($this->getInputType(), ['category'])) { + if ('category' === $this->getInputType()) { if ($operator == '==') { $operator = '{}'; } elseif ($operator == '!=') { diff --git a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php index 08e9ebbd1f9f0..4251e01f4299a 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php @@ -83,7 +83,7 @@ public function testCreateCollectionWithMultipleSkuCondition() { $encodedConditions = '^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,' . '`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule|' . - '|Condition||Product`,`attribute`:`sku`,`operator`:`==`,`value`:`simple1, simple2`^]^]'; + '|Condition||Product`,`attribute`:`sku`,`operator`:`()`,`value`:`simple1, simple2`^]^]'; $this->block->setData('conditions_encoded', $encodedConditions); $this->performAssertions(2); } From af81dcee6846e82cd0855971b490c69a923deacc Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Thu, 14 Feb 2019 14:42:21 +0200 Subject: [PATCH 04/24] ENGCOM-4000: MFTF test fix. --- .../Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml | 2 ++ app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml | 1 + .../Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml index dfb33b197d74f..0acbc33fcb06b 100644 --- a/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml +++ b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml @@ -32,6 +32,8 @@ + + diff --git a/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml b/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml index d7db8fe50cb7f..ce56a6d92dd97 100644 --- a/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml +++ b/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml @@ -18,6 +18,7 @@ SKU All Pages Main Content Area + is one of Banner Rotator diff --git a/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml index 37ad425114d5c..389d7bd1ab0e1 100644 --- a/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml +++ b/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml @@ -20,6 +20,8 @@ + + From dcc772199cb4c0faa0a8cc44dbea9f911dfab468 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Wed, 2 Jan 2019 14:02:29 +0100 Subject: [PATCH 05/24] Make it possible to generate sales PDF's using the API --- .../base/templates/info/pdf/default.phtml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml diff --git a/app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml b/app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml new file mode 100644 index 0000000000000..7acac62f65d38 --- /dev/null +++ b/app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml @@ -0,0 +1,23 @@ + +escapeHtml($block->getMethod()->getTitle()) ?>{{pdf_row_separator}} + +getSpecificInformation()):?> + $value):?> + escapeHtml($label) ?>: + escapeHtml(implode(' ', $block->getValueAsArray($value))) ?> + {{pdf_row_separator}} + + + +escapeHtml(implode('{{pdf_row_separator}}', $block->getChildPdfAsArray())) ?> From 21386b3ee4c7d3d1c06af3d7e44b3b675c8c8288 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Thu, 3 Jan 2019 13:54:57 +0100 Subject: [PATCH 06/24] Make it possible to generate sales PDF's using the API --- .../base/templates/info/pdf/checkmo.phtml | 26 +++++++++++++++++++ .../templates/info/pdf/purchaseorder.phtml | 11 ++++++++ 2 files changed, 37 insertions(+) create mode 100644 app/code/Magento/OfflinePayments/view/base/templates/info/pdf/checkmo.phtml create mode 100644 app/code/Magento/OfflinePayments/view/base/templates/info/pdf/purchaseorder.phtml diff --git a/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/checkmo.phtml b/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/checkmo.phtml new file mode 100644 index 0000000000000..4d63577319d5b --- /dev/null +++ b/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/checkmo.phtml @@ -0,0 +1,26 @@ + +escapeHtml($block->getMethod()->getTitle()) ?> + {{pdf_row_separator}} +getInfo()->getAdditionalInformation()): ?> + {{pdf_row_separator}} + getPayableTo()): ?> + escapeHtml(__('Make Check payable to: %1', $block->getPayableTo())) ?> + {{pdf_row_separator}} + + getMailingAddress()): ?> + escapeHtml(__('Send Check to:')) ?> + {{pdf_row_separator}} + escapeHtml($block->getMailingAddress())) ?> + {{pdf_row_separator}} + + diff --git a/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/purchaseorder.phtml new file mode 100644 index 0000000000000..4a6ea1c00b21c --- /dev/null +++ b/app/code/Magento/OfflinePayments/view/base/templates/info/pdf/purchaseorder.phtml @@ -0,0 +1,11 @@ + +escapeHtml(__('Purchase Order Number: %1', $block->getInfo()->getPoNumber())) ?> + {{pdf_row_separator}} From d8110c23e4f66ce819b4be90b12a1e4eb190b178 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Mon, 4 Mar 2019 16:50:27 +0200 Subject: [PATCH 07/24] ENGCOM-4000: Crash fix. --- .../Model/Condition/Product/AbstractProduct.php | 8 -------- .../Block/Product/ProductListTest.php | 15 --------------- 2 files changed, 23 deletions(-) diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index bedac8c1108e5..a428794b41a0f 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -137,7 +137,6 @@ public function getDefaultOperatorInputByType() */ $this->_defaultOperatorInputByType['category'] = ['==', '!=', '{}', '!{}', '()', '!()']; $this->_arrayInputTypes[] = 'category'; - $this->_defaultOperatorInputByType['sku'] = ['==', '!=', '{}', '!{}', '()', '!()']; } return $this->_defaultOperatorInputByType; } @@ -383,9 +382,6 @@ public function getInputType() if ($this->getAttributeObject()->getAttributeCode() == 'category_ids') { return 'category'; } - if ($this->getAttributeObject()->getAttributeCode() == 'sku') { - return 'sku'; - } switch ($this->getAttributeObject()->getFrontendInput()) { case 'select': return 'select'; @@ -610,10 +606,6 @@ public function getBindArgumentValue() $this->getValueParsed() )->__toString() ); - } elseif ($this->getAttribute() === 'sku') { - $value = $this->getData('value'); - $value = preg_split('#\s*[,;]\s*#', $value, null, PREG_SPLIT_NO_EMPTY); - $this->setValueParsed($value); } return parent::getBindArgumentValue(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php index 4251e01f4299a..5774f1cf76ae9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php @@ -73,21 +73,6 @@ public function testCreateCollection() $this->performAssertions(2); } - /** - * Test product list widget can process condition with multiple product sku. - * - * @magentoDbIsolation disabled - * @magentoDataFixture Magento/Catalog/_files/multiple_products.php - */ - public function testCreateCollectionWithMultipleSkuCondition() - { - $encodedConditions = '^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,' . - '`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule|' . - '|Condition||Product`,`attribute`:`sku`,`operator`:`()`,`value`:`simple1, simple2`^]^]'; - $this->block->setData('conditions_encoded', $encodedConditions); - $this->performAssertions(2); - } - /** * Test product list widget can process condition with dropdown type of attribute * From f80d38218d0d42a297fe6f6727f5d63191093fad Mon Sep 17 00:00:00 2001 From: Mahesh Singh Date: Fri, 15 Feb 2019 23:56:52 +0530 Subject: [PATCH 08/24] sort order added to downloable product links column --- .../Product/Form/Modifier/Links.php | 36 ++++++++++++------- .../Product/Form/Modifier/Samples.php | 12 ++++--- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php index a352c4bdf7bc3..e367405416f0d 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php @@ -208,12 +208,12 @@ protected function getRecord() 'children', $record, [ - 'container_link_title' => $this->getTitleColumn(), - 'container_link_price' => $this->getPriceColumn(), - 'container_file' => $this->getFileColumn(), - 'container_sample' => $this->getSampleColumn(), - 'is_shareable' => $this->getShareableColumn(), - 'max_downloads' => $this->getMaxDownloadsColumn(), + 'container_link_title' => $this->getTitleColumn(10), + 'container_link_price' => $this->getPriceColumn(20), + 'container_file' => $this->getFileColumn(30), + 'container_sample' => $this->getSampleColumn(40), + 'is_shareable' => $this->getShareableColumn(50), + 'max_downloads' => $this->getMaxDownloadsColumn(60), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -221,9 +221,10 @@ protected function getRecord() } /** + * @param int $sortOrder * @return array */ - protected function getTitleColumn() + protected function getTitleColumn($sortOrder) { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -232,6 +233,7 @@ protected function getTitleColumn() 'label' => __('Title'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -247,9 +249,10 @@ protected function getTitleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getPriceColumn() + protected function getPriceColumn($sortOrder) { $priceContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -258,6 +261,7 @@ protected function getPriceColumn() 'label' => __('Price'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $priceField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -281,9 +285,10 @@ protected function getPriceColumn() } /** + * @param int $sortOrder * @return array */ - protected function getFileColumn() + protected function getFileColumn($sortOrder) { $fileContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -292,6 +297,7 @@ protected function getFileColumn() 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $fileTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -344,9 +350,10 @@ protected function getFileColumn() } /** + * @param int $sortOrder * @return array */ - protected function getSampleColumn() + protected function getSampleColumn($sortOrder) { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -355,6 +362,7 @@ protected function getSampleColumn() 'label' => __('Sample'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $sampleTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -403,9 +411,10 @@ protected function getSampleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getShareableColumn() + protected function getShareableColumn($sortOrder) { $shareableField['arguments']['data']['config'] = [ 'label' => __('Shareable'), @@ -413,6 +422,7 @@ protected function getShareableColumn() 'componentType' => Form\Field::NAME, 'dataType' => Form\Element\DataType\Number::NAME, 'dataScope' => 'is_shareable', + 'sortOrder' => $sortOrder, 'options' => $this->shareable->toOptionArray(), ]; @@ -420,9 +430,10 @@ protected function getShareableColumn() } /** + * @param int $sortOrder * @return array */ - protected function getMaxDownloadsColumn() + protected function getMaxDownloadsColumn($sortOrder) { $maxDownloadsContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -431,6 +442,7 @@ protected function getMaxDownloadsColumn() 'label' => __('Max. Downloads'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $numberOfDownloadsField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php index 1587163ba8121..0dd94f2584218 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php @@ -183,8 +183,8 @@ protected function getRecord() 'children', $record, [ - 'container_sample_title' => $this->getTitleColumn(), - 'container_sample' => $this->getSampleColumn(), + 'container_sample_title' => $this->getTitleColumn(10), + 'container_sample' => $this->getSampleColumn(20), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -192,9 +192,10 @@ protected function getRecord() } /** + * @param int $sortOrder * @return array */ - protected function getTitleColumn() + protected function getTitleColumn($sortOrder) { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -203,6 +204,7 @@ protected function getTitleColumn() 'showLabel' => false, 'label' => __('Title'), 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -218,9 +220,10 @@ protected function getTitleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getSampleColumn() + protected function getSampleColumn($sortOrder) { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -229,6 +232,7 @@ protected function getSampleColumn() 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $sampleType['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, From b7ad0754b9f78510ec1f47ddf866d70ed05f91fc Mon Sep 17 00:00:00 2001 From: Mahesh Singh Date: Tue, 19 Feb 2019 22:42:35 +0530 Subject: [PATCH 09/24] backward compatibilty fixed --- .../Product/Form/Modifier/Links.php | 42 ++++++++----------- .../Product/Form/Modifier/Samples.php | 14 +++---- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php index e367405416f0d..e4889b160963f 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php @@ -208,12 +208,12 @@ protected function getRecord() 'children', $record, [ - 'container_link_title' => $this->getTitleColumn(10), - 'container_link_price' => $this->getPriceColumn(20), - 'container_file' => $this->getFileColumn(30), - 'container_sample' => $this->getSampleColumn(40), - 'is_shareable' => $this->getShareableColumn(50), - 'max_downloads' => $this->getMaxDownloadsColumn(60), + 'container_link_title' => $this->getTitleColumn(), + 'container_link_price' => $this->getPriceColumn(), + 'container_file' => $this->getFileColumn(), + 'container_sample' => $this->getSampleColumn(), + 'is_shareable' => $this->getShareableColumn(), + 'max_downloads' => $this->getMaxDownloadsColumn(), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -221,10 +221,9 @@ protected function getRecord() } /** - * @param int $sortOrder * @return array */ - protected function getTitleColumn($sortOrder) + protected function getTitleColumn() { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -233,7 +232,7 @@ protected function getTitleColumn($sortOrder) 'label' => __('Title'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 10, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -249,10 +248,9 @@ protected function getTitleColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getPriceColumn($sortOrder) + protected function getPriceColumn() { $priceContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -261,7 +259,7 @@ protected function getPriceColumn($sortOrder) 'label' => __('Price'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 20, ]; $priceField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -285,10 +283,9 @@ protected function getPriceColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getFileColumn($sortOrder) + protected function getFileColumn() { $fileContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -297,7 +294,7 @@ protected function getFileColumn($sortOrder) 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 30, ]; $fileTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -350,10 +347,9 @@ protected function getFileColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getSampleColumn($sortOrder) + protected function getSampleColumn() { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -362,7 +358,7 @@ protected function getSampleColumn($sortOrder) 'label' => __('Sample'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 40, ]; $sampleTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -411,10 +407,9 @@ protected function getSampleColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getShareableColumn($sortOrder) + protected function getShareableColumn() { $shareableField['arguments']['data']['config'] = [ 'label' => __('Shareable'), @@ -422,7 +417,7 @@ protected function getShareableColumn($sortOrder) 'componentType' => Form\Field::NAME, 'dataType' => Form\Element\DataType\Number::NAME, 'dataScope' => 'is_shareable', - 'sortOrder' => $sortOrder, + 'sortOrder' => 50, 'options' => $this->shareable->toOptionArray(), ]; @@ -430,10 +425,9 @@ protected function getShareableColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getMaxDownloadsColumn($sortOrder) + protected function getMaxDownloadsColumn() { $maxDownloadsContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -442,7 +436,7 @@ protected function getMaxDownloadsColumn($sortOrder) 'label' => __('Max. Downloads'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 60, ]; $numberOfDownloadsField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php index 0dd94f2584218..b12c415b0b0b1 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php @@ -183,8 +183,8 @@ protected function getRecord() 'children', $record, [ - 'container_sample_title' => $this->getTitleColumn(10), - 'container_sample' => $this->getSampleColumn(20), + 'container_sample_title' => $this->getTitleColumn(), + 'container_sample' => $this->getSampleColumn(), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -192,10 +192,9 @@ protected function getRecord() } /** - * @param int $sortOrder * @return array */ - protected function getTitleColumn($sortOrder) + protected function getTitleColumn() { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -204,7 +203,7 @@ protected function getTitleColumn($sortOrder) 'showLabel' => false, 'label' => __('Title'), 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 10, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -220,10 +219,9 @@ protected function getTitleColumn($sortOrder) } /** - * @param int $sortOrder * @return array */ - protected function getSampleColumn($sortOrder) + protected function getSampleColumn() { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -232,7 +230,7 @@ protected function getSampleColumn($sortOrder) 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', - 'sortOrder' => $sortOrder, + 'sortOrder' => 20, ]; $sampleType['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, From a9016e9a58187fa8bb81cfecd6e0bc5bfdd6ce90 Mon Sep 17 00:00:00 2001 From: nmalevanec Date: Mon, 4 Mar 2019 15:31:18 +0200 Subject: [PATCH 10/24] Fix static tests. --- .../Product/Form/Modifier/Links.php | 32 +++++++++++++++---- .../Product/Form/Modifier/Samples.php | 22 +++++++++---- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php index e4889b160963f..9ab664cb27839 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php @@ -3,22 +3,24 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier; -use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier; use Magento\Catalog\Model\Locator\LocatorInterface; +use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier; use Magento\Downloadable\Model\Product\Type; -use Magento\Downloadable\Model\Source\TypeUpload; use Magento\Downloadable\Model\Source\Shareable; -use Magento\Store\Model\StoreManagerInterface; +use Magento\Downloadable\Model\Source\TypeUpload; use Magento\Framework\Stdlib\ArrayManager; -use Magento\Ui\Component\DynamicRows; use Magento\Framework\UrlInterface; +use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\Component\Container; +use Magento\Ui\Component\DynamicRows; use Magento\Ui\Component\Form; /** - * Class adds a grid with links + * Class adds a grid with links. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Links extends AbstractModifier @@ -86,7 +88,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function modifyData(array $data) { @@ -101,7 +103,7 @@ public function modifyData(array $data) } /** - * {@inheritdoc} + * @inheritdoc * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function modifyMeta(array $meta) @@ -160,6 +162,8 @@ public function modifyMeta(array $meta) } /** + * Get dynamic rows meta. + * * @return array */ protected function getDynamicRows() @@ -180,6 +184,8 @@ protected function getDynamicRows() } /** + * Get single link record meta. + * * @return array */ protected function getRecord() @@ -221,6 +227,8 @@ protected function getRecord() } /** + * Get link title meta. + * * @return array */ protected function getTitleColumn() @@ -248,6 +256,8 @@ protected function getTitleColumn() } /** + * Get link price meta. + * * @return array */ protected function getPriceColumn() @@ -283,6 +293,8 @@ protected function getPriceColumn() } /** + * Get link file element meta. + * * @return array */ protected function getFileColumn() @@ -347,6 +359,8 @@ protected function getFileColumn() } /** + * Get sample container meta. + * * @return array */ protected function getSampleColumn() @@ -407,6 +421,8 @@ protected function getSampleColumn() } /** + * Get link "is sharable" element meta. + * * @return array */ protected function getShareableColumn() @@ -425,6 +441,8 @@ protected function getShareableColumn() } /** + * Get link "max downloads" element meta. + * * @return array */ protected function getMaxDownloadsColumn() diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php index b12c415b0b0b1..3890ee5b9e2b2 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php @@ -3,21 +3,23 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier; -use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier; use Magento\Catalog\Model\Locator\LocatorInterface; +use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier; use Magento\Downloadable\Model\Product\Type; use Magento\Downloadable\Model\Source\TypeUpload; -use Magento\Store\Model\StoreManagerInterface; use Magento\Framework\Stdlib\ArrayManager; -use Magento\Ui\Component\DynamicRows; use Magento\Framework\UrlInterface; +use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\Component\Container; +use Magento\Ui\Component\DynamicRows; use Magento\Ui\Component\Form; /** - * Class adds a grid with samples + * Class adds a grid with samples. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Samples extends AbstractModifier @@ -77,7 +79,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function modifyData(array $data) { @@ -90,7 +92,7 @@ public function modifyData(array $data) } /** - * {@inheritdoc} + * @inheritdoc * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function modifyMeta(array $meta) @@ -135,6 +137,8 @@ public function modifyMeta(array $meta) } /** + * Get sample rows meta. + * * @return array */ protected function getDynamicRows() @@ -155,6 +159,8 @@ protected function getDynamicRows() } /** + * Get single sample row meta. + * * @return array */ protected function getRecord() @@ -192,6 +198,8 @@ protected function getRecord() } /** + * Get sample title meta. + * * @return array */ protected function getTitleColumn() @@ -219,6 +227,8 @@ protected function getTitleColumn() } /** + * Get sample element meta. + * * @return array */ protected function getSampleColumn() From 46810b0771c4b646c6791f17347848082f3ec0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20F=C3=BChr?= Date: Wed, 30 Jan 2019 16:03:13 +0100 Subject: [PATCH 11/24] 14857: prevent cache drop for frontend caches on sitemap generation https://github.com/magento/magento2/issues/14857 Introduces a (dummy) cache tag for frontend in sitemap and robots generation. This prevents the default and page_cache to be dropped completely. The cache tag for full_page cache is not modified. --- app/code/Magento/Robots/Model/Config/Value.php | 2 +- app/code/Magento/Sitemap/Model/Sitemap.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Robots/Model/Config/Value.php b/app/code/Magento/Robots/Model/Config/Value.php index 83c21d6602fca..0619e9fd88a78 100644 --- a/app/code/Magento/Robots/Model/Config/Value.php +++ b/app/code/Magento/Robots/Model/Config/Value.php @@ -35,7 +35,7 @@ class Value extends ConfigValue implements IdentityInterface * @var string * @since 100.2.0 */ - protected $_cacheTag = true; + protected $_cacheTag = [self::CACHE_TAG]; /** * @var StoreResolver diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php index dda1697da7fdf..823e403ff8fa2 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -160,7 +160,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel implements \Magento * @var string * @since 100.2.0 */ - protected $_cacheTag = true; + protected $_cacheTag = [Value::CACHE_TAG]; /** * Last mode min timestamp value From c5993ce4e0c1b4a9e460d45734a63cebaea7488a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20F=C3=BChr?= Date: Thu, 31 Jan 2019 13:58:32 +0100 Subject: [PATCH 12/24] amend touched DocBlocks --- app/code/Magento/Robots/Model/Config/Value.php | 3 +-- app/code/Magento/Sitemap/Model/Sitemap.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Robots/Model/Config/Value.php b/app/code/Magento/Robots/Model/Config/Value.php index 0619e9fd88a78..e520810ee5ef9 100644 --- a/app/code/Magento/Robots/Model/Config/Value.php +++ b/app/code/Magento/Robots/Model/Config/Value.php @@ -30,9 +30,8 @@ class Value extends ConfigValue implements IdentityInterface const CACHE_TAG = 'robots'; /** - * Model cache tag for clear cache in after save and after delete + * @inheritdoc * - * @var string * @since 100.2.0 */ protected $_cacheTag = [self::CACHE_TAG]; diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php index 823e403ff8fa2..ff95276827336 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -155,9 +155,8 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel implements \Magento protected $dateTime; /** - * Model cache tag for clear cache in after save and after delete + * @inheritdoc * - * @var string * @since 100.2.0 */ protected $_cacheTag = [Value::CACHE_TAG]; From a69a3d01a9e94e98ec224cf575c4b536ded92a4a Mon Sep 17 00:00:00 2001 From: nmalevanec Date: Fri, 1 Mar 2019 15:26:43 +0200 Subject: [PATCH 13/24] Fix static tests. --- app/code/Magento/Robots/Model/Config/Value.php | 1 + app/code/Magento/Sitemap/Model/Sitemap.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/code/Magento/Robots/Model/Config/Value.php b/app/code/Magento/Robots/Model/Config/Value.php index e520810ee5ef9..4c80588d814f6 100644 --- a/app/code/Magento/Robots/Model/Config/Value.php +++ b/app/code/Magento/Robots/Model/Config/Value.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Robots\Model\Config; use Magento\Framework\App\Cache\TypeListInterface; diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php index ff95276827336..7279f6eda85d7 100644 --- a/app/code/Magento/Sitemap/Model/Sitemap.php +++ b/app/code/Magento/Sitemap/Model/Sitemap.php @@ -1,4 +1,5 @@ Date: Mon, 25 Feb 2019 19:06:22 +0300 Subject: [PATCH 14/24] Add review summary to wishlist (https://github.com/magento/magento2/issues/21419) --- .../Block/Customer/Wishlist/Item/Column/Actions.php | 1 + .../Block/Customer/Wishlist/Item/Column/Comment.php | 1 + .../Block/Customer/Wishlist/Item/Column/Edit.php | 1 + .../Block/Customer/Wishlist/Item/Column/Info.php | 1 + .../Block/Customer/Wishlist/Item/Column/Remove.php | 1 + .../view/frontend/layout/wishlist_index_index.xml | 13 +++++++------ .../frontend/templates/item/column/actions.phtml | 2 +- .../frontend/templates/item/column/comment.phtml | 2 +- .../view/frontend/templates/item/column/edit.phtml | 2 +- .../view/frontend/templates/item/column/name.phtml | 2 +- .../frontend/templates/item/column/remove.phtml | 2 +- .../frontend/templates/item/column/review.phtml | 10 ++++++++++ 12 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php index cafb6a5291481..0cf6b6a9867d1 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php @@ -13,6 +13,7 @@ /** * @api + * @deprecated Empty class * @since 100.0.2 */ class Actions extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php index 2d75956858a0a..5f40e96bfa6ff 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php @@ -13,6 +13,7 @@ /** * @api + * @deprecated Empty class * @since 100.0.2 */ class Comment extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php index 53ca78c63524d..c4e94ec503175 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php @@ -13,6 +13,7 @@ /** * @api + * @deprecated Empty class * @since 100.0.2 */ class Edit extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php index 33fb0f7325cdd..f83c122910ebd 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php @@ -13,6 +13,7 @@ /** * @api + * @deprecated Empty class * @since 100.0.2 */ class Info extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php index 57703b9300db8..3e6f225842e01 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php @@ -13,6 +13,7 @@ /** * @api + * @deprecated Empty class * @since 100.0.2 */ class Remove extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml index 243a06062425a..836f7f404a381 100644 --- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml +++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml @@ -16,7 +16,8 @@ - + + @@ -28,11 +29,11 @@ - + product-item-inner - + Product Details and Comment @@ -43,12 +44,12 @@ - + product-item-actions - - + + diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml index 0b50df8c59fbb..7fa55a839b2ea 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Actions $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ ?> getChildNames(); ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml index 17e2404ee23cf..45bd7494fed4f 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Comment $block */ +/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ /* @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml index 1898ef6fc0d66..81d770d556734 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Edit $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ /** @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml index 265f4635a6be3..53c5f35f886ea 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Info $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ /** @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml index 57ae439d9995b..0bd78ba38ba58 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Remove $block */ +/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml new file mode 100644 index 0000000000000..9120cc9fa684e --- /dev/null +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml @@ -0,0 +1,10 @@ +getItem()->getProduct(); +?> +getReviewsSummaryHtml($product, 'short') ?> From f0b3b92960f79366325ed8ce7f68e97bc23d5b71 Mon Sep 17 00:00:00 2001 From: Denis Kopylov Date: Tue, 26 Feb 2019 19:31:34 +0300 Subject: [PATCH 15/24] Revert usage of deprecate marked classes in layout --- .../view/frontend/layout/wishlist_index_index.xml | 12 ++++++------ .../frontend/templates/item/column/actions.phtml | 2 +- .../frontend/templates/item/column/comment.phtml | 2 +- .../view/frontend/templates/item/column/edit.phtml | 2 +- .../view/frontend/templates/item/column/name.phtml | 2 +- .../view/frontend/templates/item/column/remove.phtml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml index 836f7f404a381..218b5ac1c879b 100644 --- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml +++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml @@ -16,7 +16,7 @@ - + @@ -29,11 +29,11 @@ - + product-item-inner - + Product Details and Comment @@ -44,12 +44,12 @@ - + product-item-actions - - + + diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml index 7fa55a839b2ea..0b50df8c59fbb 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Actions $block */ ?> getChildNames(); ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml index 45bd7494fed4f..17e2404ee23cf 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ +/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Comment $block */ /* @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml index 81d770d556734..1898ef6fc0d66 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Edit $block */ /** @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml index 53c5f35f886ea..265f4635a6be3 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ +/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Info $block */ /** @var \Magento\Wishlist\Model\Item $item */ $item = $block->getItem(); diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml index 0bd78ba38ba58..57ae439d9995b 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml @@ -6,7 +6,7 @@ // @codingStandardsIgnoreFile -/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ +/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Remove $block */ ?> From d9b01e35fb0e068b25db777a128144fede1c37fd Mon Sep 17 00:00:00 2001 From: Denis Kopylov Date: Tue, 5 Mar 2019 09:42:36 +0300 Subject: [PATCH 16/24] Change deprecation annotation (https://github.com/magento/magento2/issues/21419) --- .../Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php | 2 +- .../Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php | 2 +- .../Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php | 2 +- .../Wishlist/Block/Customer/Wishlist/Item/Column/Info.php | 2 +- .../Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php index 0cf6b6a9867d1..41ce705c77607 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php @@ -13,7 +13,7 @@ /** * @api - * @deprecated Empty class + * @deprecated * @since 100.0.2 */ class Actions extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php index 5f40e96bfa6ff..f63d083bf56b6 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php @@ -13,7 +13,7 @@ /** * @api - * @deprecated Empty class + * @deprecated * @since 100.0.2 */ class Comment extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php index c4e94ec503175..1fc73c05f6f86 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php @@ -13,7 +13,7 @@ /** * @api - * @deprecated Empty class + * @deprecated * @since 100.0.2 */ class Edit extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php index f83c122910ebd..e6067392bae48 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php @@ -13,7 +13,7 @@ /** * @api - * @deprecated Empty class + * @deprecated * @since 100.0.2 */ class Info extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php index 3e6f225842e01..724ffd90f87db 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php @@ -13,7 +13,7 @@ /** * @api - * @deprecated Empty class + * @deprecated * @since 100.0.2 */ class Remove extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column From 9661291658022dc4b9ff60cc73bc320b101d48be Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Tue, 12 Mar 2019 17:01:01 +0200 Subject: [PATCH 17/24] ENGCOM-4460: Static test fix. --- .../Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php | 4 ++-- .../Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php | 4 ++-- .../Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php | 4 ++-- .../Wishlist/Block/Customer/Wishlist/Item/Column/Info.php | 4 ++-- .../Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php index 41ce705c77607..40882ae00dae1 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php @@ -5,13 +5,13 @@ */ /** - * Wishlist for item column in customer wishlist - * * @author Magento Core Team */ namespace Magento\Wishlist\Block\Customer\Wishlist\Item\Column; /** + * Model for item column in customer wishlist. + * * @api * @deprecated * @since 100.0.2 diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php index f63d083bf56b6..53f67626e956d 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php @@ -5,13 +5,13 @@ */ /** - * Wishlist block customer item cart column - * * @author Magento Core Team */ namespace Magento\Wishlist\Block\Customer\Wishlist\Item\Column; /** + * Wishlist block customer item cart column. + * * @api * @deprecated * @since 100.0.2 diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php index 1fc73c05f6f86..c4c786961694b 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php @@ -5,13 +5,13 @@ */ /** - * Edit item in customer wishlist table - * * @author Magento Core Team */ namespace Magento\Wishlist\Block\Customer\Wishlist\Item\Column; /** + * Edit item in customer wishlist table. + * * @api * @deprecated * @since 100.0.2 diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php index e6067392bae48..b7eaf53fc23b5 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php @@ -5,13 +5,13 @@ */ /** - * Wishlist block customer item cart column - * * @author Magento Core Team */ namespace Magento\Wishlist\Block\Customer\Wishlist\Item\Column; /** + * Wishlist block customer item cart column. + * * @api * @deprecated * @since 100.0.2 diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php index 724ffd90f87db..09f5014edead6 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php @@ -5,13 +5,13 @@ */ /** - * Delete item column in customer wishlist table - * * @author Magento Core Team */ namespace Magento\Wishlist\Block\Customer\Wishlist\Item\Column; /** + * Delete item column in customer wishlist table + * * @api * @deprecated * @since 100.0.2 From 27d113fc9295cff8909913a41867d64dbbcfb377 Mon Sep 17 00:00:00 2001 From: Vitaliy Boyko Date: Wed, 13 Mar 2019 10:58:31 +0200 Subject: [PATCH 18/24] Vitalii Boiko: fixed wrong proxing in the inventory observer --- app/code/Magento/CatalogInventory/etc/di.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml index 535e91ba30f52..8c47865da6aa7 100644 --- a/app/code/Magento/CatalogInventory/etc/di.xml +++ b/app/code/Magento/CatalogInventory/etc/di.xml @@ -44,7 +44,7 @@ - Magento\CatalogInventory\Model\ResourceModel\Stock\Proxy + Magento\CatalogInventory\Model\ResourceModel\Stock\Item\Proxy From 095b9f4ef371d9e5692f42b655c81294f14c5137 Mon Sep 17 00:00:00 2001 From: Ananth Iyer Date: Mon, 25 Feb 2019 23:48:59 +0530 Subject: [PATCH 19/24] Disable dropdown in JavaScript and CSS Settings in developer configuration --- app/code/Magento/Backend/etc/adminhtml/system.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index e3411166ee4a4..44ab1dcc00176 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -153,15 +153,15 @@ - + Magento\Config\Model\Config\Source\Yesno - + Magento\Config\Model\Config\Source\Yesno - + Magento\Config\Model\Config\Source\Yesno Minification is not applied in developer mode. @@ -169,11 +169,11 @@ - + Magento\Config\Model\Config\Source\Yesno - + Magento\Config\Model\Config\Source\Yesno Minification is not applied in developer mode. From e7fb7fe185639ca6f811c63023eb0d04ceda892b Mon Sep 17 00:00:00 2001 From: Aditi Singh <36220507+aditisinghcedcoss@users.noreply.github.com> Date: Fri, 28 Dec 2018 13:09:54 +0530 Subject: [PATCH 20/24] Update AbstactSource.php Issue #13612 fixed. --- .../Eav/Model/Entity/Attribute/Source/AbstractSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php index 0991b3f9f4b23..8d5b501654749 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -73,7 +73,7 @@ public function getOptionText($value) } } // End - if (isset($options[$value])) { + if (is_scalar($value) && isset($options[$value])) { return $options[$value]; } return false; From dcf808e1922de7665c27d8d7b9f292ca96c333b9 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Fri, 25 Jan 2019 13:24:27 +0200 Subject: [PATCH 21/24] ENGCOM-3810: Static test fix. --- .../Eav/Model/Entity/Attribute/Source/AbstractSource.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php index 8d5b501654749..36ad026029056 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/AbstractSource.php @@ -80,6 +80,8 @@ public function getOptionText($value) } /** + * Get option id. + * * @param string $value * @return null|string */ From 3fa5a07399597cf9487f457361dd15b2b36ee5d4 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Mon, 4 Mar 2019 16:51:03 +0200 Subject: [PATCH 22/24] ENGCOM-4000: Upgrade data script. --- .../CatalogWidget/Setup/UpgradeData.php | 103 ++++++++++++++++++ app/code/Magento/CatalogWidget/etc/module.xml | 2 +- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/CatalogWidget/Setup/UpgradeData.php diff --git a/app/code/Magento/CatalogWidget/Setup/UpgradeData.php b/app/code/Magento/CatalogWidget/Setup/UpgradeData.php new file mode 100644 index 0000000000000..5ebdbe2390d51 --- /dev/null +++ b/app/code/Magento/CatalogWidget/Setup/UpgradeData.php @@ -0,0 +1,103 @@ +serializer = $serializer; + } + + /** + * @inheritdoc + */ + public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) + { + if (version_compare($context->getVersion(), '2.0.1', '<')) { + $this->replaceIsWithIsOneOf($setup); + } + } + + /** + * Replace 'is' condition with 'is one of' in database. + * + * If 'is' product list condition is used with multiple skus it should be replaced by 'is one of' condition. + * + * @param ModuleDataSetupInterface $setup + */ + private function replaceIsWithIsOneOf(ModuleDataSetupInterface $setup) + { + $tableName = $setup->getTable('widget_instance'); + $connection = $setup->getConnection(); + $select = $connection->select() + ->from( + $tableName, + [ + 'instance_id', + 'widget_parameters', + ] + )->where('instance_type = ? ', ProductsList::class); + + $result = $setup->getConnection()->fetchAll($select); + + if ($result) { + $updatedData = $this->updateWidgetData($result); + + $connection->insertOnDuplicate( + $tableName, + $updatedData + ); + } + } + + /** + * Replace 'is' condition with 'is one of' in widget parameters. + * + * @param array $result + * @return array + */ + private function updateWidgetData(array $result): array + { + return array_map( + function ($widgetData) { + $widgetParameters = $this->serializer->unserialize($widgetData['widget_parameters']); + foreach ($widgetParameters['conditions'] as &$condition) { + if (ConditionProduct::class === $condition['type'] && + 'sku' === $condition['attribute'] && + '==' === $condition['operator']) { + $condition['operator'] = '()'; + } + } + $widgetData['widget_parameters'] = $this->serializer->serialize($widgetParameters); + + return $widgetData; + }, + $result + ); + } +} diff --git a/app/code/Magento/CatalogWidget/etc/module.xml b/app/code/Magento/CatalogWidget/etc/module.xml index 8954f11f954f7..1f2d84bef2d6b 100644 --- a/app/code/Magento/CatalogWidget/etc/module.xml +++ b/app/code/Magento/CatalogWidget/etc/module.xml @@ -6,7 +6,7 @@ */ --> - + From 3dea8d0f34f9e4d033a7a82a22cbe93f418635ff Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Tue, 19 Mar 2019 12:11:31 +0200 Subject: [PATCH 23/24] ENGCOM-4513: Static test fix. --- .../Wishlist/view/frontend/templates/item/column/review.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml index 9120cc9fa684e..3fd492233bdd5 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/review.phtml @@ -7,4 +7,4 @@ /** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column $block */ $product = $block->getItem()->getProduct(); ?> -getReviewsSummaryHtml($product, 'short') ?> +getReviewsSummaryHtml($product, 'short'); From 0c65f5dc8917af75e159951136e934c7162873d0 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Tue, 19 Mar 2019 15:57:05 -0500 Subject: [PATCH 24/24] magento-engcom/magento2ce#2686: Skipped unstable test --- .../Magento/Backend/Controller/Adminhtml/DashboardTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php index 07af21505f180..20fbe2a3f3f62 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php @@ -21,6 +21,8 @@ public function testAjaxBlockAction() public function testTunnelAction() { + $this->markTestSkipped('MAGETWO-98803'); + $testUrl = \Magento\Backend\Block\Dashboard\Graph::API_URL . '?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'; $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $testUrl);