From 03f59fda9e6f902e25bfcfd9fdfc538dee8d8f56 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Tue, 12 Jan 2016 14:04:41 -0600 Subject: [PATCH 01/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST --- .../CatalogSearch/Model/Indexer/Fulltext.php | 17 +++++++++-------- .../Model/Indexer/Fulltext/Action/Full.php | 13 ++++++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php index c59954933ce39..bad9d312c3235 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php @@ -89,10 +89,11 @@ public function execute($ids) foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $saveHandler->deleteIndex([$dimension], new \ArrayObject($ids)); - $saveHandler->saveIndex( - [$dimension], - $this->fullAction->rebuildStoreIndex($storeId, $ids) - ); + $products = $this->fullAction->rebuildStoreIndex($storeId, $ids); + foreach ($products as $product) { + $saveHandler->saveIndex([$dimension], $product); + } + } } @@ -111,10 +112,10 @@ public function executeFull() foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $saveHandler->cleanIndex([$dimension]); - $saveHandler->saveIndex( - [$dimension], - $this->fullAction->rebuildStoreIndex($storeId) - ); + $products = $this->fullAction->rebuildStoreIndex($storeId); + foreach ($products as $product) { + $saveHandler->saveIndex([$dimension], $product); + } } $this->fulltextResource->resetSearchResults(); $this->searchRequestConfig->reset(); diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php index 4c0f94351f51d..803c3f61f7abf 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -248,10 +248,11 @@ protected function rebuildIndex($productIds = null) foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - $this->indexHandler->saveIndex( - [$dimension], - $this->rebuildStoreIndex($storeId, $productIds) - ); + $products = $this->rebuildStoreIndex($storeId, $productIds); + foreach ($products as $product) { + $this->indexHandler->saveIndex([$dimension], $product); + } + } $this->fulltextResource->resetSearchResults(); $this->searchRequestConfig->reset(); @@ -287,6 +288,7 @@ protected function getProductIdsFromParents(array $entityIds) */ public function rebuildStoreIndex($storeId, $productIds = null) { + $output = []; if ($productIds !== null) { $productIds = array_unique(array_merge($productIds, $this->getProductIdsFromParents($productIds))); } @@ -373,9 +375,10 @@ public function rebuildStoreIndex($storeId, $productIds = null) $index = $this->prepareProductIndex($productIndex, $productData, $storeId); - yield $productData['entity_id'] => $index; + $output[] = new \ArrayObject([$productData['entity_id'] => $index]); } } + return $output; } /** From d568485961fac75e97dbbfb9fef61478c448ea03 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Tue, 12 Jan 2016 17:04:22 -0600 Subject: [PATCH 02/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST --- .../Test/Unit/Model/CartItemProcessorTest.php | 22 +++++++- .../Test/Unit/Model/Indexer/FulltextTest.php | 24 ++++++--- .../Unit/Model/Queue/TransportBuilderTest.php | 53 ++++++++++++++++++- 3 files changed, 88 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php b/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php index 02be067f9e68a..03e1646cca386 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/CartItemProcessorTest.php @@ -79,7 +79,16 @@ public function testConvertToBuyRequest() $dataObjectMock = $this->getMock('\Magento\Framework\DataObject'); $optionExtensionMock = $this->getMock( '\Magento\Quote\Api\Data\ProductOptionExtensionInterface', - ['getBundleOptions'], + [ + 'getBundleOptions', + 'getCustomOptions', + 'setCustomOptions', + 'setBundleOptions', + 'getDownloadableOption', + 'setDownloadableOption', + 'getConfigurableItemOptions', + 'setConfigurableItemOptions' + ], [], '', false @@ -128,7 +137,16 @@ public function testProcessProductOptions() $productOptionMock = $this->getMock('\Magento\Quote\Model\Quote\ProductOption', [], [], '', false); $optionExtensionMock = $this->getMock( '\Magento\Quote\Api\Data\ProductOptionExtensionInterface', - ['setBundleOptions'], + [ + 'getBundleOptions', + 'getCustomOptions', + 'setCustomOptions', + 'setBundleOptions', + 'getDownloadableOption', + 'setDownloadableOption', + 'getConfigurableItemOptions', + 'setConfigurableItemOptions' + ], [], '', false diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php index 1118c81f3fa87..54e654c91cf41 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php @@ -120,8 +120,10 @@ public function testExecute() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(count($stores)))->method('saveIndex'); - $this->fullAction->expects($this->exactly(count($stores)))->method('rebuildStoreIndex')->willReturn($indexData); + $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->fullAction->expects($this->exactly(2)) + ->method('rebuildStoreIndex') + ->willReturn([$indexData, $indexData]); $this->model->execute($ids); } @@ -132,8 +134,10 @@ public function testExecuteFull() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('cleanIndex'); - $this->saveHandler->expects($this->exactly(count($stores)))->method('saveIndex'); - $this->fullAction->expects($this->exactly(count($stores)))->method('rebuildStoreIndex')->willReturn($indexData); + $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->fullAction->expects($this->exactly(2)) + ->method('rebuildStoreIndex') + ->willReturn([$indexData, $indexData]); $this->fulltextResource->expects($this->once())->method('resetSearchResults'); $this->searchRequestConfig->expects($this->once())->method('reset'); @@ -147,8 +151,10 @@ public function testExecuteList() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(count($stores)))->method('saveIndex'); - $this->fullAction->expects($this->exactly(count($stores)))->method('rebuildStoreIndex')->willReturn($indexData); + $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->fullAction->expects($this->exactly(2)) + ->method('rebuildStoreIndex') + ->willReturn([$indexData, $indexData]); $this->model->executeList($ids); } @@ -160,8 +166,10 @@ public function testExecuteRow() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(count($stores)))->method('saveIndex'); - $this->fullAction->expects($this->exactly(count($stores)))->method('rebuildStoreIndex')->willReturn($indexData); + $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->fullAction->expects($this->exactly(2)) + ->method('rebuildStoreIndex') + ->willReturn([$indexData, $indexData]); $this->model->executeRow($id); } diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php index d9e904b7000cf..a498d464eaf94 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php @@ -8,7 +8,7 @@ use Magento\Framework\App\TemplateTypesInterface; use Magento\Framework\Mail\MessageInterface; -class TransportBuilderTest extends \Magento\Framework\Mail\Test\Unit\Template\TransportBuilderTest +class TransportBuilderTest extends \PHPUnit_Framework_TestCase { /** * @var string @@ -20,6 +20,57 @@ class TransportBuilderTest extends \Magento\Framework\Mail\Test\Unit\Template\Tr */ protected $builder; + /** + * @var \Magento\Framework\Mail\Template\FactoryInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $templateFactoryMock; + + /** + * @var \Magento\Framework\Mail\Message | \PHPUnit_Framework_MockObject_MockObject + */ + protected $messageMock; + + /** + * @var \Magento\Framework\ObjectManagerInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $objectManagerMock; + + /** + * @var \Magento\Framework\Mail\Template\SenderResolverInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $senderResolverMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $mailTransportFactoryMock; + + /** + * @return void + */ + public function setUp() + { + $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->templateFactoryMock = $this->getMock('Magento\Framework\Mail\Template\FactoryInterface'); + $this->messageMock = $this->getMock('Magento\Framework\Mail\Message'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManagerInterface'); + $this->senderResolverMock = $this->getMock('Magento\Framework\Mail\Template\SenderResolverInterface'); + $this->mailTransportFactoryMock = $this->getMockBuilder('Magento\Framework\Mail\TransportInterfaceFactory') + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + $this->builder = $objectManagerHelper->getObject( + $this->builderClassName, + [ + 'templateFactory' => $this->templateFactoryMock, + 'message' => $this->messageMock, + 'objectManager' => $this->objectManagerMock, + 'senderResolver' => $this->senderResolverMock, + 'mailTransportFactory' => $this->mailTransportFactoryMock + ] + ); + } + /** * @param int $templateType * @param string $messageType From 9cf7b1a50d42bcfeeee571a9e008568f499ebd28 Mon Sep 17 00:00:00 2001 From: Igor Melnikov Date: Tue, 12 Jan 2016 18:18:16 -0600 Subject: [PATCH 03/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST Removing yield for compatibility with PHP 7 --- .../Magento/Framework/Indexer/SaveHandler/Batch.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php index 5f432356d3d1b..4c20ad939f995 100644 --- a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php +++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php @@ -17,16 +17,20 @@ public function getItems(\Traversable $documents, $size) $i = 0; $batch = []; + if (iterator_count($documents) == 0) { + return [$batch]; + } + foreach ($documents as $documentName => $documentValue) { $batch[$documentName] = $documentValue; if ($i++ >= $size) { - yield $batch; + return [$batch]; $i = 0; $batch = []; } } if (count($batch) > 0) { - yield $batch; + return [$batch]; } } } From 30aaa1145a1d1abe61c52eb1efd2c8df1497a638 Mon Sep 17 00:00:00 2001 From: Igor Melnikov Date: Tue, 12 Jan 2016 18:49:08 -0600 Subject: [PATCH 04/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST Removing yield for compatibility with PHP 7 --- .../Magento/Framework/Indexer/SaveHandler/Batch.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php index 4c20ad939f995..8601cf6709b2b 100644 --- a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php +++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php @@ -14,13 +14,12 @@ class Batch */ public function getItems(\Traversable $documents, $size) { + if (count($documents) == 0) { + return []; + } + $i = 0; $batch = []; - - if (iterator_count($documents) == 0) { - return [$batch]; - } - foreach ($documents as $documentName => $documentValue) { $batch[$documentName] = $documentValue; if ($i++ >= $size) { From 446e17b8c99b920f411b878af130d155cd3d8256 Mon Sep 17 00:00:00 2001 From: Igor Melnikov Date: Tue, 12 Jan 2016 18:57:05 -0600 Subject: [PATCH 05/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST Removing yield for compatibility with PHP 7 --- lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php index 8601cf6709b2b..0c8aa4c27ce20 100644 --- a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php +++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php @@ -10,14 +10,14 @@ class Batch /** * @param \Traversable $documents * @param int $size - * @return \Generator + * @return array */ public function getItems(\Traversable $documents, $size) { if (count($documents) == 0) { return []; } - + $i = 0; $batch = []; foreach ($documents as $documentName => $documentValue) { From 18e4fadddae03530e2cbe61b9f668b09a3d8eb49 Mon Sep 17 00:00:00 2001 From: Igor Melnikov Date: Wed, 13 Jan 2016 09:46:42 -0600 Subject: [PATCH 06/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST Removing yield for compatibility with PHP 7 --- .../Magento/Framework/Indexer/SaveHandler/Batch.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php index 0c8aa4c27ce20..d58cb71d65cef 100644 --- a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php +++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php @@ -19,17 +19,18 @@ public function getItems(\Traversable $documents, $size) } $i = 0; - $batch = []; + $batch = $items = []; foreach ($documents as $documentName => $documentValue) { $batch[$documentName] = $documentValue; if ($i++ >= $size) { - return [$batch]; + $items[] = $batch; $i = 0; $batch = []; } } if (count($batch) > 0) { - return [$batch]; + $items[] = $batch; } + return $items; } } From bad65b873f5095bc68395e8fb1f39997da69f482 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Wed, 13 Jan 2016 17:38:32 -0600 Subject: [PATCH 07/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST --- .../Product/Attribute/Collection.php | 1 + .../CatalogSearch/Model/Indexer/Fulltext.php | 12 +- .../Indexer/Fulltext/Action/ClassTen.php | 823 ++++++++++++++++++ .../Model/Indexer/Fulltext/Action/Full.php | 127 ++- .../Indexer/Fulltext/Action/IndexIterator.php | 187 ++++ 5 files changed, 1067 insertions(+), 83 deletions(-) create mode 100644 app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php create mode 100644 app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php index 3f396b654f281..29c78ea2ff152 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php @@ -39,6 +39,7 @@ public function __construct( ) { $this->_eavEntityFactory = $eavEntityFactory; parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $eavConfig, $connection, $resource); + $a = 10; } /** diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php index bad9d312c3235..c6c8cad564234 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php @@ -89,11 +89,7 @@ public function execute($ids) foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $saveHandler->deleteIndex([$dimension], new \ArrayObject($ids)); - $products = $this->fullAction->rebuildStoreIndex($storeId, $ids); - foreach ($products as $product) { - $saveHandler->saveIndex([$dimension], $product); - } - + $saveHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId, $ids)); } } @@ -112,10 +108,8 @@ public function executeFull() foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $saveHandler->cleanIndex([$dimension]); - $products = $this->fullAction->rebuildStoreIndex($storeId); - foreach ($products as $product) { - $saveHandler->saveIndex([$dimension], $product); - } + $saveHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId)); + } $this->fulltextResource->resetSearchResults(); $this->searchRequestConfig->reset(); diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php new file mode 100644 index 0000000000000..cb62bb4765342 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php @@ -0,0 +1,823 @@ +resource = $resource; + $this->connection = $resource->getConnection(); + $this->catalogProductType = $catalogProductType; + $this->eavConfig = $eavConfig; + $this->searchRequestConfig = $searchRequestConfig; + $this->catalogProductStatus = $catalogProductStatus; + $this->productAttributeCollectionFactory = $prodAttributeCollectionFactory; + $this->eventManager = $eventManager; + $this->scopeConfig = $scopeConfig; + $this->storeManager = $storeManager; + $this->engine = $engineProvider->get(); + $configData = $indexerConfig->getIndexer(Fulltext::INDEXER_ID); + $this->indexHandler = $indexHandlerFactory->create(['data' => $configData]); + $this->dateTime = $dateTime; + $this->localeResolver = $localeResolver; + $this->localeDate = $localeDate; + $this->fulltextResource = $fulltextResource; + $this->dimensionFactory = $dimensionFactory; + } + + /** + * Return validated table name + * + * @param string|string[] $table + * @return string + */ + public function getTable($table) + { + return $this->resource->getTableName($table); + } + + /** + * Regenerate search index for all stores + * + * @param int|array|null $productIds + * @return void + */ + public function rebuildIndex($productIds = null) + { + $storeIds = array_keys($this->storeManager->getStores()); + foreach ($storeIds as $storeId) { + $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); + $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); + $products = $this->rebuildStoreIndex($storeId, $productIds); + foreach ($products as $product) { + $this->indexHandler->saveIndex([$dimension], $product); + } + + } + $this->fulltextResource->resetSearchResults(); + $this->searchRequestConfig->reset(); + } + + /** + * Get parents IDs of product IDs to be re-indexed + * + * @param int[] $entityIds + * @return int[] + */ + public function getProductIdsFromParents(array $entityIds) + { + return $this->connection + ->select() + ->from($this->getTable('catalog_product_relation'), 'parent_id') + ->distinct(true) + ->where('child_id IN (?)', $entityIds) + ->where('parent_id NOT IN (?)', $entityIds) + ->query() + ->fetchAll(\Zend_Db::FETCH_COLUMN); + } + + /** + * Regenerate search index for specific store + * + * @param int $storeId Store View Id + * @param int|array $productIds Product Entity Id + * @return \Generator + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + public function rebuildStoreIndex($storeId, $productIds = null) + { + $output = []; + if ($productIds !== null) { + $productIds = array_unique(array_merge($productIds, $this->getProductIdsFromParents($productIds))); + } + // prepare searchable attributes + $staticFields = []; + foreach ($this->getSearchableAttributes('static') as $attribute) { + $staticFields[] = $attribute->getAttributeCode(); + } + $dynamicFields = [ + 'int' => array_keys($this->getSearchableAttributes('int')), + 'varchar' => array_keys($this->getSearchableAttributes('varchar')), + 'text' => array_keys($this->getSearchableAttributes('text')), + 'decimal' => array_keys($this->getSearchableAttributes('decimal')), + 'datetime' => array_keys($this->getSearchableAttributes('datetime')), + ]; + + // status and visibility filter + $visibility = $this->getSearchableAttribute('visibility'); + $status = $this->getSearchableAttribute('status'); + $statusIds = $this->catalogProductStatus->getVisibleStatusIds(); + $allowedVisibility = $this->engine->getAllowedVisibility(); + + return $this->getIndexIterator( + $storeId, + $productIds, + $staticFields, + $dynamicFields, + $visibility, + $allowedVisibility, + $status, + $statusIds + ); + } + + /** + * Retrieve searchable products per store + * + * @param int $storeId + * @param array $staticFields + * @param array|int $productIds + * @param int $lastProductId + * @param int $limit + * @return array + */ + public function getSearchableProducts( + $storeId, + array $staticFields, + $productIds = null, + $lastProductId = 0, + $limit = 100 + ) { + $websiteId = $this->storeManager->getStore($storeId)->getWebsiteId(); + $select = $this->connection->select() + ->useStraightJoin(true) + ->from( + ['e' => $this->getTable('catalog_product_entity')], + array_merge(['entity_id', 'type_id'], $staticFields) + ) + ->join( + ['website' => $this->getTable('catalog_product_website')], + $this->connection->quoteInto('website.product_id = e.entity_id AND website.website_id = ?', $websiteId), + [] + ); + + if ($productIds !== null) { + $select->where('e.entity_id IN (?)', $productIds); + } + + $select->where('e.entity_id > ?', $lastProductId)->limit($limit)->order('e.entity_id'); + + $result = $this->connection->fetchAll($select); + + return $result; + } + + /** + * Clean search index data for store + * + * @param int $storeId + * @return void + */ + public function cleanIndex($storeId) + { + $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); + $this->indexHandler->cleanIndex([$dimension]); + } + + /** + * Delete search index data for store + * + * @param int $storeId Store View Id + * @param array $productIds Product Entity Id + * @return void + */ + public function deleteIndex($storeId = null, $productIds = null) + { + $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); + $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); + } + + /** + * Retrieve EAV Config Singleton + * + * @return \Magento\Eav\Model\Config + */ + public function getEavConfig() + { + return $this->eavConfig; + } + + /** + * Retrieve searchable attributes + * + * @param string $backendType + * @return \Magento\Eav\Model\Entity\Attribute[] + */ + public function getSearchableAttributes($backendType = null) + { + if (null === $this->searchableAttributes) { + $this->searchableAttributes = []; + + $productAttributes = $this->productAttributeCollectionFactory->create(); + $productAttributes->addToIndexFilter(true); + + /** @var \Magento\Eav\Model\Entity\Attribute[] $attributes */ + $attributes = $productAttributes->getItems(); + + $this->eventManager->dispatch( + 'catelogsearch_searchable_attributes_load_after', + ['engine' => $this->engine, 'attributes' => $attributes] + ); + + $entity = $this->getEavConfig()->getEntityType(\Magento\Catalog\Model\Product::ENTITY)->getEntity(); + + foreach ($attributes as $attribute) { + $attribute->setEntity($entity); + } + + $this->searchableAttributes = $attributes; + } + + if ($backendType !== null) { + $attributes = []; + foreach ($this->searchableAttributes as $attributeId => $attribute) { + if ($attribute->getBackendType() == $backendType) { + $attributes[$attributeId] = $attribute; + } + } + + return $attributes; + } + + return $this->searchableAttributes; + } + + /** + * Retrieve searchable attribute by Id or code + * + * @param int|string $attribute + * @return \Magento\Eav\Model\Entity\Attribute + */ + public function getSearchableAttribute($attribute) + { + $attributes = $this->getSearchableAttributes(); + if (is_numeric($attribute)) { + if (isset($attributes[$attribute])) { + return $attributes[$attribute]; + } + } elseif (is_string($attribute)) { + foreach ($attributes as $attributeModel) { + if ($attributeModel->getAttributeCode() == $attribute) { + return $attributeModel; + } + } + } + + return $this->getEavConfig()->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attribute); + } + + /** + * Returns expression for field unification + * + * @param string $field + * @param string $backendType + * @return \Zend_Db_Expr + */ + public function unifyField($field, $backendType = 'varchar') + { + if ($backendType == 'datetime') { + $expr = $this->connection->getDateFormatSql($field, '%Y-%m-%d %H:%i:%s'); + } else { + $expr = $field; + } + return $expr; + } + + /** + * Load product(s) attributes + * + * @param int $storeId + * @param array $productIds + * @param array $attributeTypes + * @return array + */ + public function getProductAttributes($storeId, array $productIds, array $attributeTypes) + { + $result = []; + $selects = []; + $ifStoreValue = $this->connection->getCheckSql('t_store.value_id > 0', 't_store.value', 't_default.value'); + foreach ($attributeTypes as $backendType => $attributeIds) { + if ($attributeIds) { + $tableName = $this->getTable('catalog_product_entity_' . $backendType); + $selects[] = $this->connection->select()->from( + ['t_default' => $tableName], + ['entity_id', 'attribute_id'] + )->joinLeft( + ['t_store' => $tableName], + $this->connection->quoteInto( + 't_default.entity_id=t_store.entity_id' . + ' AND t_default.attribute_id=t_store.attribute_id' . + ' AND t_store.store_id = ?', + $storeId + ), + ['value' => $this->unifyField($ifStoreValue, $backendType)] + )->where( + 't_default.store_id = ?', + 0 + )->where( + 't_default.attribute_id IN (?)', + $attributeIds + )->where( + 't_default.entity_id IN (?)', + $productIds + ); + } + } + + if ($selects) { + $select = $this->connection->select()->union($selects, \Magento\Framework\DB\Select::SQL_UNION_ALL); + $query = $this->connection->query($select); + while ($row = $query->fetch()) { + $result[$row['entity_id']][$row['attribute_id']] = $row['value']; + } + } + + return $result; + } + + /** + * Retrieve Product Type Instance + * + * @param string $typeId + * @return \Magento\Catalog\Model\Product\Type\AbstractType + */ + public function getProductTypeInstance($typeId) + { + if (!isset($this->productTypes[$typeId])) { + $productEmulator = $this->getProductEmulator($typeId); + + $this->productTypes[$typeId] = $this->catalogProductType->factory($productEmulator); + } + return $this->productTypes[$typeId]; + } + + /** + * Return all product children ids + * + * @param int $productId Product Entity Id + * @param string $typeId Super Product Link Type + * @return array|null + */ + public function getProductChildIds($productId, $typeId) + { + $typeInstance = $this->getProductTypeInstance($typeId); + $relation = $typeInstance->isComposite( + $this->getProductEmulator($typeId) + ) ? $typeInstance->getRelationInfo() : false; + + if ($relation && $relation->getTable() && $relation->getParentFieldName() && $relation->getChildFieldName()) { + $select = $this->connection->select()->from( + ['main' => $this->getTable($relation->getTable())], + [$relation->getChildFieldName()] + )->where( + $relation->getParentFieldName() . ' = ?', + $productId + ); + if ($relation->getWhere() !== null) { + $select->where($relation->getWhere()); + } + return $this->connection->fetchCol($select); + } + + return null; + } + + /** + * Retrieve Product Emulator (Magento Object) + * + * @param string $typeId + * @return \Magento\Framework\DataObject + */ + public function getProductEmulator($typeId) + { + if (!isset($this->productEmulators[$typeId])) { + $productEmulator = new \Magento\Framework\DataObject(); + $productEmulator->setTypeId($typeId); + $this->productEmulators[$typeId] = $productEmulator; + } + return $this->productEmulators[$typeId]; + } + + /** + * Prepare Fulltext index value for product + * + * @param array $indexData + * @param array $productData + * @param int $storeId + * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + public function prepareProductIndex($indexData, $productData, $storeId) + { + $index = []; + + foreach ($this->getSearchableAttributes('static') as $attribute) { + $attributeCode = $attribute->getAttributeCode(); + + if (isset($productData[$attributeCode])) { + + if ('store_id' === $attributeCode) { + continue; + } + + $value = $this->getAttributeValue($attribute->getId(), $productData[$attributeCode], $storeId); + if ($value) { + if (isset($index[$attribute->getId()])) { + if (!is_array($index[$attribute->getId()])) { + $index[$attribute->getId()] = [$index[$attribute->getId()]]; + } + $index[$attribute->getId()][] = $value; + } else { + $index[$attribute->getId()] = $value; + } + } + } + } + + foreach ($indexData as $entityId => $attributeData) { + foreach ($attributeData as $attributeId => $attributeValue) { + $value = $this->getAttributeValue($attributeId, $attributeValue, $storeId); + if (!empty($value)) { + if (isset($index[$attributeId])) { + $index[$attributeId][$entityId] = $value; + } else { + $index[$attributeId] = [$entityId => $value]; + } + } + } + } + + $product = $this->getProductEmulator( + $productData['type_id'] + )->setId( + $productData['entity_id'] + )->setStoreId( + $storeId + ); + $typeInstance = $this->getProductTypeInstance($productData['type_id']); + $data = $typeInstance->getSearchableData($product); + if ($data) { + $index['options'] = $data; + } + + return $this->engine->prepareEntityIndex($index, $this->separator); + } + + /** + * Retrieve attribute source value for search + * + * @param int $attributeId + * @param mixed $valueId + * @param int $storeId + * @return mixed + */ + public function getAttributeValue($attributeId, $valueId, $storeId) + { + $attribute = $this->getSearchableAttribute($attributeId); + $value = $this->engine->processAttributeValue($attribute, $valueId); + + if (false !== $value + && $attribute->getIsSearchable() + && $attribute->usesSource() + && $this->engine->allowAdvancedIndex() + ) { + $attribute->setStoreId($storeId); + + $valueText = (array) $attribute->getSource()->getIndexOptionText($valueId); + + $pieces = array_filter(array_merge([$value], $valueText)); + + $value = implode($this->separator, $pieces); + } + + $value = preg_replace('/\\s+/siu', ' ', trim(strip_tags($value))); + + return $value; + } + + /** + * Retrieve Date value for store + * + * @param int $storeId + * @param string $date + * @return string|null + */ + public function getStoreDate($storeId, $date = null) + { + if (!isset($this->dates[$storeId])) { + $timezone = $this->scopeConfig->getValue( + $this->localeDate->getDefaultTimezonePath(), + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ); + + $this->localeResolver->emulate($storeId); + + $dateObj = new \DateTime(); + $dateObj->setTimezone(new \DateTimeZone($timezone)); + $this->dates[$storeId] = $dateObj; + + $this->localeResolver->revert(); + } + + if (!$this->dateTime->isEmptyDate($date)) { + /** @var \DateTime $dateObj */ + $dateObj = $this->dates[$storeId]; + return $this->localeDate->formatDateTime($dateObj, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE); + } + + return null; + } + + /** + * Get iterator + * + * @param array $data + * @return \Generator + */ + public function getIterator(array $data) + { + foreach ($data as $key => $value) { + yield $key => $value; + } + } + + /** + * @param $storeId + * @param $productIds + * @param $staticFields + * @param $dynamicFields + * @param $visibility + * @param $allowedVisibility + * @param $status + * @param $statusIds + * @param $output + * @return \Iterator + */ + public function getIndexIterator( + $storeId, + $productIds, + $staticFields, + $dynamicFields, + $visibility, + $allowedVisibility, + $status, + $statusIds + ) { + $lastProductId = 0; + while (true) { + $products = $this->getSearchableProducts($storeId, $staticFields, $productIds, $lastProductId); + if (!$products) { + break; + } + + $productAttributes = []; + $productRelations = []; + foreach ($products as $productData) { + $lastProductId = $productData['entity_id']; + $productAttributes[$productData['entity_id']] = $productData['entity_id']; + $productChildren = $this->getProductChildIds($productData['entity_id'], $productData['type_id']); + $productRelations[$productData['entity_id']] = $productChildren; + if ($productChildren) { + foreach ($productChildren as $productChildId) { + $productAttributes[$productChildId] = $productChildId; + } + } + } + + $productAttributes = $this->getProductAttributes($storeId, $productAttributes, $dynamicFields); + foreach ($products as $productData) { + if (!isset($productAttributes[$productData['entity_id']])) { + continue; + } + + $productAttr = $productAttributes[$productData['entity_id']]; + if (!isset($productAttr[$visibility->getId()]) + || !in_array($productAttr[$visibility->getId()], $allowedVisibility) + ) { + continue; + } + if (!isset($productAttr[$status->getId()]) + || !in_array($productAttr[$status->getId()], $statusIds) + ) { + continue; + } + + $productIndex = [$productData['entity_id'] => $productAttr]; + + $hasChildren = false; + $productChildren = $productRelations[$productData['entity_id']]; + if ($productChildren) { + foreach ($productChildren as $productChildId) { + if (isset($productAttributes[$productChildId])) { + $productChildAttr = $productAttributes[$productChildId]; + if (!isset($productChildAttr[$status->getId()]) + || !in_array($productChildAttr[$status->getId()], $statusIds) + ) { + continue; + } + + $hasChildren = true; + $productIndex[$productChildId] = $productChildAttr; + } + } + } + if ($productChildren !== null && !$hasChildren) { + continue; + } + + $index = $this->prepareProductIndex($productIndex, $productData, $storeId); + + yield [$productData['entity_id'] => $index]; + } + } + } +} diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php index 803c3f61f7abf..9ea927eeec4df 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -151,6 +151,11 @@ class Full */ protected $connection; + /** + * @var \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIteratorFactory + */ + private $iteratorFactory; + /** * @param ResourceConnection $resource * @param \Magento\Catalog\Model\Product\Type $catalogProductType @@ -188,7 +193,8 @@ public function __construct( \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\CatalogSearch\Model\ResourceModel\Fulltext $fulltextResource, \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory, - \Magento\Framework\Indexer\ConfigInterface $indexerConfig + \Magento\Framework\Indexer\ConfigInterface $indexerConfig, + \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIteratorFactory $classTenFactory ) { $this->resource = $resource; $this->connection = $resource->getConnection(); @@ -208,6 +214,7 @@ public function __construct( $this->localeDate = $localeDate; $this->fulltextResource = $fulltextResource; $this->dimensionFactory = $dimensionFactory; + $this->iteratorFactory = $classTenFactory; } /** @@ -248,11 +255,7 @@ protected function rebuildIndex($productIds = null) foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - $products = $this->rebuildStoreIndex($storeId, $productIds); - foreach ($products as $product) { - $this->indexHandler->saveIndex([$dimension], $product); - } - + $this->indexHandler->saveIndex([$dimension], $this->rebuildStoreIndex($storeId, $productIds)); } $this->fulltextResource->resetSearchResults(); $this->searchRequestConfig->reset(); @@ -311,74 +314,16 @@ public function rebuildStoreIndex($storeId, $productIds = null) $statusIds = $this->catalogProductStatus->getVisibleStatusIds(); $allowedVisibility = $this->engine->getAllowedVisibility(); - $lastProductId = 0; - while (true) { - $products = $this->getSearchableProducts($storeId, $staticFields, $productIds, $lastProductId); - if (!$products) { - break; - } - - $productAttributes = []; - $productRelations = []; - foreach ($products as $productData) { - $lastProductId = $productData['entity_id']; - $productAttributes[$productData['entity_id']] = $productData['entity_id']; - $productChildren = $this->getProductChildIds($productData['entity_id'], $productData['type_id']); - $productRelations[$productData['entity_id']] = $productChildren; - if ($productChildren) { - foreach ($productChildren as $productChildId) { - $productAttributes[$productChildId] = $productChildId; - } - } - } - - $productAttributes = $this->getProductAttributes($storeId, $productAttributes, $dynamicFields); - foreach ($products as $productData) { - if (!isset($productAttributes[$productData['entity_id']])) { - continue; - } - - $productAttr = $productAttributes[$productData['entity_id']]; - if (!isset($productAttr[$visibility->getId()]) - || !in_array($productAttr[$visibility->getId()], $allowedVisibility) - ) { - continue; - } - if (!isset($productAttr[$status->getId()]) - || !in_array($productAttr[$status->getId()], $statusIds) - ) { - continue; - } - - $productIndex = [$productData['entity_id'] => $productAttr]; - - $hasChildren = false; - $productChildren = $productRelations[$productData['entity_id']]; - if ($productChildren) { - foreach ($productChildren as $productChildId) { - if (isset($productAttributes[$productChildId])) { - $productChildAttr = $productAttributes[$productChildId]; - if (!isset($productChildAttr[$status->getId()]) - || !in_array($productChildAttr[$status->getId()], $statusIds) - ) { - continue; - } - - $hasChildren = true; - $productIndex[$productChildId] = $productChildAttr; - } - } - } - if ($productChildren !== null && !$hasChildren) { - continue; - } - - $index = $this->prepareProductIndex($productIndex, $productData, $storeId); - - $output[] = new \ArrayObject([$productData['entity_id'] => $index]); - } - } - return $output; + return $this->getIndexIterator( + $storeId, + $productIds, + $staticFields, + $dynamicFields, + $visibility, + $allowedVisibility, + $status, + $statusIds + ); } /** @@ -802,4 +747,38 @@ protected function getIterator(array $data) yield $key => $value; } } + + /** + * @param $storeId + * @param $productIds + * @param $staticFields + * @param $dynamicFields + * @param $visibility + * @param $allowedVisibility + * @param $status + * @param $statusIds + * @param $output + * @return \Iterator + */ + protected function getIndexIterator( + $storeId, + $productIds, + $staticFields, + $dynamicFields, + $visibility, + $allowedVisibility, + $status, + $statusIds + ) { + return $this->iteratorFactory->create([ + 'storeId' => $storeId, + 'productIds' => $productIds, + 'staticFields' => $staticFields, + 'dynamicFields' => $dynamicFields, + 'visibility' => $visibility, + 'allowedVisibility' => $allowedVisibility, + 'status' => $status, + 'statusIds' => $statusIds + ]); + } } diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php new file mode 100644 index 0000000000000..3bedb665a9b5f --- /dev/null +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php @@ -0,0 +1,187 @@ +dataProvider = $dataProvider; + $this->storeId = $storeId; + $this->staticFields = $staticFields; + $this->productIds = $productIds; + $this->dynamicFields = $dynamicFields; + $this->visibility = $visibility; + $this->allowedVisibility = $allowedVisibility; + $this->status = $status; + $this->statusIds = $statusIds; + } + + + /** + * @inheritDoc + */ + public function current() + { + return $this->current; + } + + /** + * @inheritDoc + */ + public function next() + { + \next($this->products); + if (\key($this->products) === null) { + //check if storage has more items to process + $this->products = $this->dataProvider->getSearchableProducts( + $this->storeId, + $this->staticFields, + $this->productIds, + $this->lastProductId + ); + + if(!count($this->products)) { + $this->isValid = false; + return; + } + + + $productAttributes = []; + $this->productRelations = []; + foreach ($this->products as $productData) { + $this->lastProductId = $productData['entity_id']; + $productAttributes[$productData['entity_id']] = $productData['entity_id']; + $productChildren = $this->dataProvider->getProductChildIds($productData['entity_id'], $productData['type_id']); + $this->productRelations[$productData['entity_id']] = $productChildren; + if ($productChildren) { + foreach ($productChildren as $productChildId) { + $productAttributes[$productChildId] = $productChildId; + } + } + } + + $this->productAttributes = $this->dataProvider->getProductAttributes($this->storeId, $productAttributes, $this->dynamicFields); + } + + $productData = \current($this->products); + + if (!isset($this->productAttributes[$productData['entity_id']])) { + $this->next(); + } + + $productAttr = $this->productAttributes[$productData['entity_id']]; + if (!isset($productAttr[$this->visibility->getId()]) + || !in_array($productAttr[$this->visibility->getId()], $this->allowedVisibility) + ) { + $this->next(); + } + if (!isset($productAttr[$this->status->getId()]) + || !in_array($productAttr[$this->status->getId()], $this->statusIds) + ) { + $this->next(); + } + + $productIndex = [$productData['entity_id'] => $productAttr]; + + $hasChildren = false; + $productChildren = $this->productRelations[$productData['entity_id']]; + if ($productChildren) { + foreach ($productChildren as $productChildId) { + if (isset($productAttributes[$productChildId])) { + $productChildAttr = $productAttributes[$productChildId]; + if (!isset($productChildAttr[$this->status->getId()]) + || !in_array($productChildAttr[$this->status->getId()], $this->statusIds) + ) { + continue; + } + + $hasChildren = true; + $productIndex[$productChildId] = $productChildAttr; + } + } + } + if ($productChildren !== null && !$hasChildren) { + $this->next(); + } + + $index = $this->dataProvider->prepareProductIndex($productIndex, $productData, $this->storeId); + + $this->current = $index; + $this->key = $productData['entity_id']; + } + + /** + * @inheritDoc + */ + public function key() + { + return $this->key; + } + + /** + * @inheritDoc + */ + public function valid() + { + return $this->isValid; + } + + /** + * @inheritDoc + */ + public function rewind() + { + $this->lastProductId = 0; + $this->key = null; + $this->current = null; + unset($this->products); + $this->products = []; + $this->next(); + } +} \ No newline at end of file From 0753caf18fb24eb2f96ae0a945b4288dfffb757f Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Wed, 13 Jan 2016 17:51:05 -0600 Subject: [PATCH 08/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST --- .../Test/Unit/Model/Indexer/FulltextTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php index 54e654c91cf41..962bc1f6d7c61 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php @@ -120,10 +120,10 @@ public function testExecute() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->saveHandler->expects($this->exactly(2))->method('saveIndex'); $this->fullAction->expects($this->exactly(2)) ->method('rebuildStoreIndex') - ->willReturn([$indexData, $indexData]); + ->willReturn(new \ArrayObject([$indexData, $indexData])); $this->model->execute($ids); } @@ -134,10 +134,10 @@ public function testExecuteFull() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('cleanIndex'); - $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->saveHandler->expects($this->exactly(2))->method('saveIndex'); $this->fullAction->expects($this->exactly(2)) ->method('rebuildStoreIndex') - ->willReturn([$indexData, $indexData]); + ->willReturn(new \ArrayObject([$indexData, $indexData])); $this->fulltextResource->expects($this->once())->method('resetSearchResults'); $this->searchRequestConfig->expects($this->once())->method('reset'); @@ -151,10 +151,10 @@ public function testExecuteList() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->saveHandler->expects($this->exactly(2))->method('saveIndex'); $this->fullAction->expects($this->exactly(2)) ->method('rebuildStoreIndex') - ->willReturn([$indexData, $indexData]); + ->willReturn(new \ArrayObject([$indexData, $indexData])); $this->model->executeList($ids); } @@ -166,10 +166,10 @@ public function testExecuteRow() $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('deleteIndex'); - $this->saveHandler->expects($this->exactly(4))->method('saveIndex'); + $this->saveHandler->expects($this->exactly(2))->method('saveIndex'); $this->fullAction->expects($this->exactly(2)) ->method('rebuildStoreIndex') - ->willReturn([$indexData, $indexData]); + ->willReturn(new \ArrayObject([$indexData, $indexData])); $this->model->executeRow($id); } From 3d273bc19c819dd356e0c1bd8be3faba2ecbe3a9 Mon Sep 17 00:00:00 2001 From: Olga Kopylova Date: Thu, 14 Jan 2016 16:23:03 -0600 Subject: [PATCH 09/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST - fixed code style - fixed batching - removed unused variables and methods --- .../Product/Attribute/Collection.php | 1 - .../Action/{ClassTen.php => DataProvider.php} | 392 ++---------------- .../Model/Indexer/Fulltext/Action/Full.php | 360 +--------------- .../Indexer/Fulltext/Action/IndexIterator.php | 125 ++++-- .../Framework/Indexer/SaveHandler/Batch.php | 2 +- .../Framework/Indexer/Test/Unit/BatchTest.php | 80 ++++ 6 files changed, 214 insertions(+), 746 deletions(-) rename app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/{ClassTen.php => DataProvider.php} (51%) create mode 100644 lib/internal/Magento/Framework/Indexer/Test/Unit/BatchTest.php diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php index 29c78ea2ff152..3f396b654f281 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Attribute/Collection.php @@ -39,7 +39,6 @@ public function __construct( ) { $this->_eavEntityFactory = $eavEntityFactory; parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $eavConfig, $connection, $resource); - $a = 10; } /** diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php similarity index 51% rename from app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php rename to app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php index cb62bb4765342..385fd7be3b4ba 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/ClassTen.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php @@ -5,209 +5,115 @@ */ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; -use Magento\CatalogSearch\Model\Indexer\Fulltext; use Magento\Framework\App\ResourceConnection; /** - * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class ClassTen +class DataProvider { - /** - * Scope identifier - */ - const SCOPE_FIELD_NAME = 'scope'; - /** * Searchable attributes cache * * @var \Magento\Eav\Model\Entity\Attribute[] */ - protected $searchableAttributes; + private $searchableAttributes; /** * Index values separator * * @var string */ - protected $separator = ' | '; - - /** - * Array of \DateTime objects per store - * - * @var \DateTime[] - */ - protected $dates = []; + private $separator = ' | '; /** * Product Type Instances cache * * @var array */ - protected $productTypes = []; + private $productTypes = []; /** * Product Emulators cache * * @var array */ - protected $productEmulators = []; + private $productEmulators = []; /** * @var \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory */ - protected $productAttributeCollectionFactory; - - /** - * Catalog product status - * - * @var \Magento\Catalog\Model\Product\Attribute\Source\Status - */ - protected $catalogProductStatus; + private $productAttributeCollectionFactory; /** * Eav config * * @var \Magento\Eav\Model\Config */ - protected $eavConfig; + private $eavConfig; /** * Catalog product type * * @var \Magento\Catalog\Model\Product\Type */ - protected $catalogProductType; + private $catalogProductType; /** * Core event manager proxy * * @var \Magento\Framework\Event\ManagerInterface */ - protected $eventManager; - - /** - * Core store config - * - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $scopeConfig; + private $eventManager; /** * Store manager * * @var \Magento\Store\Model\StoreManagerInterface */ - protected $storeManager; + private $storeManager; /** * @var \Magento\CatalogSearch\Model\ResourceModel\Engine */ - protected $engine; - - /** - * @var \Magento\Framework\Indexer\SaveHandler\IndexerInterface - */ - protected $indexHandler; - - /** - * @var \Magento\Framework\Stdlib\DateTime - */ - protected $dateTime; - - /** - * @var \Magento\Framework\Locale\ResolverInterface - */ - protected $localeResolver; - - /** - * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface - */ - protected $localeDate; + private $engine; /** * @var Resource */ - protected $resource; - - /** - * @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext - */ - protected $fulltextResource; - - /** - * @var \Magento\Framework\Search\Request\Config - */ - protected $searchRequestConfig; - - /** - * @var \Magento\Framework\Search\Request\DimensionFactory - */ - private $dimensionFactory; + private $resource; /** * @var \Magento\Framework\DB\Adapter\AdapterInterface */ - protected $connection; + private $connection; /** * @param ResourceConnection $resource * @param \Magento\Catalog\Model\Product\Type $catalogProductType * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Framework\Search\Request\Config $searchRequestConfig - * @param \Magento\Catalog\Model\Product\Attribute\Source\Status $catalogProductStatus * @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $prodAttributeCollectionFactory * @param \Magento\CatalogSearch\Model\ResourceModel\EngineProvider $engineProvider - * @param \Magento\CatalogSearch\Model\Indexer\IndexerHandlerFactory $indexHandlerFactory * @param \Magento\Framework\Event\ManagerInterface $eventManager - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\Stdlib\DateTime $dateTime - * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\CatalogSearch\Model\ResourceModel\Fulltext $fulltextResource - * @param \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory - * @param \Magento\Framework\Indexer\ConfigInterface $indexerConfig - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ResourceConnection $resource, \Magento\Catalog\Model\Product\Type $catalogProductType, \Magento\Eav\Model\Config $eavConfig, - \Magento\Framework\Search\Request\Config $searchRequestConfig, - \Magento\Catalog\Model\Product\Attribute\Source\Status $catalogProductStatus, \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $prodAttributeCollectionFactory, \Magento\CatalogSearch\Model\ResourceModel\EngineProvider $engineProvider, - \Magento\CatalogSearch\Model\Indexer\IndexerHandlerFactory $indexHandlerFactory, \Magento\Framework\Event\ManagerInterface $eventManager, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\Stdlib\DateTime $dateTime, - \Magento\Framework\Locale\ResolverInterface $localeResolver, - \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\CatalogSearch\Model\ResourceModel\Fulltext $fulltextResource, - \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory, - \Magento\Framework\Indexer\ConfigInterface $indexerConfig + \Magento\Store\Model\StoreManagerInterface $storeManager ) { $this->resource = $resource; $this->connection = $resource->getConnection(); $this->catalogProductType = $catalogProductType; $this->eavConfig = $eavConfig; - $this->searchRequestConfig = $searchRequestConfig; - $this->catalogProductStatus = $catalogProductStatus; $this->productAttributeCollectionFactory = $prodAttributeCollectionFactory; $this->eventManager = $eventManager; - $this->scopeConfig = $scopeConfig; $this->storeManager = $storeManager; $this->engine = $engineProvider->get(); - $configData = $indexerConfig->getIndexer(Fulltext::INDEXER_ID); - $this->indexHandler = $indexHandlerFactory->create(['data' => $configData]); - $this->dateTime = $dateTime; - $this->localeResolver = $localeResolver; - $this->localeDate = $localeDate; - $this->fulltextResource = $fulltextResource; - $this->dimensionFactory = $dimensionFactory; } /** @@ -216,98 +122,11 @@ public function __construct( * @param string|string[] $table * @return string */ - public function getTable($table) + private function getTable($table) { return $this->resource->getTableName($table); } - /** - * Regenerate search index for all stores - * - * @param int|array|null $productIds - * @return void - */ - public function rebuildIndex($productIds = null) - { - $storeIds = array_keys($this->storeManager->getStores()); - foreach ($storeIds as $storeId) { - $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); - $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - $products = $this->rebuildStoreIndex($storeId, $productIds); - foreach ($products as $product) { - $this->indexHandler->saveIndex([$dimension], $product); - } - - } - $this->fulltextResource->resetSearchResults(); - $this->searchRequestConfig->reset(); - } - - /** - * Get parents IDs of product IDs to be re-indexed - * - * @param int[] $entityIds - * @return int[] - */ - public function getProductIdsFromParents(array $entityIds) - { - return $this->connection - ->select() - ->from($this->getTable('catalog_product_relation'), 'parent_id') - ->distinct(true) - ->where('child_id IN (?)', $entityIds) - ->where('parent_id NOT IN (?)', $entityIds) - ->query() - ->fetchAll(\Zend_Db::FETCH_COLUMN); - } - - /** - * Regenerate search index for specific store - * - * @param int $storeId Store View Id - * @param int|array $productIds Product Entity Id - * @return \Generator - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - */ - public function rebuildStoreIndex($storeId, $productIds = null) - { - $output = []; - if ($productIds !== null) { - $productIds = array_unique(array_merge($productIds, $this->getProductIdsFromParents($productIds))); - } - // prepare searchable attributes - $staticFields = []; - foreach ($this->getSearchableAttributes('static') as $attribute) { - $staticFields[] = $attribute->getAttributeCode(); - } - $dynamicFields = [ - 'int' => array_keys($this->getSearchableAttributes('int')), - 'varchar' => array_keys($this->getSearchableAttributes('varchar')), - 'text' => array_keys($this->getSearchableAttributes('text')), - 'decimal' => array_keys($this->getSearchableAttributes('decimal')), - 'datetime' => array_keys($this->getSearchableAttributes('datetime')), - ]; - - // status and visibility filter - $visibility = $this->getSearchableAttribute('visibility'); - $status = $this->getSearchableAttribute('status'); - $statusIds = $this->catalogProductStatus->getVisibleStatusIds(); - $allowedVisibility = $this->engine->getAllowedVisibility(); - - return $this->getIndexIterator( - $storeId, - $productIds, - $staticFields, - $dynamicFields, - $visibility, - $allowedVisibility, - $status, - $statusIds - ); - } - /** * Retrieve searchable products per store * @@ -349,37 +168,12 @@ public function getSearchableProducts( return $result; } - /** - * Clean search index data for store - * - * @param int $storeId - * @return void - */ - public function cleanIndex($storeId) - { - $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); - $this->indexHandler->cleanIndex([$dimension]); - } - - /** - * Delete search index data for store - * - * @param int $storeId Store View Id - * @param array $productIds Product Entity Id - * @return void - */ - public function deleteIndex($storeId = null, $productIds = null) - { - $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); - $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - } - /** * Retrieve EAV Config Singleton * * @return \Magento\Eav\Model\Config */ - public function getEavConfig() + private function getEavConfig() { return $this->eavConfig; } @@ -390,11 +184,12 @@ public function getEavConfig() * @param string $backendType * @return \Magento\Eav\Model\Entity\Attribute[] */ - public function getSearchableAttributes($backendType = null) + private function getSearchableAttributes($backendType = null) { if (null === $this->searchableAttributes) { $this->searchableAttributes = []; + /** @var \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection $productAttributes */ $productAttributes = $this->productAttributeCollectionFactory->create(); $productAttributes->addToIndexFilter(true); @@ -435,7 +230,7 @@ public function getSearchableAttributes($backendType = null) * @param int|string $attribute * @return \Magento\Eav\Model\Entity\Attribute */ - public function getSearchableAttribute($attribute) + private function getSearchableAttribute($attribute) { $attributes = $this->getSearchableAttributes(); if (is_numeric($attribute)) { @@ -460,7 +255,7 @@ public function getSearchableAttribute($attribute) * @param string $backendType * @return \Zend_Db_Expr */ - public function unifyField($field, $backendType = 'varchar') + private function unifyField($field, $backendType = 'varchar') { if ($backendType == 'datetime') { $expr = $this->connection->getDateFormatSql($field, '%Y-%m-%d %H:%i:%s'); @@ -528,7 +323,7 @@ public function getProductAttributes($storeId, array $productIds, array $attribu * @param string $typeId * @return \Magento\Catalog\Model\Product\Type\AbstractType */ - public function getProductTypeInstance($typeId) + private function getProductTypeInstance($typeId) { if (!isset($this->productTypes[$typeId])) { $productEmulator = $this->getProductEmulator($typeId); @@ -575,7 +370,7 @@ public function getProductChildIds($productId, $typeId) * @param string $typeId * @return \Magento\Framework\DataObject */ - public function getProductEmulator($typeId) + private function getProductEmulator($typeId) { if (!isset($this->productEmulators[$typeId])) { $productEmulator = new \Magento\Framework\DataObject(); @@ -593,7 +388,6 @@ public function getProductEmulator($typeId) * @param int $storeId * @return string * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) */ public function prepareProductIndex($indexData, $productData, $storeId) { @@ -657,9 +451,9 @@ public function prepareProductIndex($indexData, $productData, $storeId) * @param int $attributeId * @param mixed $valueId * @param int $storeId - * @return mixed + * @return string */ - public function getAttributeValue($attributeId, $valueId, $storeId) + private function getAttributeValue($attributeId, $valueId, $storeId) { $attribute = $this->getSearchableAttribute($attributeId); $value = $this->engine->processAttributeValue($attribute, $valueId); @@ -682,142 +476,4 @@ public function getAttributeValue($attributeId, $valueId, $storeId) return $value; } - - /** - * Retrieve Date value for store - * - * @param int $storeId - * @param string $date - * @return string|null - */ - public function getStoreDate($storeId, $date = null) - { - if (!isset($this->dates[$storeId])) { - $timezone = $this->scopeConfig->getValue( - $this->localeDate->getDefaultTimezonePath(), - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - $storeId - ); - - $this->localeResolver->emulate($storeId); - - $dateObj = new \DateTime(); - $dateObj->setTimezone(new \DateTimeZone($timezone)); - $this->dates[$storeId] = $dateObj; - - $this->localeResolver->revert(); - } - - if (!$this->dateTime->isEmptyDate($date)) { - /** @var \DateTime $dateObj */ - $dateObj = $this->dates[$storeId]; - return $this->localeDate->formatDateTime($dateObj, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE); - } - - return null; - } - - /** - * Get iterator - * - * @param array $data - * @return \Generator - */ - public function getIterator(array $data) - { - foreach ($data as $key => $value) { - yield $key => $value; - } - } - - /** - * @param $storeId - * @param $productIds - * @param $staticFields - * @param $dynamicFields - * @param $visibility - * @param $allowedVisibility - * @param $status - * @param $statusIds - * @param $output - * @return \Iterator - */ - public function getIndexIterator( - $storeId, - $productIds, - $staticFields, - $dynamicFields, - $visibility, - $allowedVisibility, - $status, - $statusIds - ) { - $lastProductId = 0; - while (true) { - $products = $this->getSearchableProducts($storeId, $staticFields, $productIds, $lastProductId); - if (!$products) { - break; - } - - $productAttributes = []; - $productRelations = []; - foreach ($products as $productData) { - $lastProductId = $productData['entity_id']; - $productAttributes[$productData['entity_id']] = $productData['entity_id']; - $productChildren = $this->getProductChildIds($productData['entity_id'], $productData['type_id']); - $productRelations[$productData['entity_id']] = $productChildren; - if ($productChildren) { - foreach ($productChildren as $productChildId) { - $productAttributes[$productChildId] = $productChildId; - } - } - } - - $productAttributes = $this->getProductAttributes($storeId, $productAttributes, $dynamicFields); - foreach ($products as $productData) { - if (!isset($productAttributes[$productData['entity_id']])) { - continue; - } - - $productAttr = $productAttributes[$productData['entity_id']]; - if (!isset($productAttr[$visibility->getId()]) - || !in_array($productAttr[$visibility->getId()], $allowedVisibility) - ) { - continue; - } - if (!isset($productAttr[$status->getId()]) - || !in_array($productAttr[$status->getId()], $statusIds) - ) { - continue; - } - - $productIndex = [$productData['entity_id'] => $productAttr]; - - $hasChildren = false; - $productChildren = $productRelations[$productData['entity_id']]; - if ($productChildren) { - foreach ($productChildren as $productChildId) { - if (isset($productAttributes[$productChildId])) { - $productChildAttr = $productAttributes[$productChildId]; - if (!isset($productChildAttr[$status->getId()]) - || !in_array($productChildAttr[$status->getId()], $statusIds) - ) { - continue; - } - - $hasChildren = true; - $productIndex[$productChildId] = $productChildAttr; - } - } - } - if ($productChildren !== null && !$hasChildren) { - continue; - } - - $index = $this->prepareProductIndex($productIndex, $productData, $storeId); - - yield [$productData['entity_id'] => $index]; - } - } - } } diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php index 9ea927eeec4df..e6f4c2f452766 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php @@ -174,6 +174,7 @@ class Full * @param \Magento\CatalogSearch\Model\ResourceModel\Fulltext $fulltextResource * @param \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory * @param \Magento\Framework\Indexer\ConfigInterface $indexerConfig + * @param \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIteratorFactory $indexIteratorFactory * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -194,7 +195,7 @@ public function __construct( \Magento\CatalogSearch\Model\ResourceModel\Fulltext $fulltextResource, \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory, \Magento\Framework\Indexer\ConfigInterface $indexerConfig, - \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIteratorFactory $classTenFactory + \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIteratorFactory $indexIteratorFactory ) { $this->resource = $resource; $this->connection = $resource->getConnection(); @@ -214,7 +215,7 @@ public function __construct( $this->localeDate = $localeDate; $this->fulltextResource = $fulltextResource; $this->dimensionFactory = $dimensionFactory; - $this->iteratorFactory = $classTenFactory; + $this->iteratorFactory = $indexIteratorFactory; } /** @@ -243,24 +244,6 @@ protected function getTable($table) return $this->resource->getTableName($table); } - /** - * Regenerate search index for all stores - * - * @param int|array|null $productIds - * @return void - */ - protected function rebuildIndex($productIds = null) - { - $storeIds = array_keys($this->storeManager->getStores()); - foreach ($storeIds as $storeId) { - $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); - $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - $this->indexHandler->saveIndex([$dimension], $this->rebuildStoreIndex($storeId, $productIds)); - } - $this->fulltextResource->resetSearchResults(); - $this->searchRequestConfig->reset(); - } - /** * Get parents IDs of product IDs to be re-indexed * @@ -291,7 +274,6 @@ protected function getProductIdsFromParents(array $entityIds) */ public function rebuildStoreIndex($storeId, $productIds = null) { - $output = []; if ($productIds !== null) { $productIds = array_unique(array_merge($productIds, $this->getProductIdsFromParents($productIds))); } @@ -314,57 +296,16 @@ public function rebuildStoreIndex($storeId, $productIds = null) $statusIds = $this->catalogProductStatus->getVisibleStatusIds(); $allowedVisibility = $this->engine->getAllowedVisibility(); - return $this->getIndexIterator( - $storeId, - $productIds, - $staticFields, - $dynamicFields, - $visibility, - $allowedVisibility, - $status, - $statusIds - ); - } - - /** - * Retrieve searchable products per store - * - * @param int $storeId - * @param array $staticFields - * @param array|int $productIds - * @param int $lastProductId - * @param int $limit - * @return array - */ - protected function getSearchableProducts( - $storeId, - array $staticFields, - $productIds = null, - $lastProductId = 0, - $limit = 100 - ) { - $websiteId = $this->storeManager->getStore($storeId)->getWebsiteId(); - $select = $this->connection->select() - ->useStraightJoin(true) - ->from( - ['e' => $this->getTable('catalog_product_entity')], - array_merge(['entity_id', 'type_id'], $staticFields) - ) - ->join( - ['website' => $this->getTable('catalog_product_website')], - $this->connection->quoteInto('website.product_id = e.entity_id AND website.website_id = ?', $websiteId), - [] - ); - - if ($productIds !== null) { - $select->where('e.entity_id IN (?)', $productIds); - } - - $select->where('e.entity_id > ?', $lastProductId)->limit($limit)->order('e.entity_id'); - - $result = $this->connection->fetchAll($select); - - return $result; + return $this->iteratorFactory->create([ + 'storeId' => $storeId, + 'productIds' => $productIds, + 'staticFields' => $staticFields, + 'dynamicFields' => $dynamicFields, + 'visibility' => $visibility, + 'allowedVisibility' => $allowedVisibility, + 'status' => $status, + 'statusIds' => $statusIds + ]); } /** @@ -379,19 +320,6 @@ protected function cleanIndex($storeId) $this->indexHandler->cleanIndex([$dimension]); } - /** - * Delete search index data for store - * - * @param int $storeId Store View Id - * @param array $productIds Product Entity Id - * @return void - */ - protected function deleteIndex($storeId = null, $productIds = null) - { - $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); - $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); - } - /** * Retrieve EAV Config Singleton * @@ -488,58 +416,6 @@ protected function unifyField($field, $backendType = 'varchar') return $expr; } - /** - * Load product(s) attributes - * - * @param int $storeId - * @param array $productIds - * @param array $attributeTypes - * @return array - */ - protected function getProductAttributes($storeId, array $productIds, array $attributeTypes) - { - $result = []; - $selects = []; - $ifStoreValue = $this->connection->getCheckSql('t_store.value_id > 0', 't_store.value', 't_default.value'); - foreach ($attributeTypes as $backendType => $attributeIds) { - if ($attributeIds) { - $tableName = $this->getTable('catalog_product_entity_' . $backendType); - $selects[] = $this->connection->select()->from( - ['t_default' => $tableName], - ['entity_id', 'attribute_id'] - )->joinLeft( - ['t_store' => $tableName], - $this->connection->quoteInto( - 't_default.entity_id=t_store.entity_id' . - ' AND t_default.attribute_id=t_store.attribute_id' . - ' AND t_store.store_id = ?', - $storeId - ), - ['value' => $this->unifyField($ifStoreValue, $backendType)] - )->where( - 't_default.store_id = ?', - 0 - )->where( - 't_default.attribute_id IN (?)', - $attributeIds - )->where( - 't_default.entity_id IN (?)', - $productIds - ); - } - } - - if ($selects) { - $select = $this->connection->select()->union($selects, \Magento\Framework\DB\Select::SQL_UNION_ALL); - $query = $this->connection->query($select); - while ($row = $query->fetch()) { - $result[$row['entity_id']][$row['attribute_id']] = $row['value']; - } - } - - return $result; - } - /** * Retrieve Product Type Instance * @@ -556,37 +432,6 @@ protected function getProductTypeInstance($typeId) return $this->productTypes[$typeId]; } - /** - * Return all product children ids - * - * @param int $productId Product Entity Id - * @param string $typeId Super Product Link Type - * @return array|null - */ - protected function getProductChildIds($productId, $typeId) - { - $typeInstance = $this->getProductTypeInstance($typeId); - $relation = $typeInstance->isComposite( - $this->getProductEmulator($typeId) - ) ? $typeInstance->getRelationInfo() : false; - - if ($relation && $relation->getTable() && $relation->getParentFieldName() && $relation->getChildFieldName()) { - $select = $this->connection->select()->from( - ['main' => $this->getTable($relation->getTable())], - [$relation->getChildFieldName()] - )->where( - $relation->getParentFieldName() . ' = ?', - $productId - ); - if ($relation->getWhere() !== null) { - $select->where($relation->getWhere()); - } - return $this->connection->fetchCol($select); - } - - return null; - } - /** * Retrieve Product Emulator (Magento Object) * @@ -602,183 +447,4 @@ protected function getProductEmulator($typeId) } return $this->productEmulators[$typeId]; } - - /** - * Prepare Fulltext index value for product - * - * @param array $indexData - * @param array $productData - * @param int $storeId - * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - */ - protected function prepareProductIndex($indexData, $productData, $storeId) - { - $index = []; - - foreach ($this->getSearchableAttributes('static') as $attribute) { - $attributeCode = $attribute->getAttributeCode(); - - if (isset($productData[$attributeCode])) { - - if ('store_id' === $attributeCode) { - continue; - } - - $value = $this->getAttributeValue($attribute->getId(), $productData[$attributeCode], $storeId); - if ($value) { - if (isset($index[$attribute->getId()])) { - if (!is_array($index[$attribute->getId()])) { - $index[$attribute->getId()] = [$index[$attribute->getId()]]; - } - $index[$attribute->getId()][] = $value; - } else { - $index[$attribute->getId()] = $value; - } - } - } - } - - foreach ($indexData as $entityId => $attributeData) { - foreach ($attributeData as $attributeId => $attributeValue) { - $value = $this->getAttributeValue($attributeId, $attributeValue, $storeId); - if (!empty($value)) { - if (isset($index[$attributeId])) { - $index[$attributeId][$entityId] = $value; - } else { - $index[$attributeId] = [$entityId => $value]; - } - } - } - } - - $product = $this->getProductEmulator( - $productData['type_id'] - )->setId( - $productData['entity_id'] - )->setStoreId( - $storeId - ); - $typeInstance = $this->getProductTypeInstance($productData['type_id']); - $data = $typeInstance->getSearchableData($product); - if ($data) { - $index['options'] = $data; - } - - return $this->engine->prepareEntityIndex($index, $this->separator); - } - - /** - * Retrieve attribute source value for search - * - * @param int $attributeId - * @param mixed $valueId - * @param int $storeId - * @return mixed - */ - protected function getAttributeValue($attributeId, $valueId, $storeId) - { - $attribute = $this->getSearchableAttribute($attributeId); - $value = $this->engine->processAttributeValue($attribute, $valueId); - - if (false !== $value - && $attribute->getIsSearchable() - && $attribute->usesSource() - && $this->engine->allowAdvancedIndex() - ) { - $attribute->setStoreId($storeId); - - $valueText = (array) $attribute->getSource()->getIndexOptionText($valueId); - - $pieces = array_filter(array_merge([$value], $valueText)); - - $value = implode($this->separator, $pieces); - } - - $value = preg_replace('/\\s+/siu', ' ', trim(strip_tags($value))); - - return $value; - } - - /** - * Retrieve Date value for store - * - * @param int $storeId - * @param string $date - * @return string|null - */ - protected function getStoreDate($storeId, $date = null) - { - if (!isset($this->dates[$storeId])) { - $timezone = $this->scopeConfig->getValue( - $this->localeDate->getDefaultTimezonePath(), - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - $storeId - ); - - $this->localeResolver->emulate($storeId); - - $dateObj = new \DateTime(); - $dateObj->setTimezone(new \DateTimeZone($timezone)); - $this->dates[$storeId] = $dateObj; - - $this->localeResolver->revert(); - } - - if (!$this->dateTime->isEmptyDate($date)) { - /** @var \DateTime $dateObj */ - $dateObj = $this->dates[$storeId]; - return $this->localeDate->formatDateTime($dateObj, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE); - } - - return null; - } - - /** - * Get iterator - * - * @param array $data - * @return \Generator - */ - protected function getIterator(array $data) - { - foreach ($data as $key => $value) { - yield $key => $value; - } - } - - /** - * @param $storeId - * @param $productIds - * @param $staticFields - * @param $dynamicFields - * @param $visibility - * @param $allowedVisibility - * @param $status - * @param $statusIds - * @param $output - * @return \Iterator - */ - protected function getIndexIterator( - $storeId, - $productIds, - $staticFields, - $dynamicFields, - $visibility, - $allowedVisibility, - $status, - $statusIds - ) { - return $this->iteratorFactory->create([ - 'storeId' => $storeId, - 'productIds' => $productIds, - 'staticFields' => $staticFields, - 'dynamicFields' => $dynamicFields, - 'visibility' => $visibility, - 'allowedVisibility' => $allowedVisibility, - 'status' => $status, - 'statusIds' => $statusIds - ]); - } } diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php index 3bedb665a9b5f..a306e9070952b 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php @@ -6,51 +6,112 @@ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; - class IndexIterator implements \Iterator { - /** - * @var \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\ClassTen + * @var \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider */ private $dataProvider; - - /** Arguments */ + /** + * @var int + */ private $storeId; + + /** + * @var array + */ private $staticFields; + + /** + * @var array + */ private $productIds; + + /** + * @var array + */ private $dynamicFields; + + /** + * @var \Magento\Eav\Model\Entity\Attribute + */ private $visibility; + + /** + * @var array + */ private $allowedVisibility; + + /** + * @var \Magento\Eav\Model\Entity\Attribute + */ private $status; - private $statusIds; + /** + * @var array + */ + private $statusIds; - /** Internal vars */ + /** + * @var int + */ private $lastProductId = 0; + + /** + * @var array + */ private $products = []; + + /** + * @var null + */ private $current = null; + + /** + * @var bool + */ private $isValid = true; + + /** + * @var null + */ private $key = null; + + /** + * @var array + */ private $productAttributes = []; + + /** + * @var array + */ private $productRelations = []; /** * Initialize dependencies. * - * @param ClassTen $dataProvider - * @param $storeId - * @param $staticFields - * @param $productIds - * @param $dynamicFields - * @param $visibility - * @param $allowedVisibility - * @param $status - * @param $statusIds - */ - public function __construct(ClassTen $dataProvider, $storeId, $staticFields, $productIds, $dynamicFields, $visibility, $allowedVisibility, $status, $statusIds) - { + * @param DataProvider $dataProvider + * @param int $storeId + * @param array $staticFields + * @param array $productIds + * @param array $dynamicFields + * @param \Magento\Eav\Model\Entity\Attribute $visibility + * @param array $allowedVisibility + * @param \Magento\Eav\Model\Entity\Attribute $status + * @param array $statusIds + */ + public function __construct( + DataProvider $dataProvider, + $storeId, + array $staticFields, + array $productIds, + array $dynamicFields, + \Magento\Eav\Model\Entity\Attribute $visibility, + array $allowedVisibility, + \Magento\Eav\Model\Entity\Attribute $status, + array $statusIds + ) { $this->dataProvider = $dataProvider; $this->storeId = $storeId; $this->staticFields = $staticFields; @@ -64,7 +125,7 @@ public function __construct(ClassTen $dataProvider, $storeId, $staticFields, $pr /** - * @inheritDoc + * {@inheritDoc} */ public function current() { @@ -72,13 +133,13 @@ public function current() } /** - * @inheritDoc + * {@inheritDoc} */ public function next() { \next($this->products); if (\key($this->products) === null) { - //check if storage has more items to process + // check if storage has more items to process $this->products = $this->dataProvider->getSearchableProducts( $this->storeId, $this->staticFields, @@ -86,18 +147,20 @@ public function next() $this->lastProductId ); - if(!count($this->products)) { + if (!count($this->products)) { $this->isValid = false; return; } - $productAttributes = []; $this->productRelations = []; foreach ($this->products as $productData) { $this->lastProductId = $productData['entity_id']; $productAttributes[$productData['entity_id']] = $productData['entity_id']; - $productChildren = $this->dataProvider->getProductChildIds($productData['entity_id'], $productData['type_id']); + $productChildren = $this->dataProvider->getProductChildIds( + $productData['entity_id'], + $productData['type_id'] + ); $this->productRelations[$productData['entity_id']] = $productChildren; if ($productChildren) { foreach ($productChildren as $productChildId) { @@ -106,7 +169,11 @@ public function next() } } - $this->productAttributes = $this->dataProvider->getProductAttributes($this->storeId, $productAttributes, $this->dynamicFields); + $this->productAttributes = $this->dataProvider->getProductAttributes( + $this->storeId, + $productAttributes, + $this->dynamicFields + ); } $productData = \current($this->products); @@ -157,7 +224,7 @@ public function next() } /** - * @inheritDoc + * {@inheritDoc} */ public function key() { @@ -165,7 +232,7 @@ public function key() } /** - * @inheritDoc + * {@inheritDoc} */ public function valid() { @@ -173,7 +240,7 @@ public function valid() } /** - * @inheritDoc + * {@inheritDoc} */ public function rewind() { diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php index d58cb71d65cef..705c7fdf1baf6 100644 --- a/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php +++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/Batch.php @@ -22,7 +22,7 @@ public function getItems(\Traversable $documents, $size) $batch = $items = []; foreach ($documents as $documentName => $documentValue) { $batch[$documentName] = $documentValue; - if ($i++ >= $size) { + if (++$i >= $size) { $items[] = $batch; $i = 0; $batch = []; diff --git a/lib/internal/Magento/Framework/Indexer/Test/Unit/BatchTest.php b/lib/internal/Magento/Framework/Indexer/Test/Unit/BatchTest.php new file mode 100644 index 0000000000000..e2d681016e2bc --- /dev/null +++ b/lib/internal/Magento/Framework/Indexer/Test/Unit/BatchTest.php @@ -0,0 +1,80 @@ +object = new \Magento\Framework\Indexer\SaveHandler\Batch(); + } + + /** + * @param array $itemsData + * @param int $size + * @param array $expected + * + * @dataProvider getItemsDataProvider + */ + public function testGetItems(array $itemsData, $size, array $expected) + { + $items = new \ArrayObject($itemsData); + $this->assertSame($expected, $this->object->getItems($items, $size)); + } + + /** + * @return array + */ + public function getItemsDataProvider() + { + return [ + 'empty' => [ + [], + 2, + [], + ], + 'even, numeric keys' => [ + [1, 2, 3, 4], + 2, + [ + [0 => 1, 1 => 2], + [2 => 3, 3 => 4], + ], + ], + 'odd, numeric keys' => [ + [1, 2, 3, 4, 5], + 2, + [ + [0 => 1, 1 => 2], + [2 => 3, 3 => 4], + [4 => 5], + ], + ], + 'even, string keys' => [ + ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4], + 2, + [ + ['a' => 1, 'b' => 2], + ['c' => 3, 'd' => 4], + ], + ], + 'odd, string keys' => [ + ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5], + 2, + [ + ['a' => 1, 'b' => 2], + ['c' => 3, 'd' => 4], + ['e' => 5], + ], + ], + ]; + } +} From b14aacef362f9b696bae097b8a5b00f8288c1404 Mon Sep 17 00:00:00 2001 From: Olga Kopylova Date: Thu, 14 Jan 2016 16:35:53 -0600 Subject: [PATCH 10/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST - fixed type of input parameters for iterator constructor --- .../Model/Indexer/Fulltext/Action/IndexIterator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php index a306e9070952b..8e86a885fabab 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php @@ -94,7 +94,7 @@ class IndexIterator implements \Iterator * @param DataProvider $dataProvider * @param int $storeId * @param array $staticFields - * @param array $productIds + * @param array|null $productIds * @param array $dynamicFields * @param \Magento\Eav\Model\Entity\Attribute $visibility * @param array $allowedVisibility @@ -105,7 +105,7 @@ public function __construct( DataProvider $dataProvider, $storeId, array $staticFields, - array $productIds, + $productIds, array $dynamicFields, \Magento\Eav\Model\Entity\Attribute $visibility, array $allowedVisibility, From 71c9634c6bc08472c24f81f1ca54a0fa38d30ce3 Mon Sep 17 00:00:00 2001 From: Olga Kopylova Date: Thu, 14 Jan 2016 19:03:09 -0600 Subject: [PATCH 11/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST - fixed iterator --- .../Model/Indexer/Fulltext/Action/IndexIterator.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php index 8e86a885fabab..071c331618679 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php @@ -168,6 +168,7 @@ public function next() } } } + \reset($this->products); $this->productAttributes = $this->dataProvider->getProductAttributes( $this->storeId, @@ -180,6 +181,7 @@ public function next() if (!isset($this->productAttributes[$productData['entity_id']])) { $this->next(); + return; } $productAttr = $this->productAttributes[$productData['entity_id']]; @@ -187,11 +189,13 @@ public function next() || !in_array($productAttr[$this->visibility->getId()], $this->allowedVisibility) ) { $this->next(); + return; } if (!isset($productAttr[$this->status->getId()]) || !in_array($productAttr[$this->status->getId()], $this->statusIds) ) { $this->next(); + return; } $productIndex = [$productData['entity_id'] => $productAttr]; @@ -200,8 +204,8 @@ public function next() $productChildren = $this->productRelations[$productData['entity_id']]; if ($productChildren) { foreach ($productChildren as $productChildId) { - if (isset($productAttributes[$productChildId])) { - $productChildAttr = $productAttributes[$productChildId]; + if (isset($this->productAttributes[$productChildId])) { + $productChildAttr = $this->productAttributes[$productChildId]; if (!isset($productChildAttr[$this->status->getId()]) || !in_array($productChildAttr[$this->status->getId()], $this->statusIds) ) { @@ -215,6 +219,7 @@ public function next() } if ($productChildren !== null && !$hasChildren) { $this->next(); + return; } $index = $this->dataProvider->prepareProductIndex($productIndex, $productData, $this->storeId); From f9ef0e3ac0e9552af414a770c48406e012222f4d Mon Sep 17 00:00:00 2001 From: Olga Kopylova Date: Thu, 14 Jan 2016 19:09:48 -0600 Subject: [PATCH 12/61] MAGETWO-47679: Remi PHP 7.0.1 failure on L1 segmentation fault on SOAP / REST - suppress type duplication --- .../Model/Indexer/Fulltext/Action/IndexIterator.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php index 071c331618679..9476ab14132d1 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/IndexIterator.php @@ -6,6 +6,11 @@ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; +/** + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ class IndexIterator implements \Iterator { /** @@ -100,6 +105,8 @@ class IndexIterator implements \Iterator * @param array $allowedVisibility * @param \Magento\Eav\Model\Entity\Attribute $status * @param array $statusIds + * + * @SuppressWarnings(Magento.TypeDuplication) */ public function __construct( DataProvider $dataProvider, @@ -256,4 +263,4 @@ public function rewind() $this->products = []; $this->next(); } -} \ No newline at end of file +} From 05c7acbde36963233220c53952891a53ec70ee8e Mon Sep 17 00:00:00 2001 From: Igor Melnikov Date: Fri, 18 Dec 2015 15:12:12 -0600 Subject: [PATCH 13/61] MAGETWO-45723: Plugins methods calls two times in case when Proxy exists for subject class Adding NoninterceptableInterface to allow skip interceptor generation --- .../Config/Structure/Element/Group/Proxy.php | 3 +- .../Model/Config/Structure/Search/Proxy.php | 4 +- .../SourceClassWithNamespaceProxy.php.sample | 2 +- .../Magento/Framework/App/AreaList/Proxy.php | 3 +- .../Magento/Framework/App/Cache/Proxy.php | 12 ++-- .../App/Route/ConfigInterface/Proxy.php | 4 +- .../DataObject/Copy/Config/Data/Proxy.php | 3 +- .../ObjectManager/Config/Developer.php | 26 +++++++- .../Framework/Mview/Config/Data/Proxy.php | 3 +- .../ObjectManager/Code/Generator/Proxy.php | 8 ++- .../ObjectManager/InterceptableValidator.php | 59 +++++++++++++++++++ .../NoninterceptableInterface.php | 13 ++++ .../Code/Generator/_files/SampleProxy.txt | 2 +- .../Test/Unit/InterceptableValidatorTest.php | 26 ++++++++ .../ObjectManager/Test/Unit/_files/Proxy.php | 10 ++++ .../Framework/Translate/Inline/Proxy.php | 4 +- .../Magento/Framework/View/Layout/Proxy.php | 2 +- .../Command/DiCompileMultiTenantCommand.php | 4 +- .../InterceptionConfigurationBuilder.php | 15 ++++- .../Scanner/InheritanceInterceptorScanner.php | 33 +++++------ .../InterceptionConfigurationBuilderTest.php | 20 ++++++- 21 files changed, 217 insertions(+), 39 deletions(-) create mode 100644 lib/internal/Magento/Framework/ObjectManager/InterceptableValidator.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/NoninterceptableInterface.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/InterceptableValidatorTest.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Proxy.php diff --git a/app/code/Magento/Config/Model/Config/Structure/Element/Group/Proxy.php b/app/code/Magento/Config/Model/Config/Structure/Element/Group/Proxy.php index 1b3aeca06effc..7365fade4caa3 100644 --- a/app/code/Magento/Config/Model/Config/Structure/Element/Group/Proxy.php +++ b/app/code/Magento/Config/Model/Config/Structure/Element/Group/Proxy.php @@ -5,7 +5,8 @@ */ namespace Magento\Config\Model\Config\Structure\Element\Group; -class Proxy extends \Magento\Config\Model\Config\Structure\Element\Group +class Proxy extends \Magento\Config\Model\Config\Structure\Element\Group implements + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object manager diff --git a/app/code/Magento/Config/Model/Config/Structure/Search/Proxy.php b/app/code/Magento/Config/Model/Config/Structure/Search/Proxy.php index eb01cd8615d20..9907fbec18576 100644 --- a/app/code/Magento/Config/Model/Config/Structure/Search/Proxy.php +++ b/app/code/Magento/Config/Model/Config/Structure/Search/Proxy.php @@ -5,7 +5,9 @@ */ namespace Magento\Config\Model\Config\Structure\Search; -class Proxy implements \Magento\Config\Model\Config\Structure\SearchInterface +class Proxy implements + \Magento\Config\Model\Config\Structure\SearchInterface, + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object manager diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php.sample b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php.sample index 5ee9c95448ef8..9074f2a8e0926 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php.sample +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php.sample @@ -7,7 +7,7 @@ namespace Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace; * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -class Proxy extends \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace +class Proxy extends \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace implements \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/App/AreaList/Proxy.php b/lib/internal/Magento/Framework/App/AreaList/Proxy.php index 7f2b0a63dbcd8..e7f39ff8aa3e3 100644 --- a/lib/internal/Magento/Framework/App/AreaList/Proxy.php +++ b/lib/internal/Magento/Framework/App/AreaList/Proxy.php @@ -7,7 +7,8 @@ */ namespace Magento\Framework\App\AreaList; -class Proxy extends \Magento\Framework\App\AreaList +class Proxy extends \Magento\Framework\App\AreaList implements + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/App/Cache/Proxy.php b/lib/internal/Magento/Framework/App/Cache/Proxy.php index 932d5b0c265c8..2e50e0b5d042f 100644 --- a/lib/internal/Magento/Framework/App/Cache/Proxy.php +++ b/lib/internal/Magento/Framework/App/Cache/Proxy.php @@ -3,15 +3,17 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ +namespace Magento\Framework\App\Cache; + +use \Magento\Framework\App\CacheInterface; +use \Magento\Framework\ObjectManager\NoninterceptableInterface; /** * System cache proxy model */ -namespace Magento\Framework\App\Cache; - -use Magento\Framework\App\CacheInterface; - -class Proxy implements CacheInterface +class Proxy implements + CacheInterface, + NoninterceptableInterface { /** * @var \Magento\Framework\ObjectManagerInterface diff --git a/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php b/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php index 50a02c458595a..50056798c85ea 100644 --- a/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php +++ b/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php @@ -10,7 +10,9 @@ /** * Proxy class for \Magento\Framework\App\ResourceConnection */ -class Proxy implements \Magento\Framework\App\Route\ConfigInterface +class Proxy implements + \Magento\Framework\App\Route\ConfigInterface, + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/DataObject/Copy/Config/Data/Proxy.php b/lib/internal/Magento/Framework/DataObject/Copy/Config/Data/Proxy.php index 85abc882c7bb4..480af7b06ac86 100644 --- a/lib/internal/Magento/Framework/DataObject/Copy/Config/Data/Proxy.php +++ b/lib/internal/Magento/Framework/DataObject/Copy/Config/Data/Proxy.php @@ -8,7 +8,8 @@ /** * Proxy class for @see \Magento\Framework\DataObject\Copy\Config\Data */ -class Proxy extends \Magento\Framework\DataObject\Copy\Config\Data +class Proxy extends \Magento\Framework\DataObject\Copy\Config\Data implements + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Developer.php b/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Developer.php index ebe41d0f5b46c..28c68a771cefe 100644 --- a/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Developer.php +++ b/lib/internal/Magento/Framework/Interception/ObjectManager/Config/Developer.php @@ -8,9 +8,31 @@ namespace Magento\Framework\Interception\ObjectManager\Config; use Magento\Framework\Interception\ObjectManager\ConfigInterface; +use Magento\Framework\ObjectManager\DefinitionInterface; +use Magento\Framework\ObjectManager\RelationsInterface; +use Magento\Framework\ObjectManager\InterceptableValidator; class Developer extends \Magento\Framework\ObjectManager\Config\Config implements ConfigInterface { + /** + * @var InterceptableValidator + */ + private $interceptableValidator; + + /** + * @param RelationsInterface $relations + * @param DefinitionInterface $definitions + * @param InterceptableValidator $interceptableValidator + */ + public function __construct( + RelationsInterface $relations = null, + DefinitionInterface $definitions = null, + InterceptableValidator $interceptableValidator = null + ) { + $this->interceptableValidator = $interceptableValidator ?: new InterceptableValidator(); + parent::__construct($relations, $definitions); + } + /** * @var \Magento\Framework\Interception\ConfigInterface */ @@ -36,7 +58,9 @@ public function setInterceptionConfig(\Magento\Framework\Interception\ConfigInte public function getInstanceType($instanceName) { $type = parent::getInstanceType($instanceName); - if ($this->interceptionConfig && $this->interceptionConfig->hasPlugins($instanceName)) { + if ($this->interceptionConfig && $this->interceptionConfig->hasPlugins($instanceName) + && $this->interceptableValidator->validate($instanceName) + ) { return $type . '\\Interceptor'; } return $type; diff --git a/lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php b/lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php index 0a705796ad559..a026f2a60c82e 100644 --- a/lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php +++ b/lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php @@ -8,7 +8,8 @@ /** * Proxy class for \Magento\Framework\Mview\Config\Data */ -class Proxy extends \Magento\Framework\Mview\Config\Data +class Proxy extends \Magento\Framework\Mview\Config\Data implements + \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php index 82686165132f8..c0f86fa70b2be 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php @@ -14,6 +14,11 @@ class Proxy extends \Magento\Framework\Code\Generator\EntityAbstract */ const ENTITY_TYPE = 'proxy'; + /** + * Marker interface + */ + const NON_INTERCEPTABLE_INTERFACE = '\Magento\Framework\ObjectManager\NoninterceptableInterface'; + /** * @param string $modelClassName * @return string @@ -131,9 +136,10 @@ protected function _generateCode() $reflection = new \ReflectionClass($typeName); if ($reflection->isInterface()) { - $this->_classGenerator->setImplementedInterfaces([$typeName]); + $this->_classGenerator->setImplementedInterfaces([$typeName, self::NON_INTERCEPTABLE_INTERFACE]); } else { $this->_classGenerator->setExtendedClass($typeName); + $this->_classGenerator->setImplementedInterfaces([self::NON_INTERCEPTABLE_INTERFACE]); } return parent::_generateCode(); } diff --git a/lib/internal/Magento/Framework/ObjectManager/InterceptableValidator.php b/lib/internal/Magento/Framework/ObjectManager/InterceptableValidator.php new file mode 100644 index 0000000000000..bc3c17e11d765 --- /dev/null +++ b/lib/internal/Magento/Framework/ObjectManager/InterceptableValidator.php @@ -0,0 +1,59 @@ +isInterceptor($className) && $this->isInterceptable($className); + } + + /** + * + * Check if instance type is interceptor + * + * @param string $instanceName + * @return bool + */ + private function isInterceptor($instanceName) + { + return $this->endsWith($instanceName, '\Interceptor'); + } + + /** + * + * Check if instance type is interceptable + * + * @param string $instanceName + * @return bool + */ + private function isInterceptable($instanceName) + { + return !is_subclass_of( + $instanceName, + \Magento\Framework\ObjectManager\Code\Generator\Proxy::NON_INTERCEPTABLE_INTERFACE + ); + } + + /** + * Check if a string ends with a substring + * + * @param string $haystack + * @param string $needle + * @return bool + */ + private function endsWith($haystack, $needle) + { + // Search forward starting from end minus needle length characters + $temp = strlen($haystack) - strlen($needle); + return $needle === '' || ($temp >= 0 && strpos($haystack, $needle, $temp) !== false); + } +} diff --git a/lib/internal/Magento/Framework/ObjectManager/NoninterceptableInterface.php b/lib/internal/Magento/Framework/ObjectManager/NoninterceptableInterface.php new file mode 100644 index 0000000000000..0950e27c233ce --- /dev/null +++ b/lib/internal/Magento/Framework/ObjectManager/NoninterceptableInterface.php @@ -0,0 +1,13 @@ +assertFalse( + $interceptableValidator->validate( + 'Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Interceptor' + ) + ); + $this->assertFalse( + $interceptableValidator->validate( + 'Magento\Test\Di\Proxy' + ) + ); + } +} diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Proxy.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Proxy.php new file mode 100644 index 0000000000000..864c00098e9e4 --- /dev/null +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Proxy.php @@ -0,0 +1,10 @@ +getList($path); } } - $inheritanceScanner = new Scanner\InheritanceInterceptorScanner(); + $inheritanceScanner = new Scanner\InheritanceInterceptorScanner( + new \Magento\Framework\ObjectManager\InterceptableValidator() + ); $this->entities['interceptors'] = $inheritanceScanner->collectEntities( get_declared_classes(), $this->entities['interceptors'] diff --git a/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php b/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php index 5935e77fa8e71..e929ca2e04a25 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php @@ -12,6 +12,7 @@ use Magento\Framework\App\Interception\Cache\CompiledConfig; use Magento\Framework\Interception\Config\Config as InterceptionConfig; use Magento\Setup\Module\Di\Code\Reader\Type; +use Magento\Framework\ObjectManager\InterceptableValidator; class InterceptionConfigurationBuilder { @@ -42,22 +43,30 @@ class InterceptionConfigurationBuilder */ private $cacheManager; + /** + * @var InterceptableValidator + */ + private $interceptableValidator; + /** * @param InterceptionConfig $interceptionConfig * @param PluginList $pluginList * @param Type $typeReader * @param Manager $cacheManager + * @param InterceptableValidator $interceptableValidator */ public function __construct( InterceptionConfig $interceptionConfig, PluginList $pluginList, Type $typeReader, - Manager $cacheManager + Manager $cacheManager, + InterceptableValidator $interceptableValidator ) { $this->interceptionConfig = $interceptionConfig; $this->pluginList = $pluginList; $this->typeReader = $typeReader; $this->cacheManager = $cacheManager; + $this->interceptableValidator = $interceptableValidator; } /** @@ -99,7 +108,9 @@ private function getInterceptedClasses($definedClasses) { $intercepted = []; foreach ($definedClasses as $definedClass) { - if ($this->interceptionConfig->hasPlugins($definedClass) && $this->typeReader->isConcrete($definedClass)) { + if ($this->interceptionConfig->hasPlugins($definedClass) && $this->typeReader->isConcrete($definedClass) + && $this->interceptableValidator->validate($definedClass) + ) { $intercepted[] = $definedClass; } } diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/InheritanceInterceptorScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/InheritanceInterceptorScanner.php index 39904e2e20802..733ee606fecf2 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/InheritanceInterceptorScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/InheritanceInterceptorScanner.php @@ -5,8 +5,23 @@ */ namespace Magento\Setup\Module\Di\Code\Scanner; +use Magento\Framework\ObjectManager\InterceptableValidator; + class InheritanceInterceptorScanner implements ScannerInterface { + /** + * @var InterceptableValidator + */ + private $interceptableValidator; + + /** + * @param InterceptableValidator $interceptableValidator + */ + public function __construct(InterceptableValidator $interceptableValidator) + { + $this->interceptableValidator = $interceptableValidator; + } + /** * Get intercepted class names * @@ -20,9 +35,7 @@ public function collectEntities(array $classes, array $interceptedEntities = []) foreach ($classes as $class) { foreach ($interceptedEntities as $interceptorClass) { $interceptedEntity = substr($interceptorClass, 0, -12); - if (is_subclass_of($class, $interceptedEntity) - && !$this->endsWith($class, 'RepositoryInterface\\Proxy') - && !$this->endsWith($class, '\\Interceptor')) { + if (is_subclass_of($class, $interceptedEntity) && $this->interceptableValidator->validate($class)) { $reflectionClass = new \ReflectionClass($class); if (!$reflectionClass->isAbstract() && !$reflectionClass->isFinal()) { $output[] = $class . '\\Interceptor'; @@ -53,18 +66,4 @@ private function filterOutAbstractClasses($interceptedEntities) } return $interceptedEntitiesFiltered; } - - /** - * Check if a string ends with a substring - * - * @param string $haystack - * @param string $needle - * @return bool - */ - private function endsWith($haystack, $needle) - { - // search forward starting from end minus needle length characters - return $needle === "" - || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false); - } } diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Generator/InterceptionConfigurationBuilderTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Generator/InterceptionConfigurationBuilderTest.php index 928afe76a0685..1c41ccd774018 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Generator/InterceptionConfigurationBuilderTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Generator/InterceptionConfigurationBuilderTest.php @@ -33,6 +33,11 @@ class InterceptionConfigurationBuilderTest extends \PHPUnit_Framework_TestCase */ private $cacheManager; + /** + * @var \Magento\Framework\ObjectManager\InterceptableValidator|\PHPUnit_Framework_MockObject_MockObject + */ + private $interceptableValidator; + protected function setUp() { $this->interceptionConfig = $this->getMock( @@ -56,13 +61,21 @@ protected function setUp() '', false ); + $this->interceptableValidator = $this->getMock( + 'Magento\Framework\ObjectManager\InterceptableValidator', + [], + [], + '', + false + ); $this->typeReader = $this->getMock('Magento\Setup\Module\Di\Code\Reader\Type', ['isConcrete'], [], '', false); $this->model = new \Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder( $this->interceptionConfig, $this->pluginList, $this->typeReader, - $this->cacheManager + $this->cacheManager, + $this->interceptableValidator ); } @@ -82,6 +95,11 @@ public function testGetInterceptionConfiguration($plugins) ['Class1', true], ['instance', true], ]); + $this->interceptableValidator->expects($this->any()) + ->method('validate') + ->with('Class1') + ->willReturn(true); + $this->cacheManager->expects($this->once()) ->method('setEnabled') ->with([CompiledConfig::TYPE_IDENTIFIER], true); From 1ccbe8352e7b52f20873c6c49ccf7b988e17308a Mon Sep 17 00:00:00 2001 From: Hayder Sharhan Date: Thu, 17 Dec 2015 16:03:36 -0600 Subject: [PATCH 14/61] MAGETWO-45728: Travis CI Builds Fail Due to Authentication to repo.magento.com - Took out all occurrences of repo.magento.com in composer.json test files. Conflicts: lib/internal/Magento/Framework/App/Test/Unit/_files/test.composer.json --- .../Composer/_files/testFromCreateProject/composer.json | 8 +------- .../Framework/Composer/_files/testSkeleton/composer.json | 6 ------ .../Magento/Setup/Model/_files/testSkeleton/composer.json | 6 ------ 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.json b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.json index 55c5e6591f085..53009187a595a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.json +++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.json @@ -39,11 +39,5 @@ } }, "minimum-stability": "alpha", - "prefer-stable": true, - "repositories": [ - { - "type": "composer", - "url": "https://repo.magento.com/" - } - ] + "prefer-stable": true } diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.json b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.json index a8f4e398d2609..2625b60abff4f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.json +++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.json @@ -4,12 +4,6 @@ "magento/product-community-edition": "0.74.0-beta2", "magento/sample-module-minimal" : "*" }, - "repositories": [ - { - "type": "composer", - "url": "https://repo.magento.com/" - } - ], "autoload": { "psr-4": { "Magento\\Framework\\": "htdocs/lib/internal/Magento/Framework/", diff --git a/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.json b/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.json index a8f4e398d2609..2625b60abff4f 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.json +++ b/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.json @@ -4,12 +4,6 @@ "magento/product-community-edition": "0.74.0-beta2", "magento/sample-module-minimal" : "*" }, - "repositories": [ - { - "type": "composer", - "url": "https://repo.magento.com/" - } - ], "autoload": { "psr-4": { "Magento\\Framework\\": "htdocs/lib/internal/Magento/Framework/", From 20d353d337cdcc8773bfec996c36f700e7d8fef2 Mon Sep 17 00:00:00 2001 From: Andrii Kasian Date: Fri, 27 Nov 2015 16:17:10 +0200 Subject: [PATCH 15/61] MAGETWO-45882: "Custom option" prices are not present in "Configurable product" order calculations --- .../Model/Product/Type/Configurable/Price.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Price.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Price.php index 4fd0c2c81acf7..2d272f27e25e6 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Price.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Price.php @@ -22,16 +22,16 @@ public function getFinalPrice($qty, $product) return $product->getCalculatedFinalPrice(); } if ($product->getCustomOption('simple_product') && $product->getCustomOption('simple_product')->getProduct()) { - return parent::getFinalPrice($qty, $product->getCustomOption('simple_product')->getProduct()); + $finalPrice = parent::getFinalPrice($qty, $product->getCustomOption('simple_product')->getProduct()); } else { $priceInfo = $product->getPriceInfo(); $finalPrice = $priceInfo->getPrice('final_price')->getAmount()->getValue(); - $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice); - $finalPrice = max(0, $finalPrice); - $product->setFinalPrice($finalPrice); - - return $finalPrice; } + $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice); + $finalPrice = max(0, $finalPrice); + $product->setFinalPrice($finalPrice); + + return $finalPrice; } /** From f5ec1f572d4c3dcf40400705423e8ac8eef6af21 Mon Sep 17 00:00:00 2001 From: Michail Slabko Date: Thu, 10 Dec 2015 14:19:44 +0200 Subject: [PATCH 16/61] MAGETWO-46663: Most of category fields dont have Use Default Value option in Store/StoreView scope --- .../Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php index 06a77c8af6023..f73dda6152d1f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -11,7 +11,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Category\Tab; -class Attributes extends \Magento\Backend\Block\Widget\Form\Generic +class Attributes extends \Magento\Catalog\Block\Adminhtml\Form { /** * Retrieve Category object From 91b73d5d45b78b28d2542ea7104be456f66cb180 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Thu, 10 Dec 2015 17:19:51 +0200 Subject: [PATCH 17/61] MAGETWO-46664: Composer Based EE failure on braintree package - Updated version of composer package --- app/code/Magento/Braintree/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json index 5b835db6ad5da..2778dc6dc6bd9 100644 --- a/app/code/Magento/Braintree/composer.json +++ b/app/code/Magento/Braintree/composer.json @@ -16,7 +16,7 @@ "magento/module-directory": "100.0.*", "magento/module-theme": "100.0.*", "magento/framework": "100.0.*", - "braintree/braintree_php": "2.39.0" + "braintree/braintree_php": "3.7.0" }, "suggest": { "magento/module-checkout-agreements": "100.0.*" From e88177a7947c59acfc2004ef1379cb282a8dace2 Mon Sep 17 00:00:00 2001 From: Robert He Date: Wed, 16 Dec 2015 15:19:02 -0600 Subject: [PATCH 18/61] MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675 -- fixed undefined tax index when on backend order page when tax_amount is 0 --- .../templates/order/create/totals/tax.phtml | 4 ++++ .../Magento/Tax/Model/Sales/Total/Quote/Tax.php | 16 +++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) mode change 100644 => 100755 app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml mode change 100644 => 100755 app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml old mode 100644 new mode 100755 index 3f156e6ceaa73..090800ded9969 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml @@ -6,7 +6,9 @@ // @codingStandardsIgnoreFile +$taxAmount = $block->getTotal()->getValue(); ?> +helper('Magento\Tax\Helper\Data')->displayZeroTax()) || ($taxAmount > 0)): ?> helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> @@ -50,3 +52,5 @@ formatPrice($block->getTotal()->getValue()) ?> + + diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php old mode 100644 new mode 100755 index 34562754e0893..3a742c4e4ecfa --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -311,15 +311,13 @@ public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Qu $area = 'taxes'; } - if ($amount != 0 || $this->_config->displayCartZeroTax($store)) { - $totals[] = [ - 'code' => $this->getCode(), - 'title' => __('Tax'), - 'full_info' => $applied ? $applied : [], - 'value' => $amount, - 'area' => $area, - ]; - } + $totals[] = [ + 'code' => $this->getCode(), + 'title' => __('Tax'), + 'full_info' => $applied ? $applied : [], + 'value' => $amount, + 'area' => $area, + ]; /** * Modify subtotal From 1ac556bbe961290ec031416440ee5bb75489e9ee Mon Sep 17 00:00:00 2001 From: Yu Tang Date: Mon, 11 Jan 2016 15:34:09 -0600 Subject: [PATCH 19/61] MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675 - Fixed the case when applied_taxes is in serialized form --- app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php index 3a742c4e4ecfa..19fbc9747f161 100755 --- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php @@ -299,6 +299,9 @@ public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Qu $totals = []; $store = $quote->getStore(); $applied = $total->getAppliedTaxes(); + if (is_string($applied)) { + $applied = unserialize($applied); + } $amount = $total->getTaxAmount(); if ($amount == null) { $this->enhanceTotalData($quote, $total); From b6974cb82e8d21662f871659751407b76267962f Mon Sep 17 00:00:00 2001 From: Yu Tang Date: Tue, 12 Jan 2016 11:25:58 -0600 Subject: [PATCH 20/61] MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675 - Fix another case where serialized form is expected --- .../Model/Quote/GrandTotalDetailsPlugin.php | 6 +- .../Quote/GrandTotalDetailsPluginTest.php | 211 ++++++++++++++++++ 2 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php diff --git a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php index 9f52085e7d839..7dca048111242 100644 --- a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php +++ b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php @@ -94,7 +94,11 @@ public function aroundProcess( $detailsId = 1; $finalData = []; - foreach (unserialize($taxes['full_info']) as $info) { + $fullInfo = $taxes['full_info']; + if (is_string($fullInfo)) { + $fullInfo = unserialize($fullInfo); + } + foreach ($fullInfo as $info) { if ((array_key_exists('hidden', $info) && $info['hidden']) || ($info['amount'] == 0 && $this->taxConfig->displayCartZeroTax()) ) { diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php new file mode 100644 index 0000000000000..2904ade5ccec9 --- /dev/null +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php @@ -0,0 +1,211 @@ +subjectMock = $this->getMockBuilder('\Magento\Quote\Model\Cart\TotalsConverter') + ->disableOriginalConstructor() + ->getMock(); + + $this->totalSegmentExtensionFactoryMock = $this->getMockBuilder( + '\Magento\Quote\Api\Data\TotalSegmentExtensionFactory' + )->disableOriginalConstructor() + ->getMock(); + + $this->detailsFactoryMock = $this->getMockBuilder('\Magento\Tax\Api\Data\GrandTotalDetailsInterfaceFactory') + ->disableOriginalConstructor() + ->getMock(); + + $this->ratesFactoryMock = $this->getMockBuilder('\Magento\Tax\Api\Data\GrandTotalRatesInterfaceFactory') + ->disableOriginalConstructor() + ->getMock(); + + $this->taxConfigMock = $this->getMockBuilder('\Magento\Tax\Model\Config') + ->disableOriginalConstructor() + ->getMock(); + + $this->objectManagerHelper = new ObjectManager($this); + $this->model = $this->objectManagerHelper->getObject( + '\Magento\Tax\Model\Quote\GrandTotalDetailsPlugin', + [ + 'totalSegmentExtensionFactory' => $this->totalSegmentExtensionFactoryMock, + 'ratesFactory' => $this->ratesFactoryMock, + 'detailsFactory' => $this->detailsFactoryMock, + 'taxConfig' => $this->taxConfigMock, + ] + ); + } + + protected function setupTaxTotal(array $data) + { + $taxTotalMock = $this->getMockBuilder('\Magento\Quote\Model\Quote\Address\Total') + ->disableOriginalConstructor() + ->getMock(); + + $taxTotalMock->expects($this->any()) + ->method('getData') + ->willReturn($data); + + return $taxTotalMock; + } + + protected function setupTaxRateFactoryMock(array $taxRate) + { + $taxRateMock = $this->getMockBuilder('\Magento\Tax\Api\Data\GrandTotalRatesInterface') + ->getMock(); + + $this->ratesFactoryMock->expects($this->once()) + ->method('create') + ->with([]) + ->willReturn($taxRateMock); + + $taxRateMock->expects($this->once()) + ->method('setPercent') + ->with($taxRate['percent']) + ->willReturnSelf(); + $taxRateMock->expects($this->once()) + ->method('setTitle') + ->with($taxRate['title']) + ->willReturnSelf(); + return $taxRateMock; + } + + protected function setupTaxDetails(array $taxDetails) + { + $taxDetailsMock = $this->getMockBuilder('\Magento\Tax\Api\Data\GrandTotalDetailsInterface') + ->getMock(); + + $this->detailsFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($taxDetailsMock); + + $taxDetailsMock->expects($this->once()) + ->method('setAmount') + ->with($taxDetails['amount']) + ->willReturnSelf(); + + $taxDetailsMock->expects($this->once()) + ->method('setRates') + ->with($taxDetails['rates']) + ->willReturnSelf(); + + $taxDetailsMock->expects($this->once()) + ->method('setGroupId') + ->with(1) + ->willReturnSelf(); + + return $taxDetailsMock; + } + + public function testAroundProcess() + { + $taxRate = [ + 'percent' => 8.25, + 'title' => 'TX', + ]; + $taxAmount = 10; + + + $taxRateMock = $this->setupTaxRateFactoryMock($taxRate); + + $taxDetailsMock = $this->setupTaxDetails( + [ + 'amount' => $taxAmount, + 'rates' => [$taxRateMock], + ] + ); + + $taxTotalData = [ + 'full_info' => [ + [ + 'amount' => $taxAmount, + 'rates' => [$taxRate], + ], + ], + ]; + $taxTotalMock = $this->setupTaxTotal($taxTotalData); + $addressTotals = [ + 'tax' => $taxTotalMock, + ]; + + $extensionAttributeMock = $this->getMockBuilder( + '\Magento\Quote\Api\Data\TotalSegmentExtensionInterface' + )->getMock(); + $extensionAttributeMock->expects($this->once()) + ->method('setTaxGrandtotalDetails') + ->with([$taxDetailsMock]) + ->willReturnSelf(); + + + $taxSegmentMock = $this->getMockBuilder('\Magento\Quote\Model\Cart\TotalSegment') + ->disableOriginalConstructor() + ->getMock(); + $taxSegmentMock->expects($this->once()) + ->method('getExtensionAttributes') + ->willReturn($extensionAttributeMock); + $taxSegmentMock->expects($this->once()) + ->method('setExtensionAttributes') + ->with($extensionAttributeMock) + ->willReturnSelf(); + + $totalSegments = [ + 'tax' => $taxSegmentMock, + ]; + + $this->closureMock = function () use ($totalSegments) { + return $totalSegments; + }; + + $result = $this->model->aroundProcess($this->subjectMock, $this->closureMock, $addressTotals); + $this->assertEquals($totalSegments, $result); + } +} From b5c834177ba0c97414a96534b483595fed698f6b Mon Sep 17 00:00:00 2001 From: Yu Tang Date: Tue, 12 Jan 2016 13:07:26 -0600 Subject: [PATCH 21/61] MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675 - Fix unit test failure --- .../Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php | 1 + .../Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php index 7dca048111242..14a0fc425ee9b 100644 --- a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php +++ b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php @@ -75,6 +75,7 @@ protected function getRatesData($rates) * @param \Magento\Quote\Model\Quote\Address\Total[] $addressTotals * @return \Magento\Quote\Api\Data\TotalSegmentInterface[] * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function aroundProcess( \Magento\Quote\Model\Cart\TotalsConverter $subject, diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php index 2904ade5ccec9..1870806dd4262 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php @@ -179,7 +179,12 @@ public function testAroundProcess() $extensionAttributeMock = $this->getMockBuilder( '\Magento\Quote\Api\Data\TotalSegmentExtensionInterface' - )->getMock(); + )->setMethods( + [ + 'setTaxGrandtotalDetails', + + ] + )->getMockForAbstractClass(); $extensionAttributeMock->expects($this->once()) ->method('setTaxGrandtotalDetails') ->with([$taxDetailsMock]) From bfe4148e3acd455cacdf82e5018f608e352676c1 Mon Sep 17 00:00:00 2001 From: Yaroslav Voronoy Date: Fri, 15 Jan 2016 15:30:48 +0200 Subject: [PATCH 22/61] MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e1eb16a0df2..944d64d550670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,14 @@ * Fixed a potential vulnerability on checkout page * Fixed an issue with upload empty file to custom option * Fixed an issue with performance on customer edit form + * Fixed an issue plugin incorrect calls when proxy exists + * Fixed an issue when travis CI builds fail due to authentication + * Fixed an issue when custom options calculated incorrect for configurable products + * Fixed an issue with changing category form on store view level + * Updated composer version in braintree package * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 + * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes 2.0.0 ============= From 25cf0c35f2cbd0d9d8a46f14037381b76d4160d0 Mon Sep 17 00:00:00 2001 From: Michail Slabko Date: Tue, 12 Jan 2016 17:09:07 +0200 Subject: [PATCH 23/61] MAGETWO-46826: Multistore: Import product with Replace behaviour causes an error "URL key for specified store already exists." --- .../Observer/AfterImportDataObserver.php | 45 +--- .../Observer/AfterImportDataObserverTest.php | 206 ------------------ 2 files changed, 1 insertion(+), 250 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php b/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php index c27de6088f416..5ebd059949881 100644 --- a/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php +++ b/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php @@ -66,9 +66,6 @@ class AfterImportDataObserver implements ObserverInterface /** @var \Magento\Catalog\Model\ProductFactory $catalogProductFactory */ protected $catalogProductFactory; - /** @var int */ - protected $urlKeyAttribute; - /** @var array */ protected $acceptableCategories; @@ -78,9 +75,6 @@ class AfterImportDataObserver implements ObserverInterface /** @var array */ protected $websitesToStoreIds; - /** @var array */ - protected $entityStoresToCheckOverridden = []; - /** @var array */ protected $storesCache = []; @@ -100,10 +94,8 @@ class AfterImportDataObserver implements ObserverInterface /** * @param \Magento\Catalog\Model\ProductFactory $catalogProductFactory - * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory $objectRegistryFactory * @param \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator $productUrlPathGenerator - * @param \Magento\Framework\App\ResourceConnection $resource * @param \Magento\CatalogUrlRewrite\Service\V1\StoreViewService $storeViewService * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param UrlPersistInterface $urlPersist @@ -114,10 +106,8 @@ class AfterImportDataObserver implements ObserverInterface */ public function __construct( \Magento\Catalog\Model\ProductFactory $catalogProductFactory, - \Magento\Eav\Model\Config $eavConfig, \Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory $objectRegistryFactory, \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator $productUrlPathGenerator, - \Magento\Framework\App\ResourceConnection $resource, \Magento\CatalogUrlRewrite\Service\V1\StoreViewService $storeViewService, \Magento\Store\Model\StoreManagerInterface $storeManager, UrlPersistInterface $urlPersist, @@ -131,16 +121,6 @@ public function __construct( $this->storeViewService = $storeViewService; $this->storeManager = $storeManager; $this->urlRewriteFactory = $urlRewriteFactory; - $attribute = $eavConfig->getAttribute(Product::ENTITY, self::URL_KEY_ATTRIBUTE_CODE); - if (!$attribute) { - throw new \InvalidArgumentException(sprintf( - 'Cannot retrieve attribute for entity type "%s"', - Product::ENTITY - )); - } - $this->connection = $resource->getConnection(); - $this->urlKeyAttributeId = $attribute->getId(); - $this->urlKeyAttributeBackendTable = $attribute->getBackendTable(); $this->urlFinder = $urlFinder; } @@ -177,7 +157,7 @@ public function execute(Observer $observer) protected function _populateForUrlGeneration($rowData) { $newSku = $this->import->getNewSku($rowData[ImportProduct::COL_SKU]); - if (empty($newSku) || !isset($newSku['entity_id'])) { + if (empty($newSku) || !isset($newSku['entity_id']) || empty($rowData[self::URL_KEY_ATTRIBUTE_CODE])) { return null; } $rowData['entity_id'] = $newSku['entity_id']; @@ -254,8 +234,6 @@ protected function populateGlobalProduct($product) $this->storesCache[$storeId] = true; if (!$this->isGlobalScope($storeId)) { $this->addProductToImport($product, $storeId); - $this->entityStoresToCheckOverridden[] = $this->connection->quoteInto('(store_id = ?', $storeId) - . $this->connection->quoteInto(' AND entity_id = ?)', $product->getId()); } } } @@ -269,8 +247,6 @@ protected function populateGlobalProduct($product) */ protected function generateUrls() { - $this->cleanOverriddenUrlKey(); - /** * @var $urls \Magento\UrlRewrite\Service\V1\Data\UrlRewrite[] */ @@ -291,25 +267,6 @@ protected function generateUrls() return $result; } - /** - * @return $this - */ - protected function cleanOverriddenUrlKey() - { - if (empty($this->entityStoresToCheckOverridden)) { - return $this; - } - $select = $this->connection->select() - ->from($this->urlKeyAttributeBackendTable, ['store_id', 'entity_id']) - ->where('attribute_id = ?', $this->urlKeyAttributeId) - ->where(implode(' OR ', $this->entityStoresToCheckOverridden)); - $entityStoresToClean = $this->connection->fetchAll($select); - foreach ($entityStoresToClean as $entityStore) { - unset($this->products[$entityStore['entity_id']][$entityStore['store_id']]); - } - return $this; - } - /** * Check is global scope * diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php index fc6636a16bd3f..1a38a0683cb45 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php @@ -70,11 +70,6 @@ class AfterImportDataObserverTest extends \PHPUnit_Framework_TestCase */ protected $storeManager; - /** - * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $connection; - /** * @var \Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory|\PHPUnit_Framework_MockObject_MockObject */ @@ -90,21 +85,6 @@ class AfterImportDataObserverTest extends \PHPUnit_Framework_TestCase */ protected $storeViewService; - /** - * @var \Magento\Eav\Model\Config|\PHPUnit_Framework_MockObject_MockObject - */ - protected $eavConfig; - - /** - * @var \Magento\Framework\App\ResourceConnection|\PHPUnit_Framework_MockObject_MockObject - */ - protected $resource; - - /** - * @var \Magento\Framework\DB\Select|\PHPUnit_Framework_MockObject_MockObject - */ - protected $select; - /** * @var \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory|\PHPUnit_Framework_MockObject_MockObject */ @@ -214,66 +194,6 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->eavConfig = $this->getMock( - '\Magento\Eav\Model\Config', - [ - 'getAttribute', - ], - [], - '', - false - ); - $attribute = $this->getMockBuilder('\Magento\Eav\Model\Entity\Attribute\AbstractAttribute') - ->setMethods([ - 'getBackendTable', - ]) - ->disableOriginalConstructor() - ->getMockForAbstractClass(); - $beTable = 'backend table'; - $attribute->expects($this->any()) - ->method('getBackendTable') - ->willReturn($beTable); - $this->eavConfig->expects($this->any()) - ->method('getAttribute') - ->with( - \Magento\Catalog\Model\Product::ENTITY, - \Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver::URL_KEY_ATTRIBUTE_CODE - ) - ->willReturn($attribute); - - $this->resource = $this->getMock( - '\Magento\Framework\App\ResourceConnection', - [], - [], - '', - false - ); - $this->connection = $this->getMockBuilder('\Magento\Framework\DB\Adapter\AdapterInterface') - ->disableOriginalConstructor() - ->setMethods([ - 'quoteInto', - 'select', - 'fetchAll', - ]) - ->getMockForAbstractClass(); - $this->resource - ->expects($this->any()) - ->method('getConnection') - ->willReturn($this->connection); - $this->select = $this->getMock( - '\Magento\Framework\DB\Select', - [ - 'from', - 'where', - ], - [], - '', - false - ); - $this->connection - ->expects($this->any()) - ->method('select') - ->willReturn($this->select); $this->objectRegistryFactory = $this->getMock( '\Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory', [], @@ -364,10 +284,8 @@ public function setUp() '\Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver', [ 'catalogProductFactory' => $this->catalogProductFactory, - 'eavConfig' => $this->eavConfig, 'objectRegistryFactory' => $this->objectRegistryFactory, 'productUrlPathGenerator' => $this->productUrlPathGenerator, - 'resource' => $this->resource, 'storeViewService' => $this->storeViewService, 'storeManager'=> $this->storeManager, 'urlPersist' => $this->urlPersist, @@ -471,7 +389,6 @@ public function testAfterImportData() $newSku[0]['entity_id'], $newSku[0]['entity_id'], $newSku[0]['entity_id'], - $newSku[0]['entity_id'], $newSku[1]['entity_id'], $newSku[1]['entity_id'], $newSku[1]['entity_id'] @@ -501,33 +418,6 @@ public function testAfterImportData() ->expects($this->exactly($productsCount)) ->method('create') ->willReturn($product); - $this->connection - ->expects($this->exactly(4)) - ->method('quoteInto') - ->withConsecutive( - [ - '(store_id = ?', - $storeIds[0], - ], - [ - ' AND entity_id = ?)', - $newSku[0]['entity_id'], - ], - [ - '(store_id = ?', - $storeIds[0], - ], - [ - ' AND entity_id = ?)', - $newSku[1]['entity_id'], - ] - ); - $this->connection - ->expects($this->once()) - ->method('fetchAll') - ->willReturn([]); - $this->select->expects($this->any())->method('from')->willReturnSelf(); - $this->select->expects($this->any())->method('where')->willReturnSelf(); $this->urlFinder->expects($this->any())->method('findAllByData')->willReturn([]); @@ -562,78 +452,6 @@ public function testAfterImportData() $this->import->execute($this->observer); } - /** - * Cover cleanOverriddenUrlKey(). - */ - public function testCleanOverriddenUrlKey() - { - $urlKeyAttributeBackendTable = 'table value'; - $urlKeyAttributeId = 'id value'; - $entityStoresToCheckOverridden = [1,2,3]; - $this->import->urlKeyAttributeBackendTable = $urlKeyAttributeBackendTable; - $this->import->urlKeyAttributeId = $urlKeyAttributeId; - $this->setPropertyValue($this->import, 'entityStoresToCheckOverridden', $entityStoresToCheckOverridden); - $this->select - ->expects($this->once()) - ->method('from') - ->with( - $urlKeyAttributeBackendTable, - ['store_id', 'entity_id'] - ) - ->will($this->returnSelf()); - $this->select - ->expects($this->exactly(2)) - ->method('where') - ->withConsecutive( - [ - 'attribute_id = ?', - $urlKeyAttributeId, - ], - [ - implode(' OR ', $entityStoresToCheckOverridden) - ] - ) - ->will($this->returnSelf()); - - $entityIdVal = 'entity id value'; - $storeIdVal = 'store id value'; - $entityStore = [ - 'entity_id' => $entityIdVal, - 'store_id' => $storeIdVal, - ]; - $entityStoresToClean = [$entityStore]; - $products = [ - $entityIdVal => [ - $storeIdVal => 'value', - ] - ]; - $this->setPropertyValue($this->import, 'products', $products); - $this->connection - ->expects($this->once()) - ->method('fetchAll') - ->willReturn($entityStoresToClean); - - $actualResult = $this->invokeMethod($this->import, 'cleanOverriddenUrlKey'); - $this->assertEquals($this->import, $actualResult); - } - - /** - * Cover cleanOverriddenUrlKey() method with empty entityStoresToCheckOverridden property. - */ - public function testCleanOverriddenUrlKeyEmptyEntityStoresToCheckOverridden() - { - $this->setPropertyValue($this->import, 'entityStoresToCheckOverridden', null); - $this->select - ->expects($this->never()) - ->method('from'); - $this->select - ->expects($this->never()) - ->method('where'); - - $actualResult = $this->invokeMethod($this->import, 'cleanOverriddenUrlKey'); - $this->assertEquals($this->import, $actualResult); - } - /** * Cover canonicalUrlRewriteGenerate(). */ @@ -848,30 +666,6 @@ protected function invokeMethod($object, $methodName, array $parameters = []) return $method->invokeArgs($object, $parameters); } - /** - * Get mock of Import class instance with defined methods and called constructor. - */ - protected function getImportMock($methods = []) - { - return $this->getMock( - '\Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver', - $methods, - [ - $this->catalogProductFactory, - $this->eavConfig, - $this->objectRegistryFactory, - $this->productUrlPathGenerator, - $this->resource, - $this->storeViewService, - $this->storeManager, - $this->urlPersist, - $this->urlRewriteFactory, - $this->urlFinder, - ], - '' - ); - } - /** * @param mixed $storeId * @param mixed $productId From d95ffa1492aad55660dda3b8c47841b6bc72bcc8 Mon Sep 17 00:00:00 2001 From: Michail Slabko Date: Thu, 14 Jan 2016 20:50:15 +0200 Subject: [PATCH 24/61] MAGETWO-46826: Multistore: Import product with Replace behaviour causes an error "URL key for specified store already exists." --- .../CatalogUrlRewrite/Observer/AfterImportDataObserver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php b/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php index 5ebd059949881..bcabe87fc0dfd 100644 --- a/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php +++ b/app/code/Magento/CatalogUrlRewrite/Observer/AfterImportDataObserver.php @@ -157,7 +157,11 @@ public function execute(Observer $observer) protected function _populateForUrlGeneration($rowData) { $newSku = $this->import->getNewSku($rowData[ImportProduct::COL_SKU]); - if (empty($newSku) || !isset($newSku['entity_id']) || empty($rowData[self::URL_KEY_ATTRIBUTE_CODE])) { + if (empty($newSku) || !isset($newSku['entity_id'])) { + return null; + } + if ($this->import->getRowScope($rowData) == ImportProduct::SCOPE_STORE + && empty($rowData[self::URL_KEY_ATTRIBUTE_CODE])) { return null; } $rowData['entity_id'] = $newSku['entity_id']; From 49fe15fda0941acb878246395fe144f1cd8a6708 Mon Sep 17 00:00:00 2001 From: Roman Ganin Date: Fri, 15 Jan 2016 18:55:42 +0200 Subject: [PATCH 25/61] MAGETWO-47285: Admin Panel, Categories: Reset of product assignments occurs after filter is applied --- .../Ui/view/base/web/js/grid/columns/onoff.js | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/columns/onoff.js b/app/code/Magento/Ui/view/base/web/js/grid/columns/onoff.js index 3d82b6667645e..4b553467517ba 100755 --- a/app/code/Magento/Ui/view/base/web/js/grid/columns/onoff.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/columns/onoff.js @@ -41,14 +41,38 @@ define([ */ setDefaultSelections: function () { var positionCacheValid = registry.get('position_cache_valid'), + selectedFromCache = registry.get('selected_cache'), key, i; - registry.set('position_cache_valid', true); + if (positionCacheValid && this.selected().length === 0) { + // Check selected data + selectedFromCache = JSON.parse(selectedFromCache); + + for (i = 0; i < selectedFromCache.length; i++) { + this.selected.push(selectedFromCache[i]); + } + + registry.set('position_cache_valid', true); + registry.set('selected_cache', JSON.stringify(this.selected())); - if (this.selectedData.length === 0 || positionCacheValid) { return; } + + if (positionCacheValid && this.selected().length > 0) { + registry.set('position_cache_valid', true); + registry.set('selected_cache', JSON.stringify(this.selected())); + + return; + } + + if (this.selectedData.length === 0) { + registry.set('position_cache_valid', true); + registry.set('selected_cache', JSON.stringify([])); + + return; + } + // Check selected data for (key in this.selectedData) { if (this.selectedData.hasOwnProperty(key) && this.selected().indexOf(key) === -1) { @@ -61,6 +85,8 @@ define([ this.selectedData.hasOwnProperty(key) || this.selected.splice(this.selected().indexOf(key), 1); this.selectedData.hasOwnProperty(key) || i--; } + registry.set('position_cache_valid', true); + registry.set('selected_cache', JSON.stringify(this.selected())); }, /** @@ -91,12 +117,18 @@ define([ * @returns {Object} Chainable. */ updateState: function () { - var totalRecords = this.totalRecords(), + var positionCacheValid = registry.get('position_cache_valid'), + totalRecords = this.totalRecords(), selected = this.selected().length, excluded = this.excluded().length, totalSelected = this.totalSelected(), allSelected; + if (positionCacheValid && this.selected().length > 0) { + registry.set('position_cache_valid', true); + registry.set('selected_cache', JSON.stringify(this.selected())); + } + // When filters are enabled then totalRecords is unknown if (this.getFiltering()) { if (this.getFiltering().search !== '') { From 96cfc06f75470c3c9b0af5b0981e5d165e2d8cf0 Mon Sep 17 00:00:00 2001 From: Sergey Semenov Date: Fri, 15 Jan 2016 19:21:30 +0200 Subject: [PATCH 26/61] MAGETWO-46891: Information about selected country in address is not presented on checkout flow --- .../frontend/web/js/model/address-converter.js | 3 --- .../view/frontend/web/js/view/billing-address.js | 4 ---- .../shipping-address/address-renderer/default.js | 3 --- .../address-renderer/default.js | 3 --- .../Customer/view/frontend/web/js/customer-data.js | 14 +++++++++++++- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js b/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js index f3f1c012790ae..6872c8e5acd54 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js @@ -12,9 +12,6 @@ define( function($, address, customerData, mageUtils) { 'use strict'; var countryData = customerData.get('directory-data'); - if (_.isEmpty(countryData())) { - countryData(customerData.reload(['directory-data'], false)); - } return { /** diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js index 55a9a90504075..0b3290b3c3960 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js @@ -50,10 +50,6 @@ define( }); addressOptions.push(newAddressOption); - if (_.isEmpty(countryData())) { - countryData(customerData.reload(['directory-data'], false)); - } - return Component.extend({ defaults: { template: 'Magento_Checkout/billing-address' diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js index b2d558dcf804f..3d7191fdfea30 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js @@ -15,9 +15,6 @@ define([ ], function($, ko, Component, selectShippingAddressAction, quote, formPopUpState, checkoutData, customerData) { 'use strict'; var countryData = customerData.get('directory-data'); - if (_.isEmpty(countryData())) { - countryData(customerData.reload(['directory-data'], false)); - } return Component.extend({ defaults: { diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js index 128e9f4549859..f36192388370a 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js @@ -9,9 +9,6 @@ define([ ], function(Component, customerData) { 'use strict'; var countryData = customerData.get('directory-data'); - if (_.isEmpty(countryData())) { - countryData(customerData.reload(['directory-data'], false)); - } return Component.extend({ defaults: { diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index bfec0bf920246..cf6788e82d9a5 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -104,8 +104,13 @@ define([ var customerData = { init: function() { + var countryData, + privateContent = $.cookieStorage.get('private_content_version'); + if (_.isEmpty(storage.keys())) { - this.reload([], false); + if (!_.isEmpty(privateContent)) { + this.reload([], false); + } } else if (this.needReload()) { _.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) { buffer.notify(sectionName, sectionData); @@ -119,6 +124,13 @@ define([ this.reload(storageInvalidation.keys(), false); } } + + if (!_.isEmpty(privateContent)) { + countryData = this.get('directory-data'); + if (_.isEmpty(countryData())) { + countryData(customerData.reload(['directory-data'], false)); + } + } }, needReload: function () { var cookieSections = $.cookieStorage.get('section_data_ids'); From 9a140608faf9507463d2d5fb00f6669b3376130d Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Fri, 15 Jan 2016 19:24:39 +0200 Subject: [PATCH 27/61] MAGETWO-46478: Frontend CAPTCHA Bypass --- .../Magento/Framework/Event/Manager.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/Event/Manager.php b/lib/internal/Magento/Framework/Event/Manager.php index 237cd1586577d..4451dabc35f59 100644 --- a/lib/internal/Magento/Framework/Event/Manager.php +++ b/lib/internal/Magento/Framework/Event/Manager.php @@ -10,19 +10,26 @@ class Manager implements ManagerInterface { + /** + * Events cache + * + * @var array + */ + protected $_events = []; + /** * Event invoker * * @var InvokerInterface */ - protected $invoker; + protected $_invoker; /** * Event config * * @var ConfigInterface */ - protected $eventConfig; + protected $_eventConfig; /** * @param InvokerInterface $invoker @@ -30,8 +37,8 @@ class Manager implements ManagerInterface */ public function __construct(InvokerInterface $invoker, ConfigInterface $eventConfig) { - $this->invoker = $invoker; - $this->eventConfig = $eventConfig; + $this->_invoker = $invoker; + $this->_eventConfig = $eventConfig; } /** @@ -48,7 +55,7 @@ public function dispatch($eventName, array $data = []) { $eventName = mb_strtolower($eventName); \Magento\Framework\Profiler::start('EVENT:' . $eventName, ['group' => 'EVENT', 'name' => $eventName]); - foreach ($this->eventConfig->getObservers($eventName) as $observerConfig) { + foreach ($this->_eventConfig->getObservers($eventName) as $observerConfig) { $event = new \Magento\Framework\Event($data); $event->setName($eventName); @@ -56,7 +63,7 @@ public function dispatch($eventName, array $data = []) $wrapper->setData(array_merge(['event' => $event], $data)); \Magento\Framework\Profiler::start('OBSERVER:' . $observerConfig['name']); - $this->invoker->dispatch($observerConfig, $wrapper); + $this->_invoker->dispatch($observerConfig, $wrapper); \Magento\Framework\Profiler::stop('OBSERVER:' . $observerConfig['name']); } \Magento\Framework\Profiler::stop('EVENT:' . $eventName); From 5d6a90aa40eacb257d91046ad5fdb04ed00f9f0a Mon Sep 17 00:00:00 2001 From: Cari Spruiell Date: Tue, 12 Jan 2016 16:00:26 -0600 Subject: [PATCH 28/61] MAGETWO-47651: Remi PHP 7.0.1 failure on L1 Magento\Framework\Phrase - update composer.lock file to include ext-zip --- composer.lock | 369 +++++++++++++++++++++++++++----------------------- 1 file changed, 202 insertions(+), 167 deletions(-) diff --git a/composer.lock b/composer.lock index e8f51a8f3a7aa..7fefee4db0231 100644 --- a/composer.lock +++ b/composer.lock @@ -1,23 +1,24 @@ { "_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": "a89e22120ba1ef2146473b6e378acaed", + "hash": "80d81327a228d96ed4512c92e09d5b02", + "content-hash": "7a457b69136c2954644691bd92ca7cc6", "packages": [ { "name": "braintree/braintree_php", - "version": "2.39.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "11322fe8247ec6ba3e983cd6883d313f07791143" + "reference": "36c2b9de6793a28e25f5f9e265f60aaffef2cfe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/11322fe8247ec6ba3e983cd6883d313f07791143", - "reference": "11322fe8247ec6ba3e983cd6883d313f07791143", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/36c2b9de6793a28e25f5f9e265f60aaffef2cfe2", + "reference": "36c2b9de6793a28e25f5f9e265f60aaffef2cfe2", "shasum": "" }, "require": { @@ -25,9 +26,8 @@ "ext-dom": "*", "ext-hash": "*", "ext-openssl": "*", - "ext-simplexml": "*", "ext-xmlwriter": "*", - "php": ">=5.2.1" + "php": ">=5.4.0" }, "require-dev": { "phpunit/phpunit": "3.7.*" @@ -35,7 +35,10 @@ "type": "library", "autoload": { "psr-0": { - "Braintree": "lib" + "Braintree": "lib/" + }, + "psr-4": { + "Braintree\\": "lib/Braintree" } }, "notification-url": "https://packagist.org/downloads/", @@ -49,7 +52,7 @@ } ], "description": "Braintree PHP Client Library", - "time": "2015-05-07 16:53:06" + "time": "2015-11-19 19:14:47" }, { "name": "composer/composer", @@ -121,16 +124,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe" + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", "shasum": "" }, "require": { @@ -183,16 +186,21 @@ "json", "schema" ], - "time": "2015-09-08 22:28:04" + "time": "2016-01-06 14:37:04" }, { "name": "magento/composer", "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/magento/composer.git", + "reference": "1be267e71debac6e0d9fae4e5144f6095cffbe89" + }, "dist": { "type": "zip", - "url": "https://repo.magento.com/archives/magento/composer/magento-composer-1.0.2.0.zip", + "url": "https://api.github.com/repos/magento/composer/zipball/1be267e71debac6e0d9fae4e5144f6095cffbe89", "reference": null, - "shasum": "6bfdbff4c23aace1e6d14ab598c81c790375aba0" + "shasum": "79156c3e7317af1ff64a482ba90ec81c66b82c73" }, "require": { "composer/composer": "1.0.0-alpha10", @@ -296,12 +304,12 @@ "source": { "type": "git", "url": "https://github.com/magento/zf1.git", - "reference": "c9d607bfd9454bc18b9deff737ccd5d044e2ab10" + "reference": "dbdf178992bfa52d6e978e62131162301ff6b76f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/magento/zf1/zipball/c9d607bfd9454bc18b9deff737ccd5d044e2ab10", - "reference": "c9d607bfd9454bc18b9deff737ccd5d044e2ab10", + "reference": "dbdf178992bfa52d6e978e62131162301ff6b76f", "shasum": "" }, "require": { @@ -335,7 +343,7 @@ "ZF1", "framework" ], - "time": "2015-10-29 14:34:55" + "time": "2015-09-30 13:04:03" }, { "name": "monolog/monolog", @@ -666,20 +674,20 @@ }, { "name": "seld/jsonlint", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4" + "reference": "66834d3e3566bb5798db7294619388786ae99394" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.3 || ^7.0" }, "bin": [ "bin/jsonlint" @@ -708,11 +716,11 @@ "parser", "validator" ], - "time": "2015-01-04 21:18:15" + "time": "2015-11-21 02:21:41" }, { "name": "symfony/console", - "version": "v2.6.11", + "version": "v2.6.12", "target-dir": "Symfony/Component/Console", "source": { "type": "git", @@ -770,16 +778,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8" + "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87a5db5ea887763fa3a31a5471b512ff1596d9b8", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc", + "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc", "shasum": "" }, "require": { @@ -787,10 +795,10 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.3" + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" }, "suggest": { "symfony/dependency-injection": "", @@ -799,13 +807,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -823,20 +834,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2015-10-30 20:15:42" }, { "name": "symfony/finder", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d" + "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", + "url": "https://api.github.com/repos/symfony/finder/zipball/dd41ae57f4f737be271d944a0cc5f5f21203a7c6", + "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6", "shasum": "" }, "require": { @@ -845,13 +856,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -869,20 +883,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2015-12-05 11:09:21" }, { "name": "symfony/process", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7" + "reference": "62c254438b5040bc2217156e1570cf2206e8540c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4a959dd4e19c2c5d7512689413921e0a74386ec7", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7", + "url": "https://api.github.com/repos/symfony/process/zipball/62c254438b5040bc2217156e1570cf2206e8540c", + "reference": "62c254438b5040bc2217156e1570cf2206e8540c", "shasum": "" }, "require": { @@ -891,13 +905,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -915,7 +932,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-10-23 14:47:27" + "time": "2015-12-23 11:03:46" }, { "name": "tedivm/jshrink", @@ -1009,7 +1026,7 @@ }, { "name": "zendframework/zend-code", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", @@ -1062,7 +1079,7 @@ }, { "name": "zendframework/zend-config", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-config.git", @@ -1119,7 +1136,7 @@ }, { "name": "zendframework/zend-console", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-console.git", @@ -1169,28 +1186,29 @@ }, { "name": "zendframework/zend-crypt", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-crypt.git", - "reference": "ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1" + "reference": "165ec063868884eb952f6bca258f464f7103b79f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1", - "reference": "ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1", + "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/165ec063868884eb952f6bca258f464f7103b79f", + "reference": "165ec063868884eb952f6bca258f464f7103b79f", "shasum": "" }, "require": { "php": ">=5.3.23", - "zendframework/zend-math": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "zendframework/zend-math": "~2.4.0", + "zendframework/zend-servicemanager": "~2.4.0", + "zendframework/zend-stdlib": "~2.4.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "satooshi/php-coveralls": "dev-master", + "zendframework/zend-config": "~2.4.0" }, "suggest": { "ext-mcrypt": "Required for most features of Zend\\Crypt" @@ -1216,11 +1234,11 @@ "crypt", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2015-11-23 16:33:27" }, { "name": "zendframework/zend-di", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-di.git", @@ -1271,7 +1289,7 @@ }, { "name": "zendframework/zend-escaper", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", @@ -1316,7 +1334,7 @@ }, { "name": "zendframework/zend-eventmanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", @@ -1362,7 +1380,7 @@ }, { "name": "zendframework/zend-filter", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-filter.git", @@ -1418,7 +1436,7 @@ }, { "name": "zendframework/zend-form", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-form.git", @@ -1489,7 +1507,7 @@ }, { "name": "zendframework/zend-http", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", @@ -1540,7 +1558,7 @@ }, { "name": "zendframework/zend-i18n", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-i18n.git", @@ -1604,7 +1622,7 @@ }, { "name": "zendframework/zend-inputfilter", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-inputfilter.git", @@ -1655,7 +1673,7 @@ }, { "name": "zendframework/zend-json", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-json.git", @@ -1709,7 +1727,7 @@ }, { "name": "zendframework/zend-loader", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", @@ -1754,7 +1772,7 @@ }, { "name": "zendframework/zend-log", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-log.git", @@ -1816,7 +1834,7 @@ }, { "name": "zendframework/zend-math", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-math.git", @@ -1867,7 +1885,7 @@ }, { "name": "zendframework/zend-modulemanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-modulemanager.git", @@ -1925,7 +1943,7 @@ }, { "name": "zendframework/zend-mvc", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mvc.git", @@ -2013,7 +2031,7 @@ }, { "name": "zendframework/zend-serializer", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-serializer.git", @@ -2066,7 +2084,7 @@ }, { "name": "zendframework/zend-server", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-server.git", @@ -2113,7 +2131,7 @@ }, { "name": "zendframework/zend-servicemanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-servicemanager.git", @@ -2163,7 +2181,7 @@ }, { "name": "zendframework/zend-soap", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-soap.git", @@ -2215,7 +2233,7 @@ }, { "name": "zendframework/zend-stdlib", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", @@ -2270,7 +2288,7 @@ }, { "name": "zendframework/zend-text", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-text.git", @@ -2317,7 +2335,7 @@ }, { "name": "zendframework/zend-uri", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", @@ -2365,7 +2383,7 @@ }, { "name": "zendframework/zend-validator", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", @@ -2430,7 +2448,7 @@ }, { "name": "zendframework/zend-view", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-view.git", @@ -2563,28 +2581,28 @@ }, { "name": "fabpot/php-cs-fixer", - "version": "v1.10.2", + "version": "v1.11", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "e8b3c4e41dc1484210fdc45363c41af6c2d56f20" + "reference": "bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/e8b3c4e41dc1484210fdc45363c41af6c2d56f20", - "reference": "e8b3c4e41dc1484210fdc45363c41af6c2d56f20", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef", + "reference": "bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.6", "sebastian/diff": "~1.1", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.3", - "symfony/stopwatch": "~2.5" + "symfony/console": "~2.3|~3.0", + "symfony/event-dispatcher": "~2.1|~3.0", + "symfony/filesystem": "~2.1|~3.0", + "symfony/finder": "~2.1|~3.0", + "symfony/process": "~2.3|~3.0", + "symfony/stopwatch": "~2.5|~3.0" }, "require-dev": { "satooshi/php-coveralls": "0.7.*@dev" @@ -2613,7 +2631,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2015-10-21 19:19:43" + "time": "2015-12-01 22:34:33" }, { "name": "league/climate", @@ -2733,26 +2751,27 @@ }, { "name": "pdepend/pdepend", - "version": "2.0.6", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4" + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", "shasum": "" }, "require": { - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "php": ">=5.3.7", + "symfony/config": "^2.3.0", + "symfony/dependency-injection": "^2.3.0", + "symfony/filesystem": "^2.3.0" }, "require-dev": { - "phpunit/phpunit": "4.*@stable", - "squizlabs/php_codesniffer": "@stable" + "phpunit/phpunit": "^4.0.0,<4.8", + "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ "src/bin/pdepend" @@ -2768,7 +2787,7 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-03-02 08:06:43" + "time": "2015-10-16 08:49:58" }, { "name": "phpmd/phpmd", @@ -3269,28 +3288,28 @@ }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -3313,24 +3332,24 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "6e7133793a8e5a5714a551a8324337374be209df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", "shasum": "" }, "require": { @@ -3367,7 +3386,7 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2015-12-02 08:37:27" }, { "name": "sebastian/exporter", @@ -3437,16 +3456,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -3486,7 +3505,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2015-11-11 19:50:13" }, { "name": "sebastian/version", @@ -3653,32 +3672,35 @@ }, { "name": "symfony/config", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "831f88908b51b9ce945f5e6f402931d1ac544423" + "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/831f88908b51b9ce945f5e6f402931d1ac544423", - "reference": "831f88908b51b9ce945f5e6f402931d1ac544423", + "url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", + "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/filesystem": "~2.3" + "symfony/filesystem": "~2.3|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3696,20 +3718,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2015-12-26 13:37:56" }, { "name": "symfony/dependency-injection", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "af284e795ec8a08c80d1fc47518fd23004b89847" + "reference": "c5086d186f538c2711b9af6f727be7b0446979cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/af284e795ec8a08c80d1fc47518fd23004b89847", - "reference": "af284e795ec8a08c80d1fc47518fd23004b89847", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c5086d186f538c2711b9af6f727be7b0446979cd", + "reference": "c5086d186f538c2711b9af6f727be7b0446979cd", "shasum": "" }, "require": { @@ -3719,9 +3741,9 @@ "symfony/expression-language": "<2.6" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.6", - "symfony/yaml": "~2.1" + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/yaml": "~2.1|~3.0.0" }, "suggest": { "symfony/config": "", @@ -3731,13 +3753,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3755,20 +3780,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-10-27 15:38:06" + "time": "2015-12-26 13:37:56" }, { "name": "symfony/filesystem", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "56fd6df73be859323ff97418d97edc1d756df6df" + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/56fd6df73be859323ff97418d97edc1d756df6df", - "reference": "56fd6df73be859323ff97418d97edc1d756df6df", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc", + "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc", "shasum": "" }, "require": { @@ -3777,13 +3802,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3801,35 +3829,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-10-18 20:23:18" + "time": "2015-12-22 10:25:57" }, { "name": "symfony/stopwatch", - "version": "v2.7.6", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f8ab957c17e4b85a73c4df03bdf94ee597f2bd55" + "reference": "6aeac8907e3e1340a0033b0a9ec075f8e6524800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f8ab957c17e4b85a73c4df03bdf94ee597f2bd55", - "reference": "f8ab957c17e4b85a73c4df03bdf94ee597f2bd55", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6aeac8907e3e1340a0033b0a9ec075f8e6524800", + "reference": "6aeac8907e3e1340a0033b0a9ec075f8e6524800", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3847,20 +3878,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2015-10-12 12:42:24" + "time": "2015-10-30 23:35:59" }, { "name": "symfony/yaml", - "version": "v2.7.6", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", + "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", "shasum": "" }, "require": { @@ -3869,13 +3900,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3893,7 +3927,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2015-12-26 13:37:56" } ], "aliases": [], @@ -3919,7 +3953,8 @@ "ext-intl": "*", "ext-xsl": "*", "ext-mbstring": "*", - "ext-openssl": "*" + "ext-openssl": "*", + "ext-zip": "*" }, "platform-dev": [] } From 6eeeebbc354811e205455331bbe29b70f7a23b56 Mon Sep 17 00:00:00 2001 From: Cari Spruiell Date: Mon, 11 Jan 2016 14:23:39 -0600 Subject: [PATCH 29/61] MAGETWO-47651: Remi PHP 7.0.1 failure on L1 Magento\Framework\Phrase - add ext-zip to required extensions --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 700c9de61aeaf..c2842e5625f91 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,8 @@ "ext-intl": "*", "ext-xsl": "*", "ext-mbstring": "*", - "ext-openssl": "*" + "ext-openssl": "*", + "ext-zip": "*" }, "require-dev": { "phpunit/phpunit": "4.1.0", From 5b388bb83bfbc4a0260f747f85aeeab3402dccf1 Mon Sep 17 00:00:00 2001 From: Cari Spruiell Date: Fri, 8 Jan 2016 15:20:49 -0600 Subject: [PATCH 30/61] MAGETWO-47651: Remi PHP 7.0.1 failure on L1 Magento\Framework\Phrase - make second parameter an array --- lib/internal/Magento/Framework/Archive/Zip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Archive/Zip.php b/lib/internal/Magento/Framework/Archive/Zip.php index d6ba5c970cfa5..b3abd075fc8f9 100644 --- a/lib/internal/Magento/Framework/Archive/Zip.php +++ b/lib/internal/Magento/Framework/Archive/Zip.php @@ -21,7 +21,7 @@ public function __construct() $type = 'Zip'; if (!class_exists('\ZipArchive')) { throw new \Magento\Framework\Exception\LocalizedException( - new \Magento\Framework\Phrase('\'%1\' file extension is not supported', $type) + new \Magento\Framework\Phrase('\'%1\' file extension is not supported', [$type]) ); } } From d65806ff9caf2c7e4d98c8d098bb19aff4addb6c Mon Sep 17 00:00:00 2001 From: Olga Kopylova Date: Fri, 15 Jan 2016 14:06:12 -0600 Subject: [PATCH 31/61] MAGETWO-47651: Remi PHP 7.0.1 failure on L1 Magento\Framework\Phrase - updated composer.lock --- composer.lock | 156 +++++++++++++++++++++++--------------------------- 1 file changed, 72 insertions(+), 84 deletions(-) diff --git a/composer.lock b/composer.lock index 7fefee4db0231..9a3c248728b25 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "80d81327a228d96ed4512c92e09d5b02", - "content-hash": "7a457b69136c2954644691bd92ca7cc6", + "hash": "a89e22120ba1ef2146473b6e378acaed", + "content-hash": "b34da7e4f307b55e319af6a6f0ac4eb3", "packages": [ { "name": "braintree/braintree_php", - "version": "3.7.0", + "version": "2.39.0", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "36c2b9de6793a28e25f5f9e265f60aaffef2cfe2" + "reference": "11322fe8247ec6ba3e983cd6883d313f07791143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/36c2b9de6793a28e25f5f9e265f60aaffef2cfe2", - "reference": "36c2b9de6793a28e25f5f9e265f60aaffef2cfe2", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/11322fe8247ec6ba3e983cd6883d313f07791143", + "reference": "11322fe8247ec6ba3e983cd6883d313f07791143", "shasum": "" }, "require": { @@ -26,8 +26,9 @@ "ext-dom": "*", "ext-hash": "*", "ext-openssl": "*", + "ext-simplexml": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=5.2.1" }, "require-dev": { "phpunit/phpunit": "3.7.*" @@ -35,10 +36,7 @@ "type": "library", "autoload": { "psr-0": { - "Braintree": "lib/" - }, - "psr-4": { - "Braintree\\": "lib/Braintree" + "Braintree": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -52,7 +50,7 @@ } ], "description": "Braintree PHP Client Library", - "time": "2015-11-19 19:14:47" + "time": "2015-05-07 16:53:06" }, { "name": "composer/composer", @@ -191,16 +189,11 @@ { "name": "magento/composer", "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/magento/composer.git", - "reference": "1be267e71debac6e0d9fae4e5144f6095cffbe89" - }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/1be267e71debac6e0d9fae4e5144f6095cffbe89", + "url": "https://repo.magento.com/archives/magento/composer/magento-composer-1.0.2.0.zip", "reference": null, - "shasum": "79156c3e7317af1ff64a482ba90ec81c66b82c73" + "shasum": "6bfdbff4c23aace1e6d14ab598c81c790375aba0" }, "require": { "composer/composer": "1.0.0-alpha10", @@ -304,12 +297,12 @@ "source": { "type": "git", "url": "https://github.com/magento/zf1.git", - "reference": "dbdf178992bfa52d6e978e62131162301ff6b76f" + "reference": "c9d607bfd9454bc18b9deff737ccd5d044e2ab10" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/magento/zf1/zipball/c9d607bfd9454bc18b9deff737ccd5d044e2ab10", - "reference": "dbdf178992bfa52d6e978e62131162301ff6b76f", + "reference": "c9d607bfd9454bc18b9deff737ccd5d044e2ab10", "shasum": "" }, "require": { @@ -343,7 +336,7 @@ "ZF1", "framework" ], - "time": "2015-09-30 13:04:03" + "time": "2015-10-29 14:34:55" }, { "name": "monolog/monolog", @@ -720,7 +713,7 @@ }, { "name": "symfony/console", - "version": "v2.6.12", + "version": "v2.6.13", "target-dir": "Symfony/Component/Console", "source": { "type": "git", @@ -778,16 +771,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc" + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc", - "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda", + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda", "shasum": "" }, "require": { @@ -834,20 +827,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-10-30 20:15:42" + "time": "2016-01-13 10:28:07" }, { "name": "symfony/finder", - "version": "v2.8.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6" + "reference": "c90fabdd97e431ee19b6383999cf35334dff27da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/dd41ae57f4f737be271d944a0cc5f5f21203a7c6", - "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6", + "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da", + "reference": "c90fabdd97e431ee19b6383999cf35334dff27da", "shasum": "" }, "require": { @@ -883,20 +876,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-12-05 11:09:21" + "time": "2016-01-14 08:26:52" }, { "name": "symfony/process", - "version": "v2.8.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "62c254438b5040bc2217156e1570cf2206e8540c" + "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/62c254438b5040bc2217156e1570cf2206e8540c", - "reference": "62c254438b5040bc2217156e1570cf2206e8540c", + "url": "https://api.github.com/repos/symfony/process/zipball/6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac", + "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac", "shasum": "" }, "require": { @@ -932,7 +925,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-12-23 11:03:46" + "time": "2016-01-06 09:59:23" }, { "name": "tedivm/jshrink", @@ -2751,27 +2744,26 @@ }, { "name": "pdepend/pdepend", - "version": "2.2.2", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5" + "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", - "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", + "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", "shasum": "" }, "require": { - "php": ">=5.3.7", - "symfony/config": "^2.3.0", - "symfony/dependency-injection": "^2.3.0", - "symfony/filesystem": "^2.3.0" + "symfony/config": ">=2.4", + "symfony/dependency-injection": ">=2.4", + "symfony/filesystem": ">=2.4" }, "require-dev": { - "phpunit/phpunit": "^4.0.0,<4.8", - "squizlabs/php_codesniffer": "^2.0.0" + "phpunit/phpunit": "4.*@stable", + "squizlabs/php_codesniffer": "@stable" }, "bin": [ "src/bin/pdepend" @@ -2787,7 +2779,7 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-10-16 08:49:58" + "time": "2015-03-02 08:06:43" }, { "name": "phpmd/phpmd", @@ -3672,26 +3664,26 @@ }, { "name": "symfony/config", - "version": "v2.8.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2" + "reference": "58680a6516a457a6c65044fe33586c4a81fdff01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", - "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2", + "url": "https://api.github.com/repos/symfony/config/zipball/58680a6516a457a6c65044fe33586c4a81fdff01", + "reference": "58680a6516a457a6c65044fe33586c4a81fdff01", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3718,32 +3710,29 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:37:56" + "time": "2015-12-26 13:39:53" }, { "name": "symfony/dependency-injection", - "version": "v2.8.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "c5086d186f538c2711b9af6f727be7b0446979cd" + "reference": "1256a2e57879ae561278c306d47977d1f73387b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c5086d186f538c2711b9af6f727be7b0446979cd", - "reference": "c5086d186f538c2711b9af6f727be7b0446979cd", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1256a2e57879ae561278c306d47977d1f73387b8", + "reference": "1256a2e57879ae561278c306d47977d1f73387b8", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/expression-language": "<2.6" + "php": ">=5.5.9" }, "require-dev": { - "symfony/config": "~2.2|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/yaml": "~2.1|~3.0.0" + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" }, "suggest": { "symfony/config": "", @@ -3753,7 +3742,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3780,29 +3769,29 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:37:56" + "time": "2015-12-26 13:39:53" }, { "name": "symfony/filesystem", - "version": "v2.8.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc" + "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc", - "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2e59d11dccd135dc8f00ee97f34fe1de842e70c", + "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3829,7 +3818,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-12-22 10:25:57" + "time": "2015-12-22 10:39:06" }, { "name": "symfony/stopwatch", @@ -3882,16 +3871,16 @@ }, { "name": "symfony/yaml", - "version": "v2.8.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966" + "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", - "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966", + "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8", + "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8", "shasum": "" }, "require": { @@ -3927,7 +3916,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:37:56" + "time": "2016-01-13 10:28:07" } ], "aliases": [], @@ -3953,8 +3942,7 @@ "ext-intl": "*", "ext-xsl": "*", "ext-mbstring": "*", - "ext-openssl": "*", - "ext-zip": "*" + "ext-openssl": "*" }, "platform-dev": [] } From beda204e84c1423c25e69b48669b262980fb6eab Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Tue, 17 Nov 2015 11:39:53 -0600 Subject: [PATCH 32/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - fixing test for php7 --- .../Setup/Test/Unit/Controller/MaintenanceTest.php | 2 +- .../Setup/Test/Unit/Model/PhpReadinessCheckTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php index cf9d74b0eda13..0ce45003028a3 100644 --- a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php @@ -20,7 +20,7 @@ class MaintenanceTest extends \PHPUnit_Framework_TestCase /** * Controller * - * @var \Magento\Setup\Controller\CompleteBackup + * @var \Magento\Setup\Controller\Maintenance */ private $controller; diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index 29b559a0f6276..e8c78d2d1b89e 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -216,6 +216,9 @@ public function testCheckPhpSettings() ] ] ]; + if (version_compare(PHP_VERSION, '7.0', '>=')) { + unset($expected['data']['always_populate_raw_post_data']); + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -254,6 +257,9 @@ public function testCheckPhpSettingsFailed() ] ] ]; + if (version_compare(PHP_VERSION, '7.0', '>=')) { + unset($expected['data']['always_populate_raw_post_data']); + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -280,6 +286,9 @@ public function testCheckPhpSettingsNoXDebug() ] ] ]; + if (version_compare(PHP_VERSION, '7.0', '>=')) { + unset($expected['data']['always_populate_raw_post_data']); + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } From 8ee052add3bc93bc792912dea5dd76ecd6dab2cc Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Wed, 18 Nov 2015 16:18:40 -0600 Subject: [PATCH 33/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - fixing test for php7 --- .../Setup/Test/Unit/Controller/MaintenanceTest.php | 3 +++ .../Setup/Test/Unit/Model/PhpReadinessCheckTest.php | 12 +++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php index 0ce45003028a3..78a3d86a64b68 100644 --- a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php @@ -26,6 +26,9 @@ class MaintenanceTest extends \PHPUnit_Framework_TestCase public function setUp() { + if (version_compare(PHP_VERSION, '7.0', '>=')) { + $this->markTestSkipped('Skipped for PHP 7'); + } $this->maintenanceMode = $this->getMock('Magento\Framework\App\MaintenanceMode', [], [], '', false); $this->controller = new Maintenance($this->maintenanceMode); } diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index e8c78d2d1b89e..5e3b62665a3a5 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -32,6 +32,9 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase public function setUp() { + if (version_compare(PHP_VERSION, '7.0', '>=')) { + $this->markTestSkipped('Skipped for PHP 7'); + } $this->composerInfo = $this->getMock('Magento\Framework\Composer\ComposerInformation', [], [], '', false); $this->phpInfo = $this->getMock('Magento\Setup\Model\PhpInformation', [], [], '', false); $this->versionParser = $this->getMock('Composer\Package\Version\VersionParser', [], [], '', false); @@ -216,9 +219,6 @@ public function testCheckPhpSettings() ] ] ]; - if (version_compare(PHP_VERSION, '7.0', '>=')) { - unset($expected['data']['always_populate_raw_post_data']); - } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -257,9 +257,6 @@ public function testCheckPhpSettingsFailed() ] ] ]; - if (version_compare(PHP_VERSION, '7.0', '>=')) { - unset($expected['data']['always_populate_raw_post_data']); - } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -286,9 +283,6 @@ public function testCheckPhpSettingsNoXDebug() ] ] ]; - if (version_compare(PHP_VERSION, '7.0', '>=')) { - unset($expected['data']['always_populate_raw_post_data']); - } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } From 258c6cd4fe21976fd0f6174cfa8bb91a0ff113b1 Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 3 Dec 2015 16:16:06 -0600 Subject: [PATCH 34/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - removing skipped test annotation --- .../Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index 5e3b62665a3a5..29b559a0f6276 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -32,9 +32,6 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase public function setUp() { - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $this->markTestSkipped('Skipped for PHP 7'); - } $this->composerInfo = $this->getMock('Magento\Framework\Composer\ComposerInformation', [], [], '', false); $this->phpInfo = $this->getMock('Magento\Setup\Model\PhpInformation', [], [], '', false); $this->versionParser = $this->getMock('Composer\Package\Version\VersionParser', [], [], '', false); From fc0d477ceaf095a2354db387905350c115ad3b32 Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 3 Dec 2015 16:29:44 -0600 Subject: [PATCH 35/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - removing skipped test annotation --- .../src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php index 78a3d86a64b68..0ce45003028a3 100644 --- a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php @@ -26,9 +26,6 @@ class MaintenanceTest extends \PHPUnit_Framework_TestCase public function setUp() { - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $this->markTestSkipped('Skipped for PHP 7'); - } $this->maintenanceMode = $this->getMock('Magento\Framework\App\MaintenanceMode', [], [], '', false); $this->controller = new Maintenance($this->maintenanceMode); } From a31dc870bfd7decb56753aa7d62d5452dbdbc2bb Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 3 Dec 2015 16:38:24 -0600 Subject: [PATCH 36/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - debugging --- setup/src/Magento/Setup/Controller/Maintenance.php | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/src/Magento/Setup/Controller/Maintenance.php b/setup/src/Magento/Setup/Controller/Maintenance.php index 073cfb4389de8..c032b9d58aabb 100644 --- a/setup/src/Magento/Setup/Controller/Maintenance.php +++ b/setup/src/Magento/Setup/Controller/Maintenance.php @@ -42,6 +42,7 @@ public function indexAction() $this->maintenanceMode->set($action); return new JsonModel(['responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS]); } catch (\Exception $e) { + var_dump($e); return new JsonModel( [ 'responseType' => ResponseTypeInterface::RESPONSE_TYPE_ERROR, From 19f74ad599fc4642ee85c00078151b697a2e8777 Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 3 Dec 2015 17:09:19 -0600 Subject: [PATCH 37/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - debugging --- setup/src/Magento/Setup/Controller/Maintenance.php | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/src/Magento/Setup/Controller/Maintenance.php b/setup/src/Magento/Setup/Controller/Maintenance.php index c032b9d58aabb..bdb7b50dd9146 100644 --- a/setup/src/Magento/Setup/Controller/Maintenance.php +++ b/setup/src/Magento/Setup/Controller/Maintenance.php @@ -37,6 +37,7 @@ public function __construct(MaintenanceMode $maintenanceMode) public function indexAction() { try { + echo $this->getRequest()->getContent(); $params = Json::decode($this->getRequest()->getContent(), Json::TYPE_ARRAY); $action = isset($params['disable']) && $params['disable'] ? false : true; $this->maintenanceMode->set($action); From d046fa23a6ab62a6b45687a5b0ce6762b5bdad8d Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 3 Dec 2015 18:18:11 -0600 Subject: [PATCH 38/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - reverting debugging changes --- .../src/Magento/Setup/Controller/Maintenance.php | 2 -- .../Test/Unit/Controller/MaintenanceTest.php | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/setup/src/Magento/Setup/Controller/Maintenance.php b/setup/src/Magento/Setup/Controller/Maintenance.php index bdb7b50dd9146..073cfb4389de8 100644 --- a/setup/src/Magento/Setup/Controller/Maintenance.php +++ b/setup/src/Magento/Setup/Controller/Maintenance.php @@ -37,13 +37,11 @@ public function __construct(MaintenanceMode $maintenanceMode) public function indexAction() { try { - echo $this->getRequest()->getContent(); $params = Json::decode($this->getRequest()->getContent(), Json::TYPE_ARRAY); $action = isset($params['disable']) && $params['disable'] ? false : true; $this->maintenanceMode->set($action); return new JsonModel(['responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS]); } catch (\Exception $e) { - var_dump($e); return new JsonModel( [ 'responseType' => ResponseTypeInterface::RESPONSE_TYPE_ERROR, diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php index 0ce45003028a3..b3adfabd493d3 100644 --- a/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php @@ -28,6 +28,21 @@ public function setUp() { $this->maintenanceMode = $this->getMock('Magento\Framework\App\MaintenanceMode', [], [], '', false); $this->controller = new Maintenance($this->maintenanceMode); + + $request = $this->getMock('\Zend\Http\PhpEnvironment\Request', [], [], '', false); + $response = $this->getMock('\Zend\Http\PhpEnvironment\Response', [], [], '', false); + $routeMatch = $this->getMock('\Zend\Mvc\Router\RouteMatch', [], [], '', false); + + $mvcEvent = $this->getMock('\Zend\Mvc\MvcEvent', [], [], '', false); + $mvcEvent->expects($this->any())->method('setRequest')->with($request)->willReturn($mvcEvent); + $mvcEvent->expects($this->any())->method('setResponse')->with($response)->willReturn($mvcEvent); + $mvcEvent->expects($this->any())->method('setTarget')->with($this->controller)->willReturn($mvcEvent); + $mvcEvent->expects($this->any())->method('getRouteMatch')->willReturn($routeMatch); + $contentArray = '{"disable":false}'; + $request->expects($this->any())->method('getContent')->willReturn($contentArray); + + $this->controller->setEvent($mvcEvent); + $this->controller->dispatch($request, $response); } public function testIndexAction() From 730afa292ab0c2f907ec43c59d9d9fdb065fdb80 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Fri, 15 Jan 2016 14:26:09 -0600 Subject: [PATCH 39/61] MAGETWO-47956: Magento 2.0.1 Publication --- .../Magento/AdminNotification/composer.json | 2 +- .../AdvancedPricingImportExport/composer.json | 2 +- app/code/Magento/Authorization/composer.json | 2 +- app/code/Magento/Authorizenet/composer.json | 2 +- app/code/Magento/Backend/composer.json | 2 +- app/code/Magento/Backup/composer.json | 2 +- app/code/Magento/Braintree/composer.json | 2 +- app/code/Magento/Bundle/composer.json | 2 +- .../Magento/BundleImportExport/composer.json | 2 +- .../Magento/CacheInvalidate/composer.json | 2 +- app/code/Magento/Captcha/composer.json | 2 +- app/code/Magento/Catalog/composer.json | 2 +- .../Magento/CatalogImportExport/composer.json | 2 +- .../Magento/CatalogInventory/composer.json | 2 +- app/code/Magento/CatalogRule/composer.json | 2 +- .../CatalogRuleConfigurable/composer.json | 2 +- app/code/Magento/CatalogSearch/composer.json | 2 +- .../Magento/CatalogUrlRewrite/composer.json | 2 +- app/code/Magento/CatalogWidget/composer.json | 2 +- app/code/Magento/Checkout/composer.json | 2 +- .../Magento/CheckoutAgreements/composer.json | 2 +- app/code/Magento/Cms/composer.json | 2 +- app/code/Magento/CmsUrlRewrite/composer.json | 2 +- app/code/Magento/Config/composer.json | 2 +- .../ConfigurableImportExport/composer.json | 2 +- .../Magento/ConfigurableProduct/composer.json | 2 +- app/code/Magento/Contact/composer.json | 2 +- app/code/Magento/Cookie/composer.json | 2 +- app/code/Magento/Cron/composer.json | 2 +- app/code/Magento/CurrencySymbol/composer.json | 2 +- app/code/Magento/Customer/composer.json | 2 +- .../CustomerImportExport/composer.json | 2 +- app/code/Magento/Deploy/composer.json | 2 +- app/code/Magento/Developer/composer.json | 2 +- app/code/Magento/Dhl/composer.json | 2 +- app/code/Magento/Directory/composer.json | 2 +- app/code/Magento/Downloadable/composer.json | 2 +- .../DownloadableImportExport/composer.json | 2 +- app/code/Magento/Eav/composer.json | 2 +- app/code/Magento/Email/composer.json | 2 +- app/code/Magento/EncryptionKey/composer.json | 2 +- app/code/Magento/Fedex/composer.json | 2 +- app/code/Magento/GiftMessage/composer.json | 2 +- app/code/Magento/GoogleAdwords/composer.json | 2 +- .../Magento/GoogleAnalytics/composer.json | 2 +- .../Magento/GoogleOptimizer/composer.json | 2 +- .../Magento/GroupedImportExport/composer.json | 2 +- app/code/Magento/GroupedProduct/composer.json | 2 +- app/code/Magento/ImportExport/composer.json | 2 +- app/code/Magento/Indexer/composer.json | 2 +- app/code/Magento/Integration/composer.json | 2 +- .../Magento/LayeredNavigation/composer.json | 2 +- app/code/Magento/Marketplace/composer.json | 2 +- app/code/Magento/MediaStorage/composer.json | 2 +- app/code/Magento/Msrp/composer.json | 2 +- app/code/Magento/Multishipping/composer.json | 2 +- .../Magento/NewRelicReporting/composer.json | 2 +- app/code/Magento/Newsletter/composer.json | 2 +- .../Magento/OfflinePayments/composer.json | 2 +- .../Magento/OfflineShipping/composer.json | 2 +- app/code/Magento/PageCache/composer.json | 2 +- app/code/Magento/Payment/composer.json | 2 +- app/code/Magento/Paypal/composer.json | 2 +- app/code/Magento/Persistent/composer.json | 2 +- app/code/Magento/ProductAlert/composer.json | 2 +- app/code/Magento/ProductVideo/composer.json | 2 +- app/code/Magento/Quote/composer.json | 2 +- app/code/Magento/Reports/composer.json | 2 +- app/code/Magento/RequireJs/composer.json | 2 +- app/code/Magento/Review/composer.json | 2 +- app/code/Magento/Rss/composer.json | 2 +- app/code/Magento/Rule/composer.json | 2 +- app/code/Magento/Sales/composer.json | 2 +- app/code/Magento/SalesRule/composer.json | 2 +- app/code/Magento/SalesSequence/composer.json | 2 +- app/code/Magento/SampleData/composer.json | 2 +- app/code/Magento/Search/composer.json | 2 +- app/code/Magento/SendFriend/composer.json | 2 +- app/code/Magento/Shipping/composer.json | 2 +- app/code/Magento/Sitemap/composer.json | 2 +- app/code/Magento/Store/composer.json | 2 +- app/code/Magento/Swagger/composer.json | 2 +- app/code/Magento/Swatches/composer.json | 2 +- app/code/Magento/Tax/composer.json | 2 +- .../Magento/TaxImportExport/composer.json | 2 +- app/code/Magento/Theme/composer.json | 2 +- app/code/Magento/Translation/composer.json | 2 +- app/code/Magento/Ui/composer.json | 2 +- app/code/Magento/Ups/composer.json | 2 +- app/code/Magento/UrlRewrite/composer.json | 2 +- app/code/Magento/User/composer.json | 2 +- app/code/Magento/Usps/composer.json | 2 +- app/code/Magento/Variable/composer.json | 2 +- app/code/Magento/Version/composer.json | 2 +- app/code/Magento/Webapi/composer.json | 2 +- app/code/Magento/Weee/composer.json | 2 +- app/code/Magento/Widget/composer.json | 2 +- app/code/Magento/Wishlist/composer.json | 2 +- .../adminhtml/Magento/backend/composer.json | 2 +- .../frontend/Magento/blank/composer.json | 2 +- .../frontend/Magento/luma/composer.json | 2 +- app/i18n/magento/de_de/composer.json | 2 +- app/i18n/magento/en_us/composer.json | 2 +- app/i18n/magento/es_es/composer.json | 2 +- app/i18n/magento/fr_fr/composer.json | 2 +- app/i18n/magento/nl_nl/composer.json | 2 +- app/i18n/magento/pt_br/composer.json | 2 +- app/i18n/magento/zh_hans_cn/composer.json | 2 +- composer.json | 220 ++++++------ composer.lock | 318 ++++++++++-------- .../Magento/Framework/AppInterface.php | 2 +- lib/internal/Magento/Framework/composer.json | 2 +- 112 files changed, 390 insertions(+), 368 deletions(-) diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index 0e5cbbf800e49..e34826d64cb62 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -10,7 +10,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index aed7e6f5c7f10..ddf71ea6f8cb4 100644 --- a/app/code/Magento/AdvancedPricingImportExport/composer.json +++ b/app/code/Magento/AdvancedPricingImportExport/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index e605b5f495bc8..cb29083b0a475 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json index c03f16a1d6c20..36a16a1785a6d 100644 --- a/app/code/Magento/Authorizenet/composer.json +++ b/app/code/Magento/Authorizenet/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 827922566f41c..202feeb58d9d2 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -21,7 +21,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index a847ec3d13933..aed884698ec43 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json index 5b835db6ad5da..ba4d37cacff59 100644 --- a/app/code/Magento/Braintree/composer.json +++ b/app/code/Magento/Braintree/composer.json @@ -22,7 +22,7 @@ "magento/module-checkout-agreements": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index 8fe38feab150b..f8b8428948356 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -24,7 +24,7 @@ "magento/module-bundle-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index 209f28b5df827..cdec6a3cf1e4f 100644 --- a/app/code/Magento/BundleImportExport/composer.json +++ b/app/code/Magento/BundleImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json index cd5bb4a4e155b..f76e18c2d6e7e 100644 --- a/app/code/Magento/CacheInvalidate/composer.json +++ b/app/code/Magento/CacheInvalidate/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 30dbf2953ae41..2eb1788a140ea 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index c403388e3e4ab..4a74eb2704e9a 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -34,7 +34,7 @@ "magento/module-catalog-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index f5a15c9bad15f..01d2ba1563b35 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -15,7 +15,7 @@ "ext-ctype": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index 04ed15b9fb90d..afb736ab545b5 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -13,7 +13,7 @@ "magento/module-ui": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index c8f8dd69cc7ed..daa0a8de9b688 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -16,7 +16,7 @@ "magento/module-catalog-rule-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json index 9e5ec8e6ca8bb..23e241f6c28df 100644 --- a/app/code/Magento/CatalogRuleConfigurable/composer.json +++ b/app/code/Magento/CatalogRuleConfigurable/composer.json @@ -11,7 +11,7 @@ "magento/module-catalog-rule": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index c28e68838c7a9..dfe1c74a45a46 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -14,7 +14,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index be02437212b99..338b9dc20ac21 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json index 70ac4a7591a73..cab32888df99f 100644 --- a/app/code/Magento/CatalogWidget/composer.json +++ b/app/code/Magento/CatalogWidget/composer.json @@ -14,7 +14,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index eee7683d44b25..b3dae990fbe0e 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -27,7 +27,7 @@ "magento/module-cookie": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index 7eb11ecd779c6..8b0bc9b4ccda8 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index 950a88034bedf..c6c9e9ebc9ced 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -18,7 +18,7 @@ "magento/module-cms-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index 13e72d6a08da0..c2600d7e90bcf 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 569d71071ac79..f5eed95e6a05b 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -12,7 +12,7 @@ "magento/module-media-storage": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index 74d4cb573d0d8..e3fe912c98be6 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index cdd088fe64638..a9975ed092897 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -23,7 +23,7 @@ "magento/module-product-links-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index c80a8845f3765..f0f4227aeaf67 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json index 74110926a5f7c..c4f8c34be17c0 100644 --- a/app/code/Magento/Cookie/composer.json +++ b/app/code/Magento/Cookie/composer.json @@ -10,7 +10,7 @@ "magento/module-backend": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index 61b341a1ac8b2..39cceeffc6f87 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -10,7 +10,7 @@ "magento/module-config": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index de5dcde6c97ce..e0b2d495607e2 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index adbb13a450b7f..c82f3f43d4f0c 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -29,7 +29,7 @@ "magento/module-customer-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 88c1f9acc7cb8..3ee6753324e8e 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -12,7 +12,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json index 656bcd4af13aa..a9914128365c4 100644 --- a/app/code/Magento/Deploy/composer.json +++ b/app/code/Magento/Deploy/composer.json @@ -9,7 +9,7 @@ "magento/module-require-js": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json index dfa876a1b0928..00b266743c51a 100644 --- a/app/code/Magento/Developer/composer.json +++ b/app/code/Magento/Developer/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 21eaffacfd19c..8bde6ce681a60 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -19,7 +19,7 @@ "magento/module-checkout": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index cdbae91d3da9f..037cceee655fd 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -10,7 +10,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index 14fbef9f036c4..d7a4b8ebbd3cd 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -24,7 +24,7 @@ "magento/module-downloadable-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json index 31f1bcac13e66..b666ba3b1af15 100644 --- a/app/code/Magento/DownloadableImportExport/composer.json +++ b/app/code/Magento/DownloadableImportExport/composer.json @@ -12,7 +12,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index 17a2f9dd74b3d..4283d529e8a32 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index e3b8c137134fd..d9466ebde66b9 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json index 3ce192fc450d0..569d3163393ee 100644 --- a/app/code/Magento/EncryptionKey/composer.json +++ b/app/code/Magento/EncryptionKey/composer.json @@ -8,7 +8,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index 2cbb0b9b3fe8d..ee8989f006093 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -15,7 +15,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index e5aba3efa8e0a..f67b630b470a2 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -17,7 +17,7 @@ "magento/module-multishipping": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 620026648c051..084047dc55cbf 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -8,7 +8,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index 6cecb9a6a7bfb..5d22c9b261eb8 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -9,7 +9,7 @@ "magento/module-cookie": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index e618d31a7db60..93fc961c0075e 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index 470b349103a48..819422fabc901 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index cb2f16ad86a7f..982b6476f0f6a 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -20,7 +20,7 @@ "magento/module-grouped-product-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index fb0d947e9f23f..3dbd0196303d7 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -11,7 +11,7 @@ "ext-ctype": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index b7608b763d680..df88dea37e108 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -8,7 +8,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index 20e4ea6ed29ed..342eff6b1439c 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -11,7 +11,7 @@ "magento/module-authorization": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index 566aa4a918928..d27b51542db11 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -8,7 +8,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json index e3cd89ddea4bd..c02e84336f050 100644 --- a/app/code/Magento/Marketplace/composer.json +++ b/app/code/Magento/Marketplace/composer.json @@ -7,7 +7,7 @@ "magento/module-backend": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json index 80a54404f9be9..4a3397c1458d7 100644 --- a/app/code/Magento/MediaStorage/composer.json +++ b/app/code/Magento/MediaStorage/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 0db1b8728bb13..bc5205bfd8f9c 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -16,7 +16,7 @@ "magento/module-msrp-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index c08b3b435284e..6a325c87074d4 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -14,7 +14,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json index 9bebe98b4eff2..373e9705b2225 100644 --- a/app/code/Magento/NewRelicReporting/composer.json +++ b/app/code/Magento/NewRelicReporting/composer.json @@ -13,7 +13,7 @@ "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 140a1c71c3f42..36b9b143a8f07 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -15,7 +15,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index 7844150fbdd63..9d15107f0eaf0 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -8,7 +8,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index 6e2fd9d9b13b9..a0b384ca78c83 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -19,7 +19,7 @@ "magento/module-offline-shipping-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index 3e879c4e03f64..816cab5dd238e 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index 41128bf9de0be..847ad533d1cf0 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -12,7 +12,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index ae291a7c9885e..7dfd7d9e78221 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -24,7 +24,7 @@ "magento/module-checkout-agreements": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index 2f0fd95679fae..bba4ce7d91d9a 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -12,7 +12,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index fb1d0a28c5d3c..e69f3c6b233e6 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json index 572beee8787e5..4453a41c3bd3a 100644 --- a/app/code/Magento/ProductVideo/composer.json +++ b/app/code/Magento/ProductVideo/composer.json @@ -13,7 +13,7 @@ "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json index 8970f5a3981c6..c16634696ead3 100644 --- a/app/code/Magento/Quote/composer.json +++ b/app/code/Magento/Quote/composer.json @@ -20,7 +20,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index 33252ef117d22..94c45fce78563 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -22,7 +22,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index 279e00af053fa..ad96684588278 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index 1f83b920855f0..ffc47560f86e0 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -18,7 +18,7 @@ "magento/module-review-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index 1a9d002a0e8c7..d72fcb300f9a8 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -9,7 +9,7 @@ "magento/module-customer": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index 332972a0584c5..aa07c072d835f 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -11,7 +11,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index d7498fee8d008..1393f3c97945e 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -32,7 +32,7 @@ "magento/module-sales-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index e68e40caa9dc3..4f3ab48370906 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -24,7 +24,7 @@ "magento/module-sales-rule-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json index 0811c634806d4..052af2dbf80e9 100644 --- a/app/code/Magento/SalesSequence/composer.json +++ b/app/code/Magento/SalesSequence/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json index f0c9e5f1c8cf8..ef4dec9986329 100644 --- a/app/code/Magento/SampleData/composer.json +++ b/app/code/Magento/SampleData/composer.json @@ -9,7 +9,7 @@ "magento/sample-data-media": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json index f5db805a6c73f..40aed4c2f9812 100644 --- a/app/code/Magento/Search/composer.json +++ b/app/code/Magento/Search/composer.json @@ -10,7 +10,7 @@ "magento/module-reports": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json index f3196997756a6..fc05099798605 100644 --- a/app/code/Magento/SendFriend/composer.json +++ b/app/code/Magento/SendFriend/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index 820dfafb481a7..efa0eba88154f 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -24,7 +24,7 @@ "magento/module-ups": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index ab6920d074de8..2e95995e63d28 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 4771353c24e9c..d64f9698e7d4e 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json index 3035c19f9e9a8..c81451a296a71 100644 --- a/app/code/Magento/Swagger/composer.json +++ b/app/code/Magento/Swagger/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json index f965f819f867e..0f5ec4a0858a6 100644 --- a/app/code/Magento/Swatches/composer.json +++ b/app/code/Magento/Swatches/composer.json @@ -19,7 +19,7 @@ "magento/module-swatches-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index 26fb4a3742cd3..596d2f1f05d97 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -22,7 +22,7 @@ "magento/module-tax-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index b922509550d80..715d69d3eb340 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index af8cafcc66618..066a9c5a9715a 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -19,7 +19,7 @@ "magento/module-theme-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index 518f679c2157c..72c61363ac540 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -10,7 +10,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 22b89b8eab609..17808fd1fd9b4 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -10,7 +10,7 @@ "magento/module-user": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index 2d513330992d3..7bcdf39aff8d9 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -13,7 +13,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 44256246568f4..65009660d2195 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -12,7 +12,7 @@ "magento/module-cms-url-rewrite": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index 6ffae63706a00..22102070b217f 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -11,7 +11,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index 02fd46e98201f..ad7ca3c358de0 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -15,7 +15,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json index 63964f723175f..34de38cbb54cf 100644 --- a/app/code/Magento/Variable/composer.json +++ b/app/code/Magento/Variable/composer.json @@ -9,7 +9,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json index 9bc1f70ace828..ffcbc58a49c6b 100644 --- a/app/code/Magento/Version/composer.json +++ b/app/code/Magento/Version/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index 6140f083c68d6..7f0568cc08ba5 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -13,7 +13,7 @@ "magento/module-user": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 96b2f810e2111..26e47f10614f8 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -17,7 +17,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index 1273a7778213c..acca43c0a5059 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -16,7 +16,7 @@ "magento/module-widget-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index c5ec4e0687249..9e0d1fd56c066 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -24,7 +24,7 @@ "magento/module-wishlist-sample-data": "Sample Data version:100.0.*" }, "type": "magento2-module", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index 5254959e1b632..0ee8b346bba7d 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-theme", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index 2674351efd1c6..60c8918566ff7 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -6,7 +6,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-theme", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json index ca0ccabb087c3..1cf27ce8460a7 100644 --- a/app/design/frontend/Magento/luma/composer.json +++ b/app/design/frontend/Magento/luma/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.0.*" }, "type": "magento2-theme", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/de_de/composer.json b/app/i18n/magento/de_de/composer.json index 3205dec624633..7c76bcdd54400 100644 --- a/app/i18n/magento/de_de/composer.json +++ b/app/i18n/magento/de_de/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/en_us/composer.json b/app/i18n/magento/en_us/composer.json index f0691ca0b4238..ec1d7fa510d51 100644 --- a/app/i18n/magento/en_us/composer.json +++ b/app/i18n/magento/en_us/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-en_us", "description": "English (United States) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/es_es/composer.json b/app/i18n/magento/es_es/composer.json index b7731e68cac3b..df11758c3154c 100644 --- a/app/i18n/magento/es_es/composer.json +++ b/app/i18n/magento/es_es/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/fr_fr/composer.json b/app/i18n/magento/fr_fr/composer.json index a6bde1a5c61ed..9fc42057c3a0d 100644 --- a/app/i18n/magento/fr_fr/composer.json +++ b/app/i18n/magento/fr_fr/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/nl_nl/composer.json b/app/i18n/magento/nl_nl/composer.json index b50ce5792fe6b..e0811f7ec9bb0 100644 --- a/app/i18n/magento/nl_nl/composer.json +++ b/app/i18n/magento/nl_nl/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/pt_br/composer.json b/app/i18n/magento/pt_br/composer.json index b6df90831aa62..8f0437ae2267c 100644 --- a/app/i18n/magento/pt_br/composer.json +++ b/app/i18n/magento/pt_br/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/i18n/magento/zh_hans_cn/composer.json b/app/i18n/magento/zh_hans_cn/composer.json index c2c97fff43fdc..2871692565ef4 100644 --- a/app/i18n/magento/zh_hans_cn/composer.json +++ b/app/i18n/magento/zh_hans_cn/composer.json @@ -1,7 +1,7 @@ { "name": "magento/language-zh_hans_cn", "description": "Chinese (China) language", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/composer.json b/composer.json index 700c9de61aeaf..817551c4d4e8c 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2ce", "description": "Magento 2 (Community Edition)", "type": "project", - "version": "2.0.0", + "version": "2.0.1", "license": [ "OSL-3.0", "AFL-3.0" @@ -75,115 +75,115 @@ "lusitanian/oauth": "~0.3 <=0.7.0" }, "replace": { - "magento/module-marketplace": "100.0.2", - "magento/module-admin-notification": "100.0.2", - "magento/module-advanced-pricing-import-export": "100.0.2", - "magento/module-authorization": "100.0.2", - "magento/module-authorizenet": "100.0.2", - "magento/module-backend": "100.0.2", - "magento/module-backup": "100.0.2", - "magento/module-braintree": "100.0.2", - "magento/module-bundle": "100.0.2", - "magento/module-bundle-import-export": "100.0.2", - "magento/module-cache-invalidate": "100.0.2", - "magento/module-captcha": "100.0.2", - "magento/module-catalog": "100.0.2", - "magento/module-catalog-import-export": "100.0.2", - "magento/module-catalog-inventory": "100.0.2", - "magento/module-catalog-rule": "100.0.2", - "magento/module-catalog-rule-configurable": "100.0.2", - "magento/module-catalog-search": "100.0.2", - "magento/module-catalog-url-rewrite": "100.0.2", - "magento/module-catalog-widget": "100.0.2", - "magento/module-checkout": "100.0.2", - "magento/module-checkout-agreements": "100.0.2", - "magento/module-cms": "100.0.2", - "magento/module-cms-url-rewrite": "100.0.2", - "magento/module-config": "100.0.2", - "magento/module-configurable-import-export": "100.0.2", - "magento/module-configurable-product": "100.0.2", - "magento/module-contact": "100.0.2", - "magento/module-cookie": "100.0.2", - "magento/module-cron": "100.0.2", - "magento/module-currency-symbol": "100.0.2", - "magento/module-customer": "100.0.2", - "magento/module-customer-import-export": "100.0.2", - "magento/module-deploy": "100.0.2", - "magento/module-developer": "100.0.2", - "magento/module-dhl": "100.0.2", - "magento/module-directory": "100.0.2", - "magento/module-downloadable": "100.0.2", - "magento/module-downloadable-import-export": "100.0.2", - "magento/module-eav": "100.0.2", - "magento/module-email": "100.0.2", - "magento/module-encryption-key": "100.0.2", - "magento/module-fedex": "100.0.2", - "magento/module-gift-message": "100.0.2", - "magento/module-google-adwords": "100.0.2", - "magento/module-google-analytics": "100.0.2", - "magento/module-google-optimizer": "100.0.2", - "magento/module-grouped-import-export": "100.0.2", - "magento/module-grouped-product": "100.0.2", - "magento/module-import-export": "100.0.2", - "magento/module-indexer": "100.0.2", - "magento/module-integration": "100.0.2", - "magento/module-layered-navigation": "100.0.2", - "magento/module-media-storage": "100.0.2", - "magento/module-msrp": "100.0.2", - "magento/module-multishipping": "100.0.2", - "magento/module-new-relic-reporting": "100.0.2", - "magento/module-newsletter": "100.0.2", - "magento/module-offline-payments": "100.0.2", - "magento/module-offline-shipping": "100.0.2", - "magento/module-page-cache": "100.0.2", - "magento/module-payment": "100.0.2", - "magento/module-paypal": "100.0.2", - "magento/module-persistent": "100.0.2", - "magento/module-product-alert": "100.0.2", - "magento/module-product-video": "100.0.2", - "magento/module-quote": "100.0.2", - "magento/module-reports": "100.0.2", - "magento/module-require-js": "100.0.2", - "magento/module-review": "100.0.2", - "magento/module-rss": "100.0.2", - "magento/module-rule": "100.0.2", - "magento/module-sales": "100.0.2", - "magento/module-sales-rule": "100.0.2", - "magento/module-sales-sequence": "100.0.2", - "magento/module-sample-data": "100.0.2", - "magento/module-search": "100.0.2", - "magento/module-send-friend": "100.0.2", - "magento/module-shipping": "100.0.2", - "magento/module-sitemap": "100.0.2", - "magento/module-store": "100.0.2", - "magento/module-swagger": "100.0.2", - "magento/module-swatches": "100.0.2", - "magento/module-tax": "100.0.2", - "magento/module-tax-import-export": "100.0.2", - "magento/module-theme": "100.0.2", - "magento/module-translation": "100.0.2", - "magento/module-ui": "100.0.2", - "magento/module-ups": "100.0.2", - "magento/module-url-rewrite": "100.0.2", - "magento/module-user": "100.0.2", - "magento/module-usps": "100.0.2", - "magento/module-variable": "100.0.2", - "magento/module-version": "100.0.2", - "magento/module-webapi": "100.0.2", - "magento/module-weee": "100.0.2", - "magento/module-widget": "100.0.2", - "magento/module-wishlist": "100.0.2", - "magento/theme-adminhtml-backend": "100.0.2", - "magento/theme-frontend-blank": "100.0.2", - "magento/theme-frontend-luma": "100.0.2", - "magento/language-de_de": "100.0.2", - "magento/language-en_us": "100.0.2", - "magento/language-es_es": "100.0.2", - "magento/language-fr_fr": "100.0.2", - "magento/language-nl_nl": "100.0.2", - "magento/language-pt_br": "100.0.2", - "magento/language-zh_hans_cn": "100.0.2", - "magento/framework": "100.0.2", + "magento/module-marketplace": "100.0.3", + "magento/module-admin-notification": "100.0.3", + "magento/module-advanced-pricing-import-export": "100.0.3", + "magento/module-authorization": "100.0.3", + "magento/module-authorizenet": "100.0.3", + "magento/module-backend": "100.0.3", + "magento/module-backup": "100.0.3", + "magento/module-braintree": "100.0.3", + "magento/module-bundle": "100.0.3", + "magento/module-bundle-import-export": "100.0.3", + "magento/module-cache-invalidate": "100.0.3", + "magento/module-captcha": "100.0.3", + "magento/module-catalog": "100.0.3", + "magento/module-catalog-import-export": "100.0.3", + "magento/module-catalog-inventory": "100.0.3", + "magento/module-catalog-rule": "100.0.3", + "magento/module-catalog-rule-configurable": "100.0.3", + "magento/module-catalog-search": "100.0.3", + "magento/module-catalog-url-rewrite": "100.0.3", + "magento/module-catalog-widget": "100.0.3", + "magento/module-checkout": "100.0.3", + "magento/module-checkout-agreements": "100.0.3", + "magento/module-cms": "100.0.3", + "magento/module-cms-url-rewrite": "100.0.3", + "magento/module-config": "100.0.3", + "magento/module-configurable-import-export": "100.0.3", + "magento/module-configurable-product": "100.0.3", + "magento/module-contact": "100.0.3", + "magento/module-cookie": "100.0.3", + "magento/module-cron": "100.0.3", + "magento/module-currency-symbol": "100.0.3", + "magento/module-customer": "100.0.3", + "magento/module-customer-import-export": "100.0.3", + "magento/module-deploy": "100.0.3", + "magento/module-developer": "100.0.3", + "magento/module-dhl": "100.0.3", + "magento/module-directory": "100.0.3", + "magento/module-downloadable": "100.0.3", + "magento/module-downloadable-import-export": "100.0.3", + "magento/module-eav": "100.0.3", + "magento/module-email": "100.0.3", + "magento/module-encryption-key": "100.0.3", + "magento/module-fedex": "100.0.3", + "magento/module-gift-message": "100.0.3", + "magento/module-google-adwords": "100.0.3", + "magento/module-google-analytics": "100.0.3", + "magento/module-google-optimizer": "100.0.3", + "magento/module-grouped-import-export": "100.0.3", + "magento/module-grouped-product": "100.0.3", + "magento/module-import-export": "100.0.3", + "magento/module-indexer": "100.0.3", + "magento/module-integration": "100.0.3", + "magento/module-layered-navigation": "100.0.3", + "magento/module-media-storage": "100.0.3", + "magento/module-msrp": "100.0.3", + "magento/module-multishipping": "100.0.3", + "magento/module-new-relic-reporting": "100.0.3", + "magento/module-newsletter": "100.0.3", + "magento/module-offline-payments": "100.0.3", + "magento/module-offline-shipping": "100.0.3", + "magento/module-page-cache": "100.0.3", + "magento/module-payment": "100.0.3", + "magento/module-paypal": "100.0.3", + "magento/module-persistent": "100.0.3", + "magento/module-product-alert": "100.0.3", + "magento/module-product-video": "100.0.3", + "magento/module-quote": "100.0.3", + "magento/module-reports": "100.0.3", + "magento/module-require-js": "100.0.3", + "magento/module-review": "100.0.3", + "magento/module-rss": "100.0.3", + "magento/module-rule": "100.0.3", + "magento/module-sales": "100.0.3", + "magento/module-sales-rule": "100.0.3", + "magento/module-sales-sequence": "100.0.3", + "magento/module-sample-data": "100.0.3", + "magento/module-search": "100.0.3", + "magento/module-send-friend": "100.0.3", + "magento/module-shipping": "100.0.3", + "magento/module-sitemap": "100.0.3", + "magento/module-store": "100.0.3", + "magento/module-swagger": "100.0.3", + "magento/module-swatches": "100.0.3", + "magento/module-tax": "100.0.3", + "magento/module-tax-import-export": "100.0.3", + "magento/module-theme": "100.0.3", + "magento/module-translation": "100.0.3", + "magento/module-ui": "100.0.3", + "magento/module-ups": "100.0.3", + "magento/module-url-rewrite": "100.0.3", + "magento/module-user": "100.0.3", + "magento/module-usps": "100.0.3", + "magento/module-variable": "100.0.3", + "magento/module-version": "100.0.3", + "magento/module-webapi": "100.0.3", + "magento/module-weee": "100.0.3", + "magento/module-widget": "100.0.3", + "magento/module-wishlist": "100.0.3", + "magento/theme-adminhtml-backend": "100.0.3", + "magento/theme-frontend-blank": "100.0.3", + "magento/theme-frontend-luma": "100.0.3", + "magento/language-de_de": "100.0.3", + "magento/language-en_us": "100.0.3", + "magento/language-es_es": "100.0.3", + "magento/language-fr_fr": "100.0.3", + "magento/language-nl_nl": "100.0.3", + "magento/language-pt_br": "100.0.3", + "magento/language-zh_hans_cn": "100.0.3", + "magento/framework": "100.0.3", "trentrichardson/jquery-timepicker-addon": "1.4.3", "colinmollenhour/cache-backend-redis": "1.8", "colinmollenhour/credis": "1.5", diff --git a/composer.lock b/composer.lock index e8f51a8f3a7aa..2fd37a1570c59 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a89e22120ba1ef2146473b6e378acaed", + "hash": "142ae396d21392ace0d18d188c18e46a", "packages": [ { "name": "braintree/braintree_php", @@ -121,16 +121,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe" + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", "shasum": "" }, "require": { @@ -183,7 +183,7 @@ "json", "schema" ], - "time": "2015-09-08 22:28:04" + "time": "2016-01-06 14:37:04" }, { "name": "magento/composer", @@ -666,20 +666,20 @@ }, { "name": "seld/jsonlint", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4" + "reference": "66834d3e3566bb5798db7294619388786ae99394" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.3 || ^7.0" }, "bin": [ "bin/jsonlint" @@ -708,11 +708,11 @@ "parser", "validator" ], - "time": "2015-01-04 21:18:15" + "time": "2015-11-21 02:21:41" }, { "name": "symfony/console", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Component/Console", "source": { "type": "git", @@ -770,16 +770,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8" + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87a5db5ea887763fa3a31a5471b512ff1596d9b8", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda", + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda", "shasum": "" }, "require": { @@ -787,10 +787,10 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.3" + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" }, "suggest": { "symfony/dependency-injection": "", @@ -799,13 +799,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -823,20 +826,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-13 10:28:07" }, { "name": "symfony/finder", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d" + "reference": "c90fabdd97e431ee19b6383999cf35334dff27da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", + "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da", + "reference": "c90fabdd97e431ee19b6383999cf35334dff27da", "shasum": "" }, "require": { @@ -845,13 +848,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -869,20 +875,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-14 08:26:52" }, { "name": "symfony/process", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7" + "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4a959dd4e19c2c5d7512689413921e0a74386ec7", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7", + "url": "https://api.github.com/repos/symfony/process/zipball/6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac", + "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac", "shasum": "" }, "require": { @@ -891,13 +897,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -915,7 +924,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-10-23 14:47:27" + "time": "2016-01-06 09:59:23" }, { "name": "tedivm/jshrink", @@ -1009,7 +1018,7 @@ }, { "name": "zendframework/zend-code", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", @@ -1062,7 +1071,7 @@ }, { "name": "zendframework/zend-config", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-config.git", @@ -1119,7 +1128,7 @@ }, { "name": "zendframework/zend-console", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-console.git", @@ -1169,28 +1178,29 @@ }, { "name": "zendframework/zend-crypt", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-crypt.git", - "reference": "ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1" + "reference": "165ec063868884eb952f6bca258f464f7103b79f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1", - "reference": "ec78d08abaa1a09b76b4b8161ba7d27a675e5bf1", + "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/165ec063868884eb952f6bca258f464f7103b79f", + "reference": "165ec063868884eb952f6bca258f464f7103b79f", "shasum": "" }, "require": { "php": ">=5.3.23", - "zendframework/zend-math": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "zendframework/zend-math": "~2.4.0", + "zendframework/zend-servicemanager": "~2.4.0", + "zendframework/zend-stdlib": "~2.4.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "satooshi/php-coveralls": "dev-master", + "zendframework/zend-config": "~2.4.0" }, "suggest": { "ext-mcrypt": "Required for most features of Zend\\Crypt" @@ -1216,11 +1226,11 @@ "crypt", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2015-11-23 16:33:27" }, { "name": "zendframework/zend-di", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-di.git", @@ -1271,7 +1281,7 @@ }, { "name": "zendframework/zend-escaper", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", @@ -1316,7 +1326,7 @@ }, { "name": "zendframework/zend-eventmanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", @@ -1362,7 +1372,7 @@ }, { "name": "zendframework/zend-filter", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-filter.git", @@ -1418,7 +1428,7 @@ }, { "name": "zendframework/zend-form", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-form.git", @@ -1489,7 +1499,7 @@ }, { "name": "zendframework/zend-http", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", @@ -1540,7 +1550,7 @@ }, { "name": "zendframework/zend-i18n", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-i18n.git", @@ -1604,7 +1614,7 @@ }, { "name": "zendframework/zend-inputfilter", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-inputfilter.git", @@ -1655,7 +1665,7 @@ }, { "name": "zendframework/zend-json", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-json.git", @@ -1709,7 +1719,7 @@ }, { "name": "zendframework/zend-loader", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", @@ -1754,7 +1764,7 @@ }, { "name": "zendframework/zend-log", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-log.git", @@ -1816,7 +1826,7 @@ }, { "name": "zendframework/zend-math", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-math.git", @@ -1867,7 +1877,7 @@ }, { "name": "zendframework/zend-modulemanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-modulemanager.git", @@ -1925,7 +1935,7 @@ }, { "name": "zendframework/zend-mvc", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mvc.git", @@ -2013,7 +2023,7 @@ }, { "name": "zendframework/zend-serializer", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-serializer.git", @@ -2066,7 +2076,7 @@ }, { "name": "zendframework/zend-server", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-server.git", @@ -2113,7 +2123,7 @@ }, { "name": "zendframework/zend-servicemanager", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-servicemanager.git", @@ -2163,7 +2173,7 @@ }, { "name": "zendframework/zend-soap", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-soap.git", @@ -2215,7 +2225,7 @@ }, { "name": "zendframework/zend-stdlib", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", @@ -2270,7 +2280,7 @@ }, { "name": "zendframework/zend-text", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-text.git", @@ -2317,7 +2327,7 @@ }, { "name": "zendframework/zend-uri", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", @@ -2365,7 +2375,7 @@ }, { "name": "zendframework/zend-validator", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", @@ -2430,7 +2440,7 @@ }, { "name": "zendframework/zend-view", - "version": "2.4.8", + "version": "2.4.9", "source": { "type": "git", "url": "https://github.com/zendframework/zend-view.git", @@ -2563,28 +2573,28 @@ }, { "name": "fabpot/php-cs-fixer", - "version": "v1.10.2", + "version": "v1.11", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "e8b3c4e41dc1484210fdc45363c41af6c2d56f20" + "reference": "bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/e8b3c4e41dc1484210fdc45363c41af6c2d56f20", - "reference": "e8b3c4e41dc1484210fdc45363c41af6c2d56f20", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef", + "reference": "bd3ec2c2b774e0e127ac2c737ec646d9cf2f9eef", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.6", "sebastian/diff": "~1.1", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.3", - "symfony/stopwatch": "~2.5" + "symfony/console": "~2.3|~3.0", + "symfony/event-dispatcher": "~2.1|~3.0", + "symfony/filesystem": "~2.1|~3.0", + "symfony/finder": "~2.1|~3.0", + "symfony/process": "~2.3|~3.0", + "symfony/stopwatch": "~2.5|~3.0" }, "require-dev": { "satooshi/php-coveralls": "0.7.*@dev" @@ -2613,7 +2623,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2015-10-21 19:19:43" + "time": "2015-12-01 22:34:33" }, { "name": "league/climate", @@ -3269,28 +3279,28 @@ }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -3313,24 +3323,24 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "6e7133793a8e5a5714a551a8324337374be209df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", "shasum": "" }, "require": { @@ -3367,7 +3377,7 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2015-12-02 08:37:27" }, { "name": "sebastian/exporter", @@ -3437,16 +3447,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -3486,7 +3496,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2015-11-11 19:50:13" }, { "name": "sebastian/version", @@ -3653,32 +3663,35 @@ }, { "name": "symfony/config", - "version": "v2.7.6", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "831f88908b51b9ce945f5e6f402931d1ac544423" + "reference": "58680a6516a457a6c65044fe33586c4a81fdff01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/831f88908b51b9ce945f5e6f402931d1ac544423", - "reference": "831f88908b51b9ce945f5e6f402931d1ac544423", + "url": "https://api.github.com/repos/symfony/config/zipball/58680a6516a457a6c65044fe33586c4a81fdff01", + "reference": "58680a6516a457a6c65044fe33586c4a81fdff01", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3" + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3696,32 +3709,29 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2015-12-26 13:39:53" }, { "name": "symfony/dependency-injection", - "version": "v2.7.6", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "af284e795ec8a08c80d1fc47518fd23004b89847" + "reference": "1256a2e57879ae561278c306d47977d1f73387b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/af284e795ec8a08c80d1fc47518fd23004b89847", - "reference": "af284e795ec8a08c80d1fc47518fd23004b89847", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1256a2e57879ae561278c306d47977d1f73387b8", + "reference": "1256a2e57879ae561278c306d47977d1f73387b8", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/expression-language": "<2.6" + "php": ">=5.5.9" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.6", - "symfony/yaml": "~2.1" + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" }, "suggest": { "symfony/config": "", @@ -3731,13 +3741,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3755,35 +3768,38 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-10-27 15:38:06" + "time": "2015-12-26 13:39:53" }, { "name": "symfony/filesystem", - "version": "v2.7.6", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "56fd6df73be859323ff97418d97edc1d756df6df" + "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/56fd6df73be859323ff97418d97edc1d756df6df", - "reference": "56fd6df73be859323ff97418d97edc1d756df6df", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2e59d11dccd135dc8f00ee97f34fe1de842e70c", + "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3801,35 +3817,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-10-18 20:23:18" + "time": "2015-12-22 10:39:06" }, { "name": "symfony/stopwatch", - "version": "v2.7.6", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f8ab957c17e4b85a73c4df03bdf94ee597f2bd55" + "reference": "6aeac8907e3e1340a0033b0a9ec075f8e6524800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f8ab957c17e4b85a73c4df03bdf94ee597f2bd55", - "reference": "f8ab957c17e4b85a73c4df03bdf94ee597f2bd55", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6aeac8907e3e1340a0033b0a9ec075f8e6524800", + "reference": "6aeac8907e3e1340a0033b0a9ec075f8e6524800", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3847,20 +3866,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2015-10-12 12:42:24" + "time": "2015-10-30 23:35:59" }, { "name": "symfony/yaml", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" + "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8", + "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8", "shasum": "" }, "require": { @@ -3869,13 +3888,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3893,7 +3915,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-13 10:28:07" } ], "aliases": [], diff --git a/lib/internal/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php index 15589f0eabcca..e924566db2863 100644 --- a/lib/internal/Magento/Framework/AppInterface.php +++ b/lib/internal/Magento/Framework/AppInterface.php @@ -17,7 +17,7 @@ interface AppInterface /** * Magento version */ - const VERSION = '2.0.0'; + const VERSION = '2.0.1'; /** * Launch application diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 4a68865462c7b..d7ee5f70e3704 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -2,7 +2,7 @@ "name": "magento/framework", "description": "N/A", "type": "magento2-library", - "version": "100.0.2", + "version": "100.0.3", "license": [ "OSL-3.0", "AFL-3.0" From 3b9676837625a4746e2ced174a323b40282fae0b Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Fri, 4 Dec 2015 12:00:10 -0600 Subject: [PATCH 40/61] MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo - renaming function name --- .../Test/Unit/Model/PhpReadinessCheckTest.php | 47 ++++++++++++------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index 29b559a0f6276..3c24f18df7735 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -193,7 +193,6 @@ public function testCheckPhpSettings() 50 ); - $this->setUpNoPrettyVersionParser(); $rawPostMessage = sprintf( 'Your PHP Version is %s, but always_populate_raw_post_data = -1. $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0. @@ -209,13 +208,16 @@ public function testCheckPhpSettings() 'message' => $xdebugMessage, 'error' => false, ], - 'always_populate_raw_post_data' => [ - 'message' => $rawPostMessage, - 'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data', - 'error' => false - ] ] ]; + if (!$this->isPhp7OrHhvm()) { + $this->setUpNoPrettyVersionParser(); + $expected['data']['always_populate_raw_post_data'] = [ + 'message' => $rawPostMessage, + 'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data', + 'error' => false + ]; + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -231,7 +233,6 @@ public function testCheckPhpSettingsFailed() 200 ); - $this->setUpNoPrettyVersionParser(); $rawPostMessage = sprintf( 'Your PHP Version is %s, but always_populate_raw_post_data = -1. $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0. @@ -246,14 +247,17 @@ public function testCheckPhpSettingsFailed() 'xdebug_max_nesting_level' => [ 'message' => $xdebugMessage, 'error' => true, - ], - 'always_populate_raw_post_data' => [ - 'message' => $rawPostMessage, - 'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data', - 'error' => false ] ] ]; + if (!$this->isPhp7OrHhvm()) { + $this->setUpNoPrettyVersionParser(); + $expected['data']['always_populate_raw_post_data'] = [ + 'message' => $rawPostMessage, + 'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data', + 'error' => false + ]; + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -261,7 +265,6 @@ public function testCheckPhpSettingsNoXDebug() { $this->phpInfo->expects($this->once())->method('getCurrent')->willReturn([]); - $this->setUpNoPrettyVersionParser(); $rawPostMessage = sprintf( 'Your PHP Version is %s, but always_populate_raw_post_data = -1. $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0. @@ -272,14 +275,18 @@ public function testCheckPhpSettingsNoXDebug() ); $expected = [ 'responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS, - 'data' => [ + 'data' => [] + ]; + if (!$this->isPhp7OrHhvm()) { + $this->setUpNoPrettyVersionParser(); + $expected['data'] = [ 'always_populate_raw_post_data' => [ 'message' => $rawPostMessage, 'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data', 'error' => false ] - ] - ]; + ]; + } $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings()); } @@ -333,6 +340,14 @@ public function testCheckPhpExtensionsFailed() ]; $this->assertEquals($expected, $this->phpReadinessCheck->checkPhpExtensions()); } + + /** + * @return bool + */ + protected function isPhp7OrHhvm() + { + return version_compare(PHP_VERSION, '7.0.0-beta') >= 0 || defined('HHVM_VERSION'); + } } namespace Magento\Setup\Model; From 156ec09f9127bd8ca2336a6344991c4018856341 Mon Sep 17 00:00:00 2001 From: Maddy Chellathurai Date: Thu, 17 Dec 2015 15:08:05 -0600 Subject: [PATCH 41/61] MAGETWO-47048: [PHP7] Update version of pdepend in composer.json - updating pdepend from 2.0.6 to 2.2.2 --- composer.json | 2 +- composer.lock | 81 +++++++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 39 deletions(-) diff --git a/composer.json b/composer.json index c2842e5625f91..adfd249c1af54 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,7 @@ "phpunit/phpunit": "4.1.0", "squizlabs/php_codesniffer": "1.5.3", "phpmd/phpmd": "@stable", - "pdepend/pdepend": "2.0.6", + "pdepend/pdepend": "2.2.2", "sjparkinson/static-review": "~4.1", "fabpot/php-cs-fixer": "~1.2", "lusitanian/oauth": "~0.3 <=0.7.0" diff --git a/composer.lock b/composer.lock index 9a3c248728b25..299fe81591664 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a89e22120ba1ef2146473b6e378acaed", - "content-hash": "b34da7e4f307b55e319af6a6f0ac4eb3", + "hash": "48d1f783a81b94807bfebeda2ddc769f", + "content-hash": "2b6794ef8b5f184c576be8846661703c", "packages": [ { "name": "braintree/braintree_php", @@ -2744,26 +2744,27 @@ }, { "name": "pdepend/pdepend", - "version": "2.0.6", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4" + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", "shasum": "" }, "require": { - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "php": ">=5.3.7", + "symfony/config": "^2.3.0", + "symfony/dependency-injection": "^2.3.0", + "symfony/filesystem": "^2.3.0" }, "require-dev": { - "phpunit/phpunit": "4.*@stable", - "squizlabs/php_codesniffer": "@stable" + "phpunit/phpunit": "^4.0.0,<4.8", + "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ "src/bin/pdepend" @@ -2779,7 +2780,7 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-03-02 08:06:43" + "time": "2015-10-16 08:49:58" }, { "name": "phpmd/phpmd", @@ -3664,26 +3665,26 @@ }, { "name": "symfony/config", - "version": "v3.0.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "58680a6516a457a6c65044fe33586c4a81fdff01" + "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/58680a6516a457a6c65044fe33586c4a81fdff01", - "reference": "58680a6516a457a6c65044fe33586c4a81fdff01", + "url": "https://api.github.com/repos/symfony/config/zipball/41ee6c70758f40fa1dbf90d019ae0a66c4a09e74", + "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" + "php": ">=5.3.9", + "symfony/filesystem": "~2.3|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -3710,29 +3711,32 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" + "time": "2016-01-03 15:33:41" }, { "name": "symfony/dependency-injection", - "version": "v3.0.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "1256a2e57879ae561278c306d47977d1f73387b8" + "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1256a2e57879ae561278c306d47977d1f73387b8", - "reference": "1256a2e57879ae561278c306d47977d1f73387b8", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ba94a914e244e0d05f0aaef460d5558d5541d2b1", + "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.9" + }, + "conflict": { + "symfony/expression-language": "<2.6" }, "require-dev": { - "symfony/config": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/yaml": "~2.1|~3.0.0" }, "suggest": { "symfony/config": "", @@ -3742,7 +3746,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -3769,29 +3773,29 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" + "time": "2016-01-12 17:46:01" }, { "name": "symfony/filesystem", - "version": "v3.0.1", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c" + "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2e59d11dccd135dc8f00ee97f34fe1de842e70c", - "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/637b64d0ee10f44ae98dbad651b1ecdf35a11e8c", + "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -3818,7 +3822,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-12-22 10:39:06" + "time": "2016-01-13 10:28:07" }, { "name": "symfony/stopwatch", @@ -3942,7 +3946,8 @@ "ext-intl": "*", "ext-xsl": "*", "ext-mbstring": "*", - "ext-openssl": "*" + "ext-openssl": "*", + "ext-zip": "*" }, "platform-dev": [] } From c87537d2fe49cf27b372622b74c342a2b1d9ffc0 Mon Sep 17 00:00:00 2001 From: Leonid Poluyanov Date: Sun, 3 Jan 2016 13:10:06 +0200 Subject: [PATCH 42/61] MAGETWO-47001: Error on import products - validation not works --- .../Model/Import/Product.php | 131 ++++++++++++- .../Import/Product/RowValidatorInterface.php | 2 + .../Test/Unit/Model/Import/ProductTest.php | 16 ++ .../Magento/CatalogImportExport/composer.json | 1 + .../ResourceModel/_files/product_simple.php | 2 +- .../Model/Import/ProductTest.php | 179 +++++++++++++++--- .../products_to_check_duplicated_names.csv | 4 + .../products_to_check_duplicated_url_keys.csv | 4 + .../products_to_check_valid_url_keys.csv | 4 + ...o_check_valid_url_keys_multiple_stores.csv | 7 + 10 files changed, 317 insertions(+), 33 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_names.csv create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_url_keys.csv create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys.csv create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys_multiple_stores.csv diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 7607222f334a1..7a3df2a2c1457 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -137,6 +137,11 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ const INVENTORY_USE_CONFIG_PREFIX = 'use_config_'; + /** + * Url key attribute code + */ + const URL_KEY = 'url_key'; + /** * Attribute cache * @@ -233,6 +238,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity ValidatorInterface::ERROR_MEDIA_PATH_NOT_ACCESSIBLE => 'Imported resource (image) does not exist in the local media storage', ValidatorInterface::ERROR_MEDIA_URL_NOT_ACCESSIBLE => 'Imported resource (image) could not be downloaded from external resource due to timeout or access permissions', ValidatorInterface::ERROR_INVALID_WEIGHT => 'Product weight is invalid', + ValidatorInterface::ERROR_DUPLICATE_URL_KEY => 'Specified url key is already exist', ]; /** @@ -502,12 +508,24 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ protected $categoryProcessor; + /** @var \Magento\Framework\App\Config\ScopeConfigInterface */ + protected $scopeConfig; + + /** @var \Magento\Catalog\Model\Product\Url */ + protected $productUrl; + /** @var array */ protected $websitesCache = []; /** @var array */ protected $categoriesCache = []; + /** @var array */ + protected $productUrlSuffix = []; + + /** @var array */ + protected $productUrlKeys = []; + /** * Instance of product tax class processor. * @@ -561,6 +579,12 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ protected $cachedImages = null; + /** @var array */ + protected $urlKeys = []; + + /** @var array */ + protected $rowNumbers = []; + /** * @param \Magento\Framework\Json\Helper\Data $jsonHelper * @param \Magento\ImportExport\Helper\Data $importExportData @@ -596,6 +620,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param ObjectRelationProcessor $objectRelationProcessor * @param TransactionManagerInterface $transactionManager * @param Product\TaxClassProcessor $taxClassProcessor + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param array $data * @throws \Magento\Framework\Exception\LocalizedException * @@ -636,6 +661,8 @@ public function __construct( ObjectRelationProcessor $objectRelationProcessor, TransactionManagerInterface $transactionManager, Product\TaxClassProcessor $taxClassProcessor, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + \Magento\Catalog\Model\Product\Url $productUrl, array $data = [] ) { $this->_eventManager = $eventManager; @@ -663,6 +690,8 @@ public function __construct( $this->objectRelationProcessor = $objectRelationProcessor; $this->transactionManager = $transactionManager; $this->taxClassProcessor = $taxClassProcessor; + $this->scopeConfig = $scopeConfig; + $this->productUrl = $productUrl; parent::__construct( $jsonHelper, $importExportData, @@ -1288,13 +1317,16 @@ protected function getExistingImages($images) if (!$productMediaGalleryTableName) { $productMediaGalleryTableName = $resource->getTable('catalog_product_entity_media_gallery'); } + $linkField = $this->metadataPool + ->getMetadata(\Magento\Catalog\Api\Data\ProductInterface::class) + ->getLinkField(); $select = $this->_connection->select()->from( ['mg' => $resource->getTable('catalog_product_entity_media_gallery')], ['value' => 'mg.value'] )->joinLeft( ['mgvte' => $resource->getTable('catalog_product_entity_media_gallery_value_to_entity')], '(mg.value_id = mgvte.value_id)', - ['entity_id' => 'mgvte.entity_id'] + [$linkField => 'mgvte.' . $linkField] )->where( 'mg.value IN(?)', $images @@ -1999,11 +2031,8 @@ protected function _saveStockItem() */ public function retrieveAttributeByCode($attrCode) { - if (!$this->_resource) { - $this->_resource = $this->_resourceFactory->create(); - } if (!isset($this->_attributeCache[$attrCode])) { - $this->_attributeCache[$attrCode] = $this->_resource->getAttribute($attrCode); + $this->_attributeCache[$attrCode] = $this->getResource()->getAttribute($attrCode); } return $this->_attributeCache[$attrCode]; } @@ -2214,7 +2243,25 @@ public function validateRow(array $rowData, $rowNum) } // validate custom options $this->getOptionEntity()->validateRow($rowData, $rowNum); - + if (!empty($rowData[self::URL_KEY]) || !empty($rowData[self::COL_NAME])) { + $urlKey = $this->getUrlKey($rowData); + $storeCodes = empty($rowData[self::COL_STORE_VIEW_CODE]) + ? array_flip($this->storeResolver->getStoreCodeToId()) + : explode($this->getMultipleValueSeparator(), $rowData[self::COL_STORE_VIEW_CODE]); + foreach ($storeCodes as $storeCode) { + $storeId = $this->storeResolver->getStoreCodeToId($storeCode); + $productUrlSuffix = $this->getProductUrlSuffix($storeId); + $urlPath = $urlKey . $productUrlSuffix; + if (empty($this->urlKeys[$storeId][$urlPath]) + || ($this->urlKeys[$storeId][$urlPath] == $rowData[self::COL_SKU]) + ) { + $this->urlKeys[$storeId][$urlPath] = $rowData[self::COL_SKU]; + $this->rowNumbers[$storeId][$urlPath] = $rowNum; + } else { + $this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum); + } + } + } return !$this->getErrorAggregator()->isRowInvalid($rowNum); } @@ -2319,7 +2366,79 @@ protected function _saveValidatedBunches() $this->validateRow($rowData, $source->key()); $source->next(); } + $this->checkUrlKeyDuplicates(); $this->getOptionEntity()->validateAmbiguousData(); return parent::_saveValidatedBunches(); } + + /** + * Check that url_keys are not assigned to other products in DB + * + * @return void + */ + protected function checkUrlKeyDuplicates() + { + $resource = $this->getResource(); + foreach ($this->urlKeys as $storeId => $urlKeys) { + $urlKeyDuplicates = $this->_connection->fetchAssoc( + $this->_connection->select()->from( + ['url_rewrite' => $resource->getTable('url_rewrite')], + ['request_path', 'store_id'] + )->joinLeft( + ['cpe' => $resource->getTable('catalog_product_entity')], + "cpe.entity_id = url_rewrite.entity_id" + )->where('request_path IN (?)', array_keys($urlKeys)) + ->where('store_id IN (?)', $storeId) + ->where('cpe.sku not in (?)', array_values($urlKeys)) + ); + foreach ($urlKeyDuplicates as $urlKey => $entityData) { + $rowNum = $this->rowNumbers[$entityData['store_id']][$entityData['request_path']]; + $this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum); + } + } + } + + /** + * Retrieve product rewrite suffix for store + * + * @param int $storeId + * @return string + */ + protected function getProductUrlSuffix($storeId = null) + { + if (!isset($this->productUrlSuffix[$storeId])) { + $this->productUrlSuffix[$storeId] = $this->scopeConfig->getValue( + \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator::XML_PATH_PRODUCT_URL_SUFFIX, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ); + } + return $this->productUrlSuffix[$storeId]; + } + + /** + * @param array $rowData + * @return string + */ + protected function getUrlKey($rowData) + { + if (!empty($rowData[self::URL_KEY])) { + $this->productUrlKeys[$rowData[self::COL_SKU]] = $rowData[self::URL_KEY]; + } + $urlKey = !empty($this->productUrlKeys[$rowData[self::COL_SKU]]) + ? $this->productUrlKeys[$rowData[self::COL_SKU]] + : $this->productUrl->formatUrlKey($rowData[self::COL_NAME]); + return $urlKey; + } + + /** + * @return Proxy\Product\ResourceModel + */ + protected function getResource() + { + if (!$this->_resource) { + $this->_resource = $this->_resourceFactory->create(); + } + return $this->_resource; + } } diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php index 916775c4152c7..61a4f535fea4b 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php @@ -75,6 +75,8 @@ interface RowValidatorInterface extends \Magento\Framework\Validator\ValidatorIn const ERROR_MEDIA_PATH_NOT_ACCESSIBLE = 'mediaPathNotAvailable'; + const ERROR_DUPLICATE_URL_KEY = 'duplicatedUrlKey'; + /** * Value that means all entities (e.g. websites, groups etc.) */ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php index 4c70d9140e013..7cddc36322026 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php @@ -154,6 +154,12 @@ class ProductTest extends \Magento\ImportExport\Test\Unit\Model\Import\AbstractI */ protected $errorAggregator; + /** @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject*/ + protected $scopeConfig; + + /** @var \Magento\Catalog\Model\Product\Url|\PHPUnit_Framework_MockObject_MockObject*/ + protected $productUrl; + /** * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ @@ -315,6 +321,14 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); + $this->scopeConfig = $this->getMockBuilder('\Magento\Framework\App\Config\ScopeConfigInterface') + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + + $this->productUrl = $this->getMockBuilder('\Magento\Catalog\Model\Product\Url') + ->disableOriginalConstructor() + ->getMock(); + $this->errorAggregator = $this->getErrorAggregatorObject(); $this->data = []; @@ -360,6 +374,8 @@ protected function setUp() $this->objectRelationProcessor, $this->transactionManager, $this->taxClassProcessor, + $this->scopeConfig, + $this->productUrl, $this->data ); } diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index f5a15c9bad15f..632ba17f3a2c7 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -4,6 +4,7 @@ "require": { "php": "~5.5.0|~5.6.0|~7.0.0", "magento/module-catalog": "100.0.*", + "magento/module-catalog-url-rewrite": "100.0.*", "magento/module-eav": "100.0.*", "magento/module-import-export": "100.0.*", "magento/module-store": "100.0.*", diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/product_simple.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/product_simple.php index 5b3ad31d63469..ddef0332af3b0 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/product_simple.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/product_simple.php @@ -42,5 +42,5 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setUrlKey('url-key') - ->setUrlPath('url-key.html') + ->setUrlPath('url-key') ->save(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php index 2a89b0b2fb499..812ef1dfa44b1 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -45,8 +45,14 @@ class ProductTest extends \PHPUnit_Framework_TestCase */ protected $_stockStateProvider; + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + protected $objectManager; + protected function setUp() { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\CatalogImportExport\Model\Import\Product' ); @@ -93,9 +99,12 @@ public function testSaveProductsVisibility() ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_to_import.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_to_import.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] @@ -145,9 +154,12 @@ public function testSaveStockItemQty() $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_to_import.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_to_import.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] @@ -187,9 +199,12 @@ public function testStockState() $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_to_import_with_qty.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_to_import_with_qty.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( @@ -218,7 +233,13 @@ public function testSaveCustomOptions($importFile, $sku) ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory); + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => $pathToFile, + 'directory' => $directory + ] + ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] )->setSource( @@ -312,9 +333,12 @@ public function testSaveDatetimeAttribute() ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_to_import_with_datetime.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_to_import_with_datetime.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] @@ -518,9 +542,12 @@ public function testSaveMediaImage() ->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/import_media.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/import_media.csv', + 'directory' => $directory + ] ); $this->_model->setParameters( [ @@ -636,7 +663,13 @@ public function testInvalidSkuLink() 'Magento\Framework\Filesystem' ); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory); + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => $pathToFile, + 'directory' => $directory + ] + ); $errors = $this->_model->setParameters( [ 'behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, @@ -677,9 +710,12 @@ public function testValidateInvalidMultiselectValues() 'Magento\Framework\Filesystem' ); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_with_invalid_multiselect_values.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_with_invalid_multiselect_values.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] @@ -709,10 +745,12 @@ public function testProductsWithMultipleStores() $filesystem = $objectManager->create('Magento\Framework\Filesystem'); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/products_multiple_stores.csv', - $directory + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_multiple_stores.csv', + 'directory' => $directory + ] ); $errors = $this->_model->setParameters( ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] @@ -752,7 +790,13 @@ public function testProductWithInvalidWeight() ); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory); + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => $pathToFile, + 'directory' => $directory + ] + ); $errors = $this->_model->setSource( $source )->setParameters( @@ -781,7 +825,13 @@ public function testProductCategories($fixture, $separator) ); $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); - $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory); + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => $pathToFile, + 'directory' => $directory + ] + ); $errors = $this->_model->setSource( $source )->setParameters( @@ -819,4 +869,81 @@ public function categoryTestDataProvider() ['import_new_categories_custom_separator.csv', '|'] ]; } + + /** + * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/product_simple.php + * @magentoAppIsolation enabled + * @dataProvider validateUrlKeysDataProvider + * @param $importFile string + * @param $errorsCount int + */ + public function testValidateUrlKeys($importFile, $errorsCount) + { + $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\Filesystem' + ); + $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); + + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/' . $importFile, + 'directory' => $directory + ] + ); + $errors = $this->_model->setParameters( + ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] + )->setSource( + $source + )->validateData(); + + $this->assertTrue($errors->getErrorsCount() == $errorsCount); + if ($errorsCount >= 1) { + $this->assertEquals( + "Specified url key is already exist", + $errors->getErrorByRowNumber(1)[0]->getErrorMessage() + ); + } + } + + /** + * @return array + */ + public function validateUrlKeysDataProvider() + { + return [ + ['products_to_check_valid_url_keys.csv', 0], + ['products_to_check_duplicated_url_keys.csv', 2], + ['products_to_check_duplicated_names.csv' , 1] + ]; + } + + /** + * @magentoDataFixture Magento/Store/_files/website.php + * @magentoDataFixture Magento/Store/_files/core_fixturestore.php + * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/product_simple.php + * @magentoAppIsolation enabled + */ + public function testValidateUrlKeysMultipleStores() + { + $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\Filesystem' + ); + $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); + + $source = $this->objectManager->create( + '\Magento\ImportExport\Model\Import\Source\Csv', + [ + 'file' => __DIR__ . '/_files/products_to_check_valid_url_keys_multiple_stores.csv', + 'directory' => $directory + ] + ); + $errors = $this->_model->setParameters( + ['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product'] + )->setSource( + $source + )->validateData(); + + $this->assertTrue($errors->getErrorsCount() == 0); + } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_names.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_names.csv new file mode 100644 index 0000000000000..3813e7fd775c5 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_names.csv @@ -0,0 +1,4 @@ +sku,product_type,store_view_code,name,price,attribute_set_code +simple1,simple,,"simple 1",25,Default +simple2,simple,,"simple 1",34,Default +simple3,simple,,"simple 2",58,Default diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_url_keys.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_url_keys.csv new file mode 100644 index 0000000000000..879342569bbff --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_duplicated_url_keys.csv @@ -0,0 +1,4 @@ +sku,product_type,store_view_code,name,price,attribute_set_code,url_key +simple1,simple,,"simple 1",25,Default,key1 +simple2,simple,,"simple 2",34,Default,key1 +simple3,simple,,"simple 3",58,Default,url-key diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys.csv new file mode 100644 index 0000000000000..821781a938865 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys.csv @@ -0,0 +1,4 @@ +sku,product_type,store_view_code,name,price,attribute_set_code,url_key +simple1,simple,,"simple 1",25,Default,key1 +simple2,simple,,"simple 2",34,Default,key2 +simple3,simple,,"simple 3",58,Default,key3 diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys_multiple_stores.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys_multiple_stores.csv new file mode 100644 index 0000000000000..7cd3b3a7ff283 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_check_valid_url_keys_multiple_stores.csv @@ -0,0 +1,7 @@ +sku,product_type,store_view_code,name,price,attribute_set_code,url_key +simple1,simple,,"simple",25,Default,key1 +simple1,simple,default,"simple",34,Default,key1 +simple1,simple,fixturestore,"simple",58,Default,key1 +simple2,simple,,"simple",25,Default,key2 +simple2,simple,default,"simple",34,Default, +simple2,simple,fixturestore,"simple",58,Default, \ No newline at end of file From 0b5f63f4fff472e65827074cdffd7909f7979ac6 Mon Sep 17 00:00:00 2001 From: Alex Bomko Date: Fri, 15 Jan 2016 22:55:41 +0200 Subject: [PATCH 43/61] MAGETWO-47001: Error on import products - validation not works --- .../Magento/CatalogImportExport/Model/Import/Product.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 7a3df2a2c1457..53b640ca3d5b7 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1317,16 +1317,13 @@ protected function getExistingImages($images) if (!$productMediaGalleryTableName) { $productMediaGalleryTableName = $resource->getTable('catalog_product_entity_media_gallery'); } - $linkField = $this->metadataPool - ->getMetadata(\Magento\Catalog\Api\Data\ProductInterface::class) - ->getLinkField(); $select = $this->_connection->select()->from( ['mg' => $resource->getTable('catalog_product_entity_media_gallery')], ['value' => 'mg.value'] )->joinLeft( ['mgvte' => $resource->getTable('catalog_product_entity_media_gallery_value_to_entity')], '(mg.value_id = mgvte.value_id)', - [$linkField => 'mgvte.' . $linkField] + ['entity_id' => 'mgvte.entity_id'] )->where( 'mg.value IN(?)', $images @@ -2391,7 +2388,7 @@ protected function checkUrlKeyDuplicates() ->where('store_id IN (?)', $storeId) ->where('cpe.sku not in (?)', array_values($urlKeys)) ); - foreach ($urlKeyDuplicates as $urlKey => $entityData) { + foreach ($urlKeyDuplicates as $entityData) { $rowNum = $this->rowNumbers[$entityData['store_id']][$entityData['request_path']]; $this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum); } From a545290a28f4b54c3e26c419afbeb44e74a5cec7 Mon Sep 17 00:00:00 2001 From: Alex Bomko Date: Mon, 11 Jan 2016 18:38:36 +0200 Subject: [PATCH 44/61] MAGETWO-47666: Swatches Module generates too many DB requests on Storefornt Catagery Page --- .../Block/Product/Renderer/Configurable.php | 22 ++++--- app/code/Magento/Swatches/Helper/Data.php | 26 ++++---- .../Product/Renderer/ConfigurableTest.php | 62 +++++++++++++++---- .../Swatches/Test/Unit/Helper/DataTest.php | 30 ++++++--- .../templates/product/listing/renderer.phtml | 4 +- 5 files changed, 99 insertions(+), 45 deletions(-) diff --git a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php index 339ba7dc43419..09458db9085a8 100644 --- a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php +++ b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php @@ -119,7 +119,7 @@ public function __construct( public function getJsonSwatchConfig() { $attributesData = $this->getSwatchAttributesData(); - $allOptionIds = $this->getAllOptionsIdsFromAttributeArray($attributesData); + $allOptionIds = $this->getConfigurableOptionsIds($attributesData); $swatchesData = $this->swatchHelper->getSwatchesByOptionsId($allOptionIds); $config = []; @@ -209,9 +209,9 @@ protected function addSwatchDataForAttribute( $result = []; foreach ($options as $optionId => $label) { if (isset($swatchesCollectionArray[$optionId])) { - $result[$optionId]['label'] = $label; $result[$optionId] = $this->extractNecessarySwatchData($swatchesCollectionArray[$optionId]); $result[$optionId] = $this->addAdditionalMediaData($result[$optionId], $optionId, $attributeDataArray); + $result[$optionId]['label'] = $label; } } @@ -278,7 +278,8 @@ protected function getVariationMedia($attributeCode, $optionId) { $variationProduct = $this->swatchHelper->loadFirstVariationWithSwatchImage( $this->getProduct(), - [$attributeCode => $optionId] + $attributeCode, + $optionId ); $variationMediaArray = []; @@ -325,15 +326,20 @@ protected function isProductHasImage(Product $product, $imageType) * @param array $attributeData * @return array */ - protected function getAllOptionsIdsFromAttributeArray(array $attributeData) + protected function getConfigurableOptionsIds(array $attributeData) { $ids = []; - foreach ($attributeData as $item) { - if (isset($item['options'])) { - $ids = array_merge($ids, array_keys($item['options'])); + foreach ($this->getAllowProducts() as $product) { + /** @var \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute $attribute */ + foreach ($this->helper->getAllowAttributes($this->getProduct()) as $attribute) { + $productAttribute = $attribute->getProductAttribute(); + $productAttributeId = $productAttribute->getId(); + if (isset($attributeData[$productAttributeId])) { + $ids[$product->getData($productAttribute->getAttributeCode())] = 1; + } } } - return $ids; + return array_keys($ids); } /** diff --git a/app/code/Magento/Swatches/Helper/Data.php b/app/code/Magento/Swatches/Helper/Data.php index aecd9db6cfab9..f2a8d15e667f3 100644 --- a/app/code/Magento/Swatches/Helper/Data.php +++ b/app/code/Magento/Swatches/Helper/Data.php @@ -155,30 +155,32 @@ public function populateAdditionalDataEavAttribute(Attribute $attribute) /** * @param \Magento\Catalog\Model\Product $product - * @param array $attributes - * @return bool|null + * @param string $attributeCode + * @param string|int $attributeValue + * @return \Magento\Catalog\Model\Product|null * @throws InputException */ - public function loadFirstVariationWithSwatchImage($product, array $attributes) + public function loadFirstVariationWithSwatchImage($product, $attributeCode, $attributeValue) { $product = $this->createSwatchProduct($product); if (!$product) { - return false; + return null; } - $productCollection = $this->prepareVariationCollection($product, $attributes); - + $products = $product->getTypeInstance()->getUsedProducts($product); $variationProduct = null; - foreach ($productCollection as $item) { - $currentProduct = $this->productRepository->getById($item->getId()); - $media = $this->getProductMedia($currentProduct); - if (! empty($media) && isset($media['swatch_image'])) { - $variationProduct = $currentProduct; + foreach ($products as $item) { + if ($item->getData($attributeCode) != $attributeValue) { + continue; + } + $media = $this->getProductMedia($item); + if (!empty($media) && isset($media['swatch_image'])) { + $variationProduct = $item; break; } if ($variationProduct !== false) { if (! empty($media) && isset($media['image'])) { - $variationProduct = $currentProduct; + $variationProduct = $item; } else { $variationProduct = false; } diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php index 2b3500f057f31..cb3183b0df95a 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php @@ -16,9 +16,6 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase /** @var Configurable */ private $configurable; - /** @var \Magento\Catalog\Block\Product\Context|\PHPUnit_Framework_MockObject_MockObject */ - private $context; - /** @var \Magento\Framework\Stdlib\ArrayUtils|\PHPUnit_Framework_MockObject_MockObject */ private $arrayUtils; @@ -60,7 +57,6 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->context = $this->getMock('\Magento\Catalog\Block\Product\Context', [], [], '', false); $this->arrayUtils = $this->getMock('\Magento\Framework\Stdlib\ArrayUtils', [], [], '', false); $this->jsonEncoder = $this->getMock('\Magento\Framework\Json\EncoderInterface', [], [], '', false); $this->helper = $this->getMock('\Magento\ConfigurableProduct\Helper\Data', [], [], '', false); @@ -75,15 +71,13 @@ public function setUp() $this->imageHelper = $this->getMock('\Magento\Catalog\Helper\Image', [], [], '', false); $this->urlBuilder = $this->getMock('\Magento\Framework\UrlInterface'); - $this->context->expects($this->any())->method('getScopeConfig')->willReturn($this->scopeConfig); - $this->context->expects($this->any())->method('getImageHelper')->willReturn($this->imageHelper); - $this->context->expects($this->any())->method('getUrlBuilder')->willReturn($this->urlBuilder); - $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $this->configurable = $objectManager->getObject( '\Magento\Swatches\Block\Product\Renderer\Configurable', [ - 'context' => $this->context, + 'scopeConfig' => $this->scopeConfig, + 'imageHelper' => $this->imageHelper, + 'urlBuilder' => $this->urlBuilder, 'arrayUtils' => $this->arrayUtils, 'jsonEncoder' => $this->jsonEncoder, 'helper' => $this->helper, @@ -92,7 +86,6 @@ public function setUp() 'catalogProduct' => $this->catalogProduct, 'currentCustomer' => $this->currentCustomer, 'priceCurrency' => $this->priceCurrency, - 'data' => [], ] ); } @@ -146,8 +139,48 @@ public function testSetIsProductListingContext() ); } + private function prepareGetJsonSwatchConfig() + { + $product1 = $this->getMock('\Magento\Catalog\Model\Product', [], [], '', false); + $product1->expects($this->atLeastOnce())->method('isSaleable')->willReturn(true); + $product1->expects($this->atLeastOnce())->method('getData')->with('code')->willReturn(1); + + $product2 = $this->getMock('\Magento\Catalog\Model\Product', [], [], '', false); + $product2->expects($this->atLeastOnce())->method('isSaleable')->willReturn(true); + $product2->expects($this->atLeastOnce())->method('getData')->with('code')->willReturn(3); + + $simpleProducts = [$product1, $product2]; + $configurableType = $this->getMock( + '\Magento\ConfigurableProduct\Model\Product\Type\Configurable', + [], + [], + '', + false + ); + $configurableType->expects($this->atLeastOnce())->method('getUsedProducts')->with($this->product, null) + ->willReturn($simpleProducts); + $this->product->expects($this->any())->method('getTypeInstance')->willReturn($configurableType); + + $productAttribute1 = $this->getMock('\Magento\Eav\Model\Entity\Attribute\AbstractAttribute', [], [], '', false); + $productAttribute1->expects($this->any())->method('getId')->willReturn(1); + $productAttribute1->expects($this->any())->method('getAttributeCode')->willReturn('code'); + + $attribute1 = $this->getMock( + '\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute', + ['getProductAttribute'], + [], + '', + false + ); + $attribute1->expects($this->any())->method('getProductAttribute')->willReturn($productAttribute1); + + $this->helper->expects($this->any())->method('getAllowAttributes')->with($this->product) + ->willReturn([$attribute1]); + } + public function testGetJsonSwatchConfigNotVisualImageType() { + $this->prepareGetJsonSwatchConfig(); $this->configurable->setProduct($this->product); $this->swatchHelper->expects($this->once())->method('getSwatchAttributesAsArray') @@ -167,7 +200,7 @@ public function testGetJsonSwatchConfigNotVisualImageType() ]); $this->swatchHelper->expects($this->once())->method('loadFirstVariationWithSwatchImage') - ->with($this->product, ['code' => 3]) + ->with($this->product, 'code', 3) ->willReturn($this->product); $this->product->expects($this->exactly(4))->method('getData') @@ -187,6 +220,7 @@ public function testGetJsonSwatchConfigNotVisualImageType() public function testGetJsonSwatchConfigVisualImageType() { + $this->prepareGetJsonSwatchConfig(); $this->configurable->setProduct($this->product); $this->swatchHelper->expects($this->once())->method('getSwatchAttributesAsArray') @@ -206,7 +240,7 @@ public function testGetJsonSwatchConfigVisualImageType() ]); $this->swatchHelper->expects($this->once())->method('loadFirstVariationWithSwatchImage') - ->with($this->product, ['code' => 3]) + ->with($this->product, 'code', 3) ->willReturn($this->product); $this->swatchMediaHelper->expects($this->exactly(2))->method('getSwatchAttributeImage') @@ -233,6 +267,8 @@ public function testGetJsonSwatchConfigVisualImageType() public function testGetJsonSwatchConfigWithoutVisualImageType() { + $this->prepareGetJsonSwatchConfig(); + $this->configurable->setProduct($this->product); $this->swatchHelper->expects($this->once())->method('getSwatchAttributesAsArray') @@ -252,7 +288,7 @@ public function testGetJsonSwatchConfigWithoutVisualImageType() ]); $this->swatchHelper->expects($this->once())->method('loadFirstVariationWithSwatchImage') - ->with($this->product, ['code' => 3]) + ->with($this->product, 'code', 3) ->willReturn($this->product); $this->swatchMediaHelper->expects($this->exactly(2))->method('getSwatchAttributeImage') diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php index 31e868cdf4ca9..c74a9b672f8ad 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php @@ -213,24 +213,21 @@ public function testLoadFirstVariationWithSwatchImage($product, $typesArray) $this->prepareVariationCollection(); $this->productMock->method('getId')->willReturn(95); - $this->productRepoMock->expects($this->atLeastOnce())->method('getById')->with(95)->willReturn( - $this->productMock - ); $this->getProductMedia($typesArray); - $this->swatchHelperObject->loadFirstVariationWithSwatchImage($this->productMock, ['color' => 31]); + $this->swatchHelperObject->loadFirstVariationWithSwatchImage($this->productMock, 'color', 31); } public function testLoadFirstVariationWithSwatchImageWithException() { $this->setExpectedException('\Magento\Framework\Exception\InputException'); - $this->swatchHelperObject->loadFirstVariationWithSwatchImage(null, ['color' => 31]); + $this->swatchHelperObject->loadFirstVariationWithSwatchImage(null, 'color', 31); } public function testLoadFirstVariationWithSwatchImageWithoutProduct() { - $this->swatchHelperObject->loadFirstVariationWithSwatchImage($this->productMock, ['color' => 31]); + $this->swatchHelperObject->loadFirstVariationWithSwatchImage($this->productMock, 'color', 31); } /** @@ -394,7 +391,7 @@ protected function createSwatchProduct($product) { if (gettype($product) == 'integer') { $this->productRepoMock - ->expects($this->once()) + ->expects($this->any()) ->method('getById') ->with(95) ->willReturn($this->productMock); @@ -411,6 +408,16 @@ protected function getSwatchAttributes() protected function getAttributesFromConfigurable() { + $product1 = $this->getMock('\Magento\Catalog\Model\Product', [], [], '', false); + $product1->expects($this->any())->method('isSaleable')->willReturn(true); + $product1->expects($this->any())->method('getData')->with('color')->willReturn(1); + + $product2 = $this->getMock('\Magento\Catalog\Model\Product', [], [], '', false); + $product2->expects($this->any())->method('isSaleable')->willReturn(true); + $product2->expects($this->any())->method('getData')->with('color')->willReturn(3); + + $simpleProducts = [$product1, $product2]; + $configurable = $this->getMock( '\Magento\ConfigurableProduct\Model\Product\Type\Configurable', [], @@ -433,13 +440,16 @@ protected function getAttributesFromConfigurable() ); $configurable - ->expects($this->atLeastOnce()) + ->expects($this->any()) ->method('getConfigurableAttributes') ->with($this->productMock) ->willReturn([$confAttribute, $confAttribute]); + $configurable->expects($this->any())->method('getUsedProducts')->with($this->productMock) + ->willReturn($simpleProducts); + $confAttribute - ->expects($this->atLeastOnce()) + ->expects($this->any()) ->method('__call') ->with('getProductAttribute') ->willReturn($this->attributeMock); @@ -448,7 +458,7 @@ protected function getAttributesFromConfigurable() protected function prepareVariationCollection() { $this->productCollectionFactoryMock - ->expects($this->once()) + ->expects($this->any()) ->method('create') ->willReturn($this->productCollectionMock); diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml index 95d030ddfa392..db350ca98a7aa 100644 --- a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml +++ b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml @@ -13,8 +13,8 @@ onlySwatches: true, enableControlLabel: false, numberToShow: getNumberSwatchesPerProduct(); ?>, - jsonConfig: getJsonConfig(); ?>, - jsonSwatchConfig: getJsonSwatchConfig(); ?>, + jsonConfig: getJsonConfig(); ?>, + jsonSwatchConfig: getJsonSwatchConfig(); ?>, mediaCallback: 'getMediaCallback() ?>' }); }); From 9cc58faa84311759b5fb0c02088d126d745d42f1 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Fri, 15 Jan 2016 17:22:05 -0600 Subject: [PATCH 45/61] MAGETWO-47956: Magento 2.0.1 Publication --- composer.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.lock b/composer.lock index 299fe81591664..2ecabb60d4ab3 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "48d1f783a81b94807bfebeda2ddc769f", - "content-hash": "2b6794ef8b5f184c576be8846661703c", + "hash": "08fec56dca881d131e918600f9dfe6f3", "packages": [ { "name": "braintree/braintree_php", From b6baf09db7704d67c935e0471f71be6ff1d34717 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Sat, 16 Jan 2016 03:18:37 +0200 Subject: [PATCH 46/61] MAGETWO-47544: "Learn More" link for Payments Pro goes to Payflow Pro - Added "Learn More" url to module system config --- app/code/Magento/Paypal/etc/adminhtml/system.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Paypal/etc/adminhtml/system.xml b/app/code/Magento/Paypal/etc/adminhtml/system.xml index d716794f5ca8e..cd643689b48e8 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system.xml @@ -50,6 +50,7 @@ + https://www.paypal.com/us/webapps/mpp/paypal-payments-pro?partner_id=NB9WWHYEMVUMS payment/paypal_payment_pro/active From 14b0e9b8900258f56f852ce13d82cb57078e8390 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Tue, 12 Jan 2016 15:39:14 +0200 Subject: [PATCH 47/61] MAGETWO-47504: USPS January 17, 2016 API Changes - Renamed 'Standard Post' service to 'Retail Ground' - Removed 'Priority Mail Express Flat Rate Boxes' service - Removed 'Priority Mail Express Flat Rate Boxes Hold For Pickup' service - Removed 'Priority Mail Express International Flat Rate Boxes' service --- app/code/Magento/Usps/Helper/Data.php | 3 +-- app/code/Magento/Usps/Model/Carrier.php | 21 +++++++------------ app/code/Magento/Usps/Setup/InstallData.php | 2 +- .../Usps/Test/Unit/Helper/DataTest.php | 3 +-- .../_files/success_usps_response_rates.xml | 2 +- app/code/Magento/Usps/i18n/en_US.csv | 5 +---- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Usps/Helper/Data.php b/app/code/Magento/Usps/Helper/Data.php index 68a126ceb3e14..24631d5c025c3 100644 --- a/app/code/Magento/Usps/Helper/Data.php +++ b/app/code/Magento/Usps/Helper/Data.php @@ -22,7 +22,7 @@ class Data extends AbstractHelper 'usps_1', // Priority Mail 'usps_2', // Priority Mail Express Hold For Pickup 'usps_3', // Priority Mail Express - 'usps_4', // Standard Post + 'usps_4', // Retail Ground 'usps_6', // Media Mail 'usps_INT_1', // Priority Mail Express International 'usps_INT_2', // Priority Mail International @@ -36,7 +36,6 @@ class Data extends AbstractHelper 'usps_INT_14', // First-Class Mail International Large Envelope 'usps_INT_16', // Priority Mail International Small Flat Rate Box 'usps_INT_20', // Priority Mail International Small Flat Rate Envelope - 'usps_INT_26', // Priority Mail Express International Flat Rate Boxes ]; /** diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php index ef722b58a9850..1fdc35eab1393 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -614,7 +614,7 @@ public function getCode($type, $code = '') '1' => __('Priority Mail'), '2' => __('Priority Mail Express Hold For Pickup'), '3' => __('Priority Mail Express'), - '4' => __('Standard Post'), + '4' => __('Retail Ground'), '6' => __('Media Mail'), '7' => __('Library Mail'), '13' => __('Priority Mail Express Flat Rate Envelope'), @@ -649,8 +649,6 @@ public function getCode($type, $code = '') '49' => __('Priority Mail Regional Rate Box B'), '50' => __('Priority Mail Regional Rate Box B Hold For Pickup'), '53' => __('First-Class Package Service Hold For Pickup'), - '55' => __('Priority Mail Express Flat Rate Boxes'), - '56' => __('Priority Mail Express Flat Rate Boxes Hold For Pickup'), '57' => __('Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes'), '58' => __('Priority Mail Regional Rate Box C'), '59' => __('Priority Mail Regional Rate Box C Hold For Pickup'), @@ -682,7 +680,6 @@ public function getCode($type, $code = '') 'INT_23' => __('Priority Mail International Padded Flat Rate Envelope'), 'INT_24' => __('Priority Mail International DVD Flat Rate priced box'), 'INT_25' => __('Priority Mail International Large Video Flat Rate priced box'), - 'INT_26' => __('Priority Mail Express International Flat Rate Boxes'), 'INT_27' => __('Priority Mail Express International Padded Flat Rate Envelope'), ], 'service_to_code' => [ @@ -693,7 +690,7 @@ public function getCode($type, $code = '') '1' => 'Priority', '2' => 'Priority Express', '3' => 'Priority Express', - '4' => 'Standard Post', + '4' => 'Retail Ground', '6' => 'Media', '7' => 'Library', '13' => 'Priority Express', @@ -728,8 +725,6 @@ public function getCode($type, $code = '') '49' => 'Priority', '50' => 'Priority', '53' => 'First Class', - '55' => 'Priority Express', - '56' => 'Priority Express', '57' => 'Priority Express', '58' => 'Priority', '59' => 'Priority', @@ -761,7 +756,6 @@ public function getCode($type, $code = '') 'INT_23' => 'Priority', 'INT_24' => 'Priority', 'INT_25' => 'Priority', - 'INT_26' => 'Priority Express', 'INT_27' => 'Priority Express', ], 'method_to_code' => [ @@ -800,9 +794,7 @@ public function getCode($type, $code = '') 'Priority Mail Small Flat Rate Envelope', 'Priority Mail Small Flat Rate Envelope Hold For Pickup', 'First-Class Package Service Hold For Pickup', - 'Priority Mail Express Flat Rate Boxes', - 'Priority Mail Express Flat Rate Boxes Hold For Pickup', - 'Standard Post', + 'Retail Ground', 'Media Mail', 'First-Class Mail Large Envelope', 'Priority Mail Express Sunday/Holiday Delivery', @@ -894,7 +886,7 @@ public function getCode($type, $code = '') 'method' => [ 'Priority Mail Express', 'Priority Mail', - 'Standard Post', + 'Retail Ground', 'Media Mail', 'Library Mail', 'First-Class Package Service', @@ -917,7 +909,7 @@ public function getCode($type, $code = '') 'method' => [ 'Priority Mail Express', 'Priority Mail', - 'Standard Post', + 'Retail Ground', 'Media Mail', 'Library Mail', ], @@ -1489,7 +1481,8 @@ protected function _formUsSignatureConfirmationShipmentRequest(\Magento\Framewor break; case 'STANDARD': case 'Standard Post': - $serviceType = 'Standard Post'; + case 'Retail Ground': + $serviceType = 'Retail Ground'; break; case 'MEDIA': case 'Media': diff --git a/app/code/Magento/Usps/Setup/InstallData.php b/app/code/Magento/Usps/Setup/InstallData.php index 71385fcbea097..234d036a2ee7f 100644 --- a/app/code/Magento/Usps/Setup/InstallData.php +++ b/app/code/Magento/Usps/Setup/InstallData.php @@ -40,7 +40,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface 'First-Class Mail Parcel' => '0_FCP', 'First-Class Mail Package' => '0_FCP', 'Parcel Post' => '4', - 'Standard Post' => '4', + 'Retail Ground' => '4', 'Media Mail' => '6', 'Library Mail' => '7', 'Express Mail' => '3', diff --git a/app/code/Magento/Usps/Test/Unit/Helper/DataTest.php b/app/code/Magento/Usps/Test/Unit/Helper/DataTest.php index dec567c7c188a..d4fb8ffc05457 100644 --- a/app/code/Magento/Usps/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Usps/Test/Unit/Helper/DataTest.php @@ -49,7 +49,7 @@ public function shippingMethodDataProvider() ['usps_1'], // Priority Mail ['usps_2'], // Priority Mail Express Hold For Pickup ['usps_3'], // Priority Mail Express - ['usps_4'], // Standard Post + ['usps_4'], // Retail Ground ['usps_6'], // Media Mail ['usps_INT_1'], // Priority Mail Express International ['usps_INT_2'], // Priority Mail International @@ -63,7 +63,6 @@ public function shippingMethodDataProvider() ['usps_INT_14'], // First-Class Mail International Large Envelope ['usps_INT_16'], // Priority Mail International Small Flat Rate Box ['usps_INT_20'], // Priority Mail International Small Flat Rate Envelope - ['usps_INT_26'] // Priority Mail Express International Flat Rate Boxes ]; } } diff --git a/app/code/Magento/Usps/Test/Unit/Model/_files/success_usps_response_rates.xml b/app/code/Magento/Usps/Test/Unit/Model/_files/success_usps_response_rates.xml index cac9563b6579a..42c640752a355 100644 --- a/app/code/Magento/Usps/Test/Unit/Model/_files/success_usps_response_rates.xml +++ b/app/code/Magento/Usps/Test/Unit/Model/_files/success_usps_response_rates.xml @@ -138,7 +138,7 @@ 5.60 - Standard Post&lt;sup&gt;&#174;&lt;/sup&gt; + Retail Ground&lt;sup&gt;&#174;&lt;/sup&gt; 8.85 diff --git a/app/code/Magento/Usps/i18n/en_US.csv b/app/code/Magento/Usps/i18n/en_US.csv index 9ae0b37ee41ec..d5043c9f78bbf 100644 --- a/app/code/Magento/Usps/i18n/en_US.csv +++ b/app/code/Magento/Usps/i18n/en_US.csv @@ -28,7 +28,7 @@ Length,Length "Priority Mail","Priority Mail" "Priority Mail Express Hold For Pickup","Priority Mail Express Hold For Pickup" "Priority Mail Express","Priority Mail Express" -"Standard Post","Standard Post" +"Retail Ground","Retail Ground" "Media Mail","Media Mail" "Library Mail","Library Mail" "Priority Mail Express Flat Rate Envelope","Priority Mail Express Flat Rate Envelope" @@ -63,8 +63,6 @@ Length,Length "Priority Mail Regional Rate Box B","Priority Mail Regional Rate Box B" "Priority Mail Regional Rate Box B Hold For Pickup","Priority Mail Regional Rate Box B Hold For Pickup" "First-Class Package Service Hold For Pickup","First-Class Package Service Hold For Pickup" -"Priority Mail Express Flat Rate Boxes","Priority Mail Express Flat Rate Boxes" -"Priority Mail Express Flat Rate Boxes Hold For Pickup","Priority Mail Express Flat Rate Boxes Hold For Pickup" "Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes","Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes" "Priority Mail Regional Rate Box C","Priority Mail Regional Rate Box C" "Priority Mail Regional Rate Box C Hold For Pickup","Priority Mail Regional Rate Box C Hold For Pickup" @@ -96,7 +94,6 @@ Length,Length "Priority Mail International Padded Flat Rate Envelope","Priority Mail International Padded Flat Rate Envelope" "Priority Mail International DVD Flat Rate priced box","Priority Mail International DVD Flat Rate priced box" "Priority Mail International Large Video Flat Rate priced box","Priority Mail International Large Video Flat Rate priced box" -"Priority Mail Express International Flat Rate Boxes","Priority Mail Express International Flat Rate Boxes" "Priority Mail Express International Padded Flat Rate Envelope","Priority Mail Express International Padded Flat Rate Envelope" Letter,Letter Flat,Flat From 17286a9131af94c948d4dcc4911599ea08654752 Mon Sep 17 00:00:00 2001 From: Yaroslav Voronoy Date: Sat, 16 Jan 2016 17:28:51 +0200 Subject: [PATCH 48/61] MAGETWO-47504: USPS January 17, 2016 API Changes Conflicts: CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 944d64d550670..496929a747971 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * Fixed a potential vulnerability on checkout page * Fixed an issue with upload empty file to custom option * Fixed an issue with performance on customer edit form + * USPS January 17, 2016 API Changes * Fixed an issue plugin incorrect calls when proxy exists * Fixed an issue when travis CI builds fail due to authentication * Fixed an issue when custom options calculated incorrect for configurable products @@ -19,7 +20,7 @@ * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes - + 2.0.0 ============= * Fixed bugs: From 51947d671ef8c57d8fcb7998697d191572a2201c Mon Sep 17 00:00:00 2001 From: "Partica, Cristian" Date: Tue, 29 Dec 2015 13:00:35 -0600 Subject: [PATCH 49/61] MAGETWO-47440: [GITHUB-2471] Incorrect prices on configurable product page when catalog prices include tax - price was adjusted twice, fixed by getting the non adjusted price because it's being adjusted afterwards --- .../ConfigurableProduct/Pricing/Price/FinalPriceResolver.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Pricing/Price/FinalPriceResolver.php b/app/code/Magento/ConfigurableProduct/Pricing/Price/FinalPriceResolver.php index cc3f33a5f302c..e837fac0f1cf9 100644 --- a/app/code/Magento/ConfigurableProduct/Pricing/Price/FinalPriceResolver.php +++ b/app/code/Magento/ConfigurableProduct/Pricing/Price/FinalPriceResolver.php @@ -16,7 +16,6 @@ class FinalPriceResolver implements PriceResolverInterface */ public function resolvePrice(\Magento\Framework\Pricing\SaleableInterface $product) { - return $product->getPriceInfo()->getPrice(CatalogFinalPrice::PRICE_CODE) - ->getAmount()->getBaseAmount(); + return $product->getPriceInfo()->getPrice(CatalogFinalPrice::PRICE_CODE)->getValue(); } } From e56510062643d4a2ea5e1778b3f1b8b0c3f25589 Mon Sep 17 00:00:00 2001 From: Michail Slabko Date: Wed, 23 Dec 2015 14:20:44 +0200 Subject: [PATCH 50/61] MAGETWO-47267: URL Rewrites do not work for products accessed via category landing pages --- app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml | 3 --- app/code/Magento/CatalogUrlRewrite/etc/di.xml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml b/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml index bfe126bbae028..ddc0ec22cd390 100644 --- a/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/di.xml @@ -16,9 +16,6 @@ - - - diff --git a/app/code/Magento/CatalogUrlRewrite/etc/di.xml b/app/code/Magento/CatalogUrlRewrite/etc/di.xml index eab00485dd403..8a8da1c5fb24d 100644 --- a/app/code/Magento/CatalogUrlRewrite/etc/di.xml +++ b/app/code/Magento/CatalogUrlRewrite/etc/di.xml @@ -20,4 +20,7 @@ + + + From f722aef2b3b62fb5017410e5749d93f8df82ad53 Mon Sep 17 00:00:00 2001 From: Yaroslav Voronoy Date: Sun, 17 Jan 2016 16:07:28 +0200 Subject: [PATCH 51/61] MAGETWO-47267: URL Rewrites do not work for products accessed via category landing pages Conflicts: CHANGELOG.md --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 496929a747971..d1f4432a37d38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,34 @@ * Fixed an issue when custom options calculated incorrect for configurable products * Fixed an issue with changing category form on store view level * Updated composer version in braintree package + * Fixed an issue where URL rewrites works incorrect for sample data + * Fixed an issue with BaseURL in static files + * Fixed an issue where customer custom attribute of 'file' type isn't supported by UI Form Component + * Fixed an issue when bin/magento setup:upgrade does not clear cache properly + * Fixed an issue where MessageBox plugin duplicating logic + * Fixed an issue where unnecessary StoreCookie plugin is executed on each request + * Fixed a potential security issue in input filter + * Fixed an issue where category creation from product page fails if google experiments enabled + * Fixed a potential security issue with frontend captcha + * Fixed a potential security issue with block cache + * Fixed an issue where information about selected country in address is not presented on checkout flow + * Fixed an issue where customer segments prevent page from caching + * Fixed an performance issue related to swatch module + * Fixed an issue where import product with replace behaviour causes an error for multistore + * Fixed an issue with validation of url_key during import + * Fixed an issue with "Learn More" link for Payments Pro goes to Payflow Pro +Tests: + * Fixed an issue with test failure in testGetPackagesForUpdate + * Fixed integration tests related to setup/upgrade functionality + * Fixed an issue where PHP7 Integration test failed + * Fixed an issue with autoload functionality for jmx-generator.php file + * Fixed an issue with legacy tests * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes + * [#2471](https://github.com/magento/magento2/issues/2471) -- Fixed an issue with incorrect prices on configurable product page when catalog prices include tax + * [#2674](https://github.com/magento/magento2/issues/2674) -- Fixed an issue where plugins/interceptors don't work with early stage single instance objects + * [#2888](https://github.com/magento/magento2/issues/2888) -- Fixed an issue where not all files are pre-compiled 2.0.0 ============= From a0ed5ec37da12dcc644009251fe83d0a407237e0 Mon Sep 17 00:00:00 2001 From: Yaroslav Voronoy Date: Sat, 16 Jan 2016 15:37:29 +0200 Subject: [PATCH 52/61] MAGETWO-45594: XSS code still can be saved into database Conflicts: CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f4432a37d38..f366fcdb852a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ * Fixed a potential vulnerability on checkout page * Fixed an issue with upload empty file to custom option * Fixed an issue with performance on customer edit form + * Fixed an issue where minicart does not clears after completing an order via PayPal + * Fixed an potential XSS vulnerability * USPS January 17, 2016 API Changes * Fixed an issue plugin incorrect calls when proxy exists * Fixed an issue when travis CI builds fail due to authentication From 213f169984758c470f5139398deea4970ebdd24a Mon Sep 17 00:00:00 2001 From: Alexander Makeev Date: Tue, 22 Dec 2015 15:58:17 +0000 Subject: [PATCH 53/61] MAGETWO-45594: XSS code still can be saved into database - Removed html tags - Added check to returnUrl action --- .../Magento/Paypal/Controller/Payflow.php | 2 + .../Paypal/Controller/Payflow/ReturnUrl.php | 46 +++++++++++++++++-- .../Controller/Payflowadvanced/ReturnUrl.php | 10 ++++ app/code/Magento/Paypal/i18n/en_US.csv | 1 + 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Paypal/Controller/Payflow.php b/app/code/Magento/Paypal/Controller/Payflow.php index d4a6be5f4f18d..d475c59cc0092 100644 --- a/app/code/Magento/Paypal/Controller/Payflow.php +++ b/app/code/Magento/Paypal/Controller/Payflow.php @@ -73,6 +73,8 @@ public function __construct( */ protected function _cancelPayment($errorMsg = '') { + $errorMsg = trim(strip_tags($errorMsg)); + $gotoSection = false; $this->_checkoutHelper->cancelCurrentOrder($errorMsg); if ($this->_checkoutSession->restoreQuote()) { diff --git a/app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php b/app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php index 1907a07045f39..4318b6b2ed785 100644 --- a/app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php +++ b/app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php @@ -7,6 +7,7 @@ namespace Magento\Paypal\Controller\Payflow; use Magento\Paypal\Controller\Payflow; +use Magento\Paypal\Model\Config; use Magento\Sales\Model\Order; class ReturnUrl extends Payflow @@ -19,6 +20,15 @@ class ReturnUrl extends Payflow Order::STATE_COMPLETE, ]; + /** + * Payment method code + * @var string + */ + protected $allowedPaymentMethodCodes = [ + Config::METHOD_PAYFLOWPRO, + Config::METHOD_PAYFLOWLINK + ]; + /** * When a customer return to website from payflow gateway. * @@ -35,16 +45,44 @@ public function execute() $order = $this->_orderFactory->create()->loadByIncrementId($this->_checkoutSession->getLastRealOrderId()); if ($order->getIncrementId()) { - if (in_array($order->getState(), $this->allowedOrderStates)) { + if ($this->checkOrderState($order)) { $redirectBlock->setData('goto_success_page', true); } else { - $gotoSection = $this->_cancelPayment(strval($this->getRequest()->getParam('RESPMSG'))); - $redirectBlock->setData('goto_section', $gotoSection); - $redirectBlock->setData('error_msg', __('Your payment has been declined. Please try again.')); + if ($this->checkPaymentMethod($order)) { + $gotoSection = $this->_cancelPayment(strval($this->getRequest()->getParam('RESPMSG'))); + $redirectBlock->setData('goto_section', $gotoSection); + $redirectBlock->setData('error_msg', __('Your payment has been declined. Please try again.')); + } else { + $redirectBlock->setData('goto_section', false); + $redirectBlock->setData('error_msg', __('Requested payment method does not match with order.')); + } } } } $this->_view->renderLayout(); } + + /** + * Check order state + * + * @param Order $order + * @return bool + */ + protected function checkOrderState(Order $order) + { + return in_array($order->getState(), $this->allowedOrderStates); + } + + /** + * Check requested payment method + * + * @param Order $order + * @return bool + */ + protected function checkPaymentMethod(Order $order) + { + $payment = $order->getPayment(); + return in_array($payment->getMethod(), $this->allowedPaymentMethodCodes); + } } diff --git a/app/code/Magento/Paypal/Controller/Payflowadvanced/ReturnUrl.php b/app/code/Magento/Paypal/Controller/Payflowadvanced/ReturnUrl.php index f65daf805eee4..3f2c4ead5be61 100644 --- a/app/code/Magento/Paypal/Controller/Payflowadvanced/ReturnUrl.php +++ b/app/code/Magento/Paypal/Controller/Payflowadvanced/ReturnUrl.php @@ -6,6 +6,8 @@ */ namespace Magento\Paypal\Controller\Payflowadvanced; +use Magento\Paypal\Model\Config; + class ReturnUrl extends \Magento\Paypal\Controller\Payflow\ReturnUrl { /** @@ -13,4 +15,12 @@ class ReturnUrl extends \Magento\Paypal\Controller\Payflow\ReturnUrl * @var string */ protected $_redirectBlockName = 'payflow.advanced.iframe'; + + /** + * Payment method code + * @var string + */ + protected $allowedPaymentMethodCodes = [ + Config::METHOD_PAYFLOWADVANCED + ]; } diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv index c13c7ac0ce277..a999a5624158c 100644 --- a/app/code/Magento/Paypal/i18n/en_US.csv +++ b/app/code/Magento/Paypal/i18n/en_US.csv @@ -693,3 +693,4 @@ unverified,unverified Eligible,Eligible Ineligible,Inligible "PayPal Express Checkout","PayPal Express Checkout" +"Requested payment method does not match with order.","Requested payment method does not match with order." From 568df20cb8fd77d9243a53a773f411bd1af0416a Mon Sep 17 00:00:00 2001 From: Alexander Makeev Date: Mon, 28 Dec 2015 14:00:14 +0000 Subject: [PATCH 54/61] MAGETWO-45594: XSS code still can be saved into database - Added unit test --- .../Unit/Controller/Payflow/ReturnUrlTest.php | 320 +++++++++++++----- 1 file changed, 240 insertions(+), 80 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php index 96a45ab4cfb23..ee2a6447effd9 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php @@ -12,9 +12,15 @@ use Magento\Framework\App\View; use Magento\Framework\View\LayoutInterface; use Magento\Paypal\Controller\Payflow\ReturnUrl; +use Magento\Paypal\Controller\Payflowadvanced\ReturnUrl as PayflowadvancedReturnUrl; use Magento\Paypal\Helper\Checkout; use Magento\Sales\Model\Order; +use Magento\Sales\Model\Order\Payment; use Psr\Log\LoggerInterface; +use Magento\Paypal\Model\Config; +use Magento\Framework\App\Action\Context; +use Magento\Sales\Model\OrderFactory; +use Magento\Paypal\Model\PayflowlinkFactory; /** * Class ReturnUrlTest @@ -29,7 +35,7 @@ class ReturnUrlTest extends \PHPUnit_Framework_TestCase protected $returnUrl; /** - * @var \Magento\Framework\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + * @var Context|\PHPUnit_Framework_MockObject_MockObject */ protected $contextMock; @@ -49,12 +55,12 @@ class ReturnUrlTest extends \PHPUnit_Framework_TestCase protected $checkoutSessionMock; /** - * @var \Magento\Sales\Model\OrderFactory|\PHPUnit_Framework_MockObject_MockObject + * @var OrderFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $orderFactoryMock; /** - * @var \Magento\Paypal\Model\PayflowlinkFactory|\PHPUnit_Framework_MockObject_MockObject + * @var PayflowlinkFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $payflowlinkFactoryMock; @@ -83,31 +89,44 @@ class ReturnUrlTest extends \PHPUnit_Framework_TestCase */ protected $orderMock; + /** + * @var Payment|\PHPUnit_Framework_MockObject_MockObject + */ + protected $paymentMock; + + const LAST_REAL_ORDER_ID = '000000001'; + protected function setUp() { - $this->contextMock = $this->getMock('Magento\Framework\App\Action\Context', [], [], '', false); - $this->viewMock = $this->getMock('Magento\Framework\App\ViewInterface'); - $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); - $this->layoutMock = $this->getMock('Magento\Framework\View\LayoutInterface'); + $this->contextMock = $this->getMock(Context::class, [], [], '', false); + $this->viewMock = $this->getMock(ViewInterface::class, ['loadLayout', 'getLayout', 'renderLayout']); + $this->requestMock = $this->getMock(Http::class, ['getParam'], [], '', false); + $this->layoutMock = $this->getMock(LayoutInterface::class); $this->blockMock = $this - ->getMockBuilder('\Magento\Checkout\Block\Onepage\Success') + ->getMockBuilder(Success::class) ->disableOriginalConstructor() ->getMock(); - $this->orderFactoryMock = $this->getMock('\Magento\Sales\Model\OrderFactory', ['create'], [], '', false); - $this->payflowlinkFactoryMock = $this->getMock('\Magento\Paypal\Model\PayflowlinkFactory', [], [], '', false); - $this->helperCheckoutMock = $this->getMock('\Magento\Paypal\Helper\Checkout', [], [], '', false); - $this->loggerMock = $this->getMockForAbstractClass('\Psr\Log\LoggerInterface'); + $this->orderFactoryMock = $this->getMock(OrderFactory::class, ['create'], [], '', false); + $this->payflowlinkFactoryMock = $this->getMock(PayflowlinkFactory::class, [], [], '', false); + $this->helperCheckoutMock = $this->getMock(Checkout::class, ['cancelCurrentOrder'], [], '', false); + $this->loggerMock = $this->getMockForAbstractClass(LoggerInterface::class); $this->orderMock = $this - ->getMockBuilder('\Magento\Sales\Model\Order') + ->getMockBuilder(Order::class) + ->disableOriginalConstructor() + ->getMock(); + $this->paymentMock = $this + ->getMockBuilder(Payment::class) ->disableOriginalConstructor() ->getMock(); + $this->orderMock->expects($this->any())->method('getPayment')->will($this->returnValue($this->paymentMock)); + $this->checkoutSessionMock = $this - ->getMockBuilder('\Magento\Checkout\Model\Session') + ->getMockBuilder(Session::class) ->setMethods(['getLastRealOrderId', 'getLastRealOrder', 'restoreQuote']) ->disableOriginalConstructor() ->getMock(); - $this->contextMock->expects($this->once())->method('getView')->will($this->returnValue($this->viewMock)); + $this->contextMock->expects($this->any())->method('getView')->will($this->returnValue($this->viewMock)); $this->contextMock->expects($this->any())->method('getRequest')->will($this->returnValue($this->requestMock)); $this->returnUrl = new ReturnUrl( @@ -123,7 +142,7 @@ protected function setUp() /** * @return array */ - public function testAllowedOrderStateDataProvider() + public function allowedOrderStateDataProvider() { return [ [Order::STATE_PROCESSING], @@ -134,7 +153,7 @@ public function testAllowedOrderStateDataProvider() /** * @return array */ - public function testNotAllowedOrderStateDataProvider() + public function notAllowedOrderStateDataProvider() { return [ [Order::STATE_NEW, false, ''], @@ -154,47 +173,21 @@ public function testNotAllowedOrderStateDataProvider() /** * @param $state - * @dataProvider testAllowedOrderStateDataProvider + * @dataProvider allowedOrderStateDataProvider */ public function testExecuteAllowedOrderState($state) { - $lastRealOrderId = '000000001'; + $this->initLayoutMock(); + $this->initOrderMock(self::LAST_REAL_ORDER_ID, $state); - $this->viewMock - ->expects($this->once()) - ->method('getLayout') - ->will($this->returnValue($this->layoutMock)); - - $this->layoutMock - ->expects($this->once()) - ->method('getBlock') - ->will($this->returnValue($this->blockMock)); + $this->requestMock + ->expects($this->never()) + ->method('getParam'); $this->checkoutSessionMock ->expects($this->exactly(2)) ->method('getLastRealOrderId') - ->will($this->returnValue($lastRealOrderId)); - - $this->orderFactoryMock - ->expects($this->once()) - ->method('create') - ->will($this->returnValue($this->orderMock)); - - $this->orderMock - ->expects($this->once()) - ->method('loadByIncrementId') - ->with($lastRealOrderId) - ->will($this->returnSelf()); - - $this->orderMock - ->expects($this->once()) - ->method('getIncrementId') - ->will($this->returnValue($lastRealOrderId)); - - $this->orderMock - ->expects($this->once()) - ->method('getState') - ->will($this->returnValue($state)); + ->will($this->returnValue(self::LAST_REAL_ORDER_ID)); $this->blockMock ->expects($this->once()) @@ -202,6 +195,10 @@ public function testExecuteAllowedOrderState($state) ->with('goto_success_page', true) ->will($this->returnSelf()); + $this->paymentMock + ->expects($this->never()) + ->method('getMethod'); + $this->returnUrl->execute(); } @@ -209,36 +206,172 @@ public function testExecuteAllowedOrderState($state) * @param $state * @param $restoreQuote * @param $expectedGotoSection - * @dataProvider testNotAllowedOrderStateDataProvider + * @dataProvider notAllowedOrderStateDataProvider */ public function testExecuteNotAllowedOrderState($state, $restoreQuote, $expectedGotoSection) { - $lastRealOrderId = '000000001'; - $this->viewMock + $this->initLayoutMock(); + $this->initOrderMock(self::LAST_REAL_ORDER_ID, $state); + $this->initCheckoutSessionMock(self::LAST_REAL_ORDER_ID, $restoreQuote); + + $this->requestMock ->expects($this->once()) - ->method('getLayout') - ->will($this->returnValue($this->layoutMock)); + ->method('getParam') + ->with('RESPMSG') + ->will($this->returnValue('message')); - $this->layoutMock + $this->blockMock + ->expects($this->at(0)) + ->method('setData') + ->with('goto_section', $expectedGotoSection) + ->will($this->returnSelf()); + + $this->blockMock + ->expects($this->at(1)) + ->method('setData') + ->with('error_msg', __('Your payment has been declined. Please try again.')) + ->will($this->returnSelf()); + + $this->paymentMock ->expects($this->once()) - ->method('getBlock') - ->will($this->returnValue($this->blockMock)); + ->method('getMethod') + ->will($this->returnValue(Config::METHOD_PAYFLOWLINK)); + + $this->returnUrl->execute(); + } + + public function testCheckRejectByPaymentMethod() + { + $this->initLayoutMock(); + $this->initOrderMock(self::LAST_REAL_ORDER_ID, Order::STATE_NEW); + + $this->requestMock + ->expects($this->never()) + ->method('getParam'); $this->checkoutSessionMock ->expects($this->any()) ->method('getLastRealOrderId') - ->will($this->returnValue($lastRealOrderId)); + ->will($this->returnValue(self::LAST_REAL_ORDER_ID)); - $this->checkoutSessionMock - ->expects($this->any()) - ->method('getLastRealOrder') - ->will($this->returnValue($this->orderMock)); + $this->blockMock + ->expects($this->at(0)) + ->method('setData') + ->with('goto_section', false) + ->will($this->returnSelf()); - $this->checkoutSessionMock - ->expects($this->any()) - ->method('restoreQuote') - ->will($this->returnValue($restoreQuote)); + $this->blockMock + ->expects($this->at(1)) + ->method('setData') + ->with('error_msg', __('Requested payment method does not match with order.')) + ->will($this->returnSelf()); + + $this->paymentMock + ->expects($this->once()) + ->method('getMethod') + ->will($this->returnValue('something_else')); + + $this->returnUrl->execute(); + } + + /** + * @return array + */ + public function checkXSSEscapedDataProvider() + { + return [ + ['simple', 'simple'], + ['', 'alert(1)'], + ['
', ''] + ]; + } + + /** + * @param $errorMsg + * @param $errorMsgEscaped + * @dataProvider checkXSSEscapedDataProvider + */ + public function testCheckXSSEscaped($errorMsg, $errorMsgEscaped) + { + $this->initLayoutMock(); + $this->initOrderMock(self::LAST_REAL_ORDER_ID, Order::STATE_NEW); + $this->initCheckoutSessionMock(self::LAST_REAL_ORDER_ID, true); + + $this->requestMock + ->expects($this->once()) + ->method('getParam') + ->with('RESPMSG') + ->will($this->returnValue($errorMsg)); + + $this->helperCheckoutMock + ->expects($this->once()) + ->method('cancelCurrentOrder') + ->with($errorMsgEscaped) + ->will($this->returnValue(self::LAST_REAL_ORDER_ID)); + + $this->blockMock + ->expects($this->at(0)) + ->method('setData') + ->with('goto_section', 'paymentMethod') + ->will($this->returnSelf()); + + $this->blockMock + ->expects($this->at(1)) + ->method('setData') + ->with('error_msg', __('Your payment has been declined. Please try again.')) + ->will($this->returnSelf()); + + $this->paymentMock + ->expects($this->once()) + ->method('getMethod') + ->will($this->returnValue(Config::METHOD_PAYFLOWLINK)); + + $this->returnUrl->execute(); + } + + public function testCheckAdvancedAcceptingByPaymentMethod() + { + $this->initLayoutMock(); + $this->initOrderMock(self::LAST_REAL_ORDER_ID, Order::STATE_NEW); + $this->initCheckoutSessionMock(self::LAST_REAL_ORDER_ID, true); + + $this->requestMock + ->expects($this->once()) + ->method('getParam') + ->with('RESPMSG') + ->will($this->returnValue('message')); + + $this->blockMock + ->expects($this->at(0)) + ->method('setData') + ->with('goto_section', 'paymentMethod') + ->will($this->returnSelf()); + + $this->blockMock + ->expects($this->at(1)) + ->method('setData') + ->with('error_msg', __('Your payment has been declined. Please try again.')) + ->will($this->returnSelf()); + + $this->paymentMock + ->expects($this->once()) + ->method('getMethod') + ->will($this->returnValue(Config::METHOD_PAYFLOWADVANCED)); + + $payflowadvancedReturnUrl = new PayflowadvancedReturnUrl( + $this->contextMock, + $this->checkoutSessionMock, + $this->orderFactoryMock, + $this->payflowlinkFactoryMock, + $this->helperCheckoutMock, + $this->loggerMock + ); + + $payflowadvancedReturnUrl->execute(); + } + private function initOrderMock($orderId, $state) + { $this->orderFactoryMock ->expects($this->any()) ->method('create') @@ -247,31 +380,58 @@ public function testExecuteNotAllowedOrderState($state, $restoreQuote, $expected $this->orderMock ->expects($this->once()) ->method('loadByIncrementId') - ->with($lastRealOrderId) + ->with($orderId) ->will($this->returnSelf()); $this->orderMock ->expects($this->once()) ->method('getIncrementId') - ->will($this->returnValue($lastRealOrderId)); + ->will($this->returnValue($orderId)); $this->orderMock ->expects($this->once()) ->method('getState') ->will($this->returnValue($state)); + } - $this->blockMock - ->expects($this->at(0)) - ->method('setData') - ->with('goto_section', $expectedGotoSection) - ->will($this->returnSelf()); + private function initLayoutMock() + { + $this->viewMock + ->expects($this->once()) + ->method('getLayout') + ->will($this->returnValue($this->layoutMock)); - $this->blockMock - ->expects($this->at(1)) - ->method('setData') - ->with('error_msg', __('Your payment has been declined. Please try again.')) - ->will($this->returnSelf()); + $this->viewMock + ->expects($this->once()) + ->method('loadLayout') + ->willReturnSelf(); - $this->returnUrl->execute(); + $this->viewMock + ->expects($this->once()) + ->method('renderLayout') + ->willReturnSelf(); + + $this->layoutMock + ->expects($this->once()) + ->method('getBlock') + ->will($this->returnValue($this->blockMock)); + } + + private function initCheckoutSessionMock($orderId, $restoreQuote) + { + $this->checkoutSessionMock + ->expects($this->any()) + ->method('getLastRealOrderId') + ->will($this->returnValue($orderId)); + + $this->checkoutSessionMock + ->expects($this->any()) + ->method('getLastRealOrder') + ->will($this->returnValue($this->orderMock)); + + $this->checkoutSessionMock + ->expects($this->any()) + ->method('restoreQuote') + ->will($this->returnValue($restoreQuote)); } } From 8ea35854837850ccfb4bbc55e64da3d0faf98c61 Mon Sep 17 00:00:00 2001 From: Alexander Makeev Date: Tue, 29 Dec 2015 13:41:13 +0000 Subject: [PATCH 55/61] MAGETWO-45594: XSS code still can be saved into database - Added templates for redirect --- .../templates/payflowadvanced/iframe.phtml | 15 +++++++++++++++ .../frontend/templates/payflowlink/iframe.phtml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml create mode 100644 app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml new file mode 100644 index 0000000000000..06f7bbe5ce888 --- /dev/null +++ b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml @@ -0,0 +1,15 @@ + +
+
escapeHtml(__('Please do not refresh the page until you complete payment.')); ?>
+
+ diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml new file mode 100644 index 0000000000000..06f7bbe5ce888 --- /dev/null +++ b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml @@ -0,0 +1,15 @@ + +
+
escapeHtml(__('Please do not refresh the page until you complete payment.')); ?>
+
+ From a88c7cf5dec8b81549a2619827cdb160227414ab Mon Sep 17 00:00:00 2001 From: Alexander Makeev Date: Tue, 29 Dec 2015 14:11:57 +0000 Subject: [PATCH 56/61] MAGETWO-45594: XSS code still can be saved into database - Fixed bug in iframe constructor --- app/code/Magento/Paypal/Block/Iframe.php | 2 +- .../templates/payflowadvanced/iframe.phtml | 15 --------------- .../frontend/templates/payflowlink/iframe.phtml | 15 --------------- 3 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml delete mode 100644 app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index 8cbc45586c369..e8438c9cc3fea 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -89,10 +89,10 @@ public function __construct( $this->_hssHelper = $hssHelper; $this->_orderFactory = $orderFactory; $this->_checkoutSession = $checkoutSession; - parent::__construct($context, $data); $this->_isScopePrivate = true; $this->readFactory = $readFactory; $this->reader = $reader; + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml deleted file mode 100644 index 06f7bbe5ce888..0000000000000 --- a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml +++ /dev/null @@ -1,15 +0,0 @@ - -
-
escapeHtml(__('Please do not refresh the page until you complete payment.')); ?>
-
- diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml deleted file mode 100644 index 06f7bbe5ce888..0000000000000 --- a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml +++ /dev/null @@ -1,15 +0,0 @@ - -
-
escapeHtml(__('Please do not refresh the page until you complete payment.')); ?>
-
- From cc141ac903356aa3d8dc9da1a1bf6eadd26a00da Mon Sep 17 00:00:00 2001 From: "Yushkin, Dmytro" Date: Thu, 14 Jan 2016 12:22:38 +0200 Subject: [PATCH 57/61] MAGETWO-45594: XSS code still can be saved into database - Fix by static tests --- .../Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php index ee2a6447effd9..19f3623d4fa19 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php @@ -10,6 +10,7 @@ use Magento\Checkout\Model\Session; use Magento\Framework\App\Http; use Magento\Framework\App\View; +use Magento\Framework\App\ViewInterface; use Magento\Framework\View\LayoutInterface; use Magento\Paypal\Controller\Payflow\ReturnUrl; use Magento\Paypal\Controller\Payflowadvanced\ReturnUrl as PayflowadvancedReturnUrl; @@ -99,7 +100,7 @@ class ReturnUrlTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->contextMock = $this->getMock(Context::class, [], [], '', false); - $this->viewMock = $this->getMock(ViewInterface::class, ['loadLayout', 'getLayout', 'renderLayout']); + $this->viewMock = $this->getMock(ViewInterface::class); $this->requestMock = $this->getMock(Http::class, ['getParam'], [], '', false); $this->layoutMock = $this->getMock(LayoutInterface::class); $this->blockMock = $this From 1bcea1551a1c804b2f45dcf8efd31dd847839b54 Mon Sep 17 00:00:00 2001 From: Ievgen Shakhsuvarov Date: Thu, 19 Nov 2015 16:13:38 +0200 Subject: [PATCH 58/61] MAGETWO-42103: Minicart does not clear after completing an order via Paypal --- app/code/Magento/Paypal/etc/frontend/sections.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Paypal/etc/frontend/sections.xml b/app/code/Magento/Paypal/etc/frontend/sections.xml index 1a298d44576f9..2f4e672303e2d 100644 --- a/app/code/Magento/Paypal/etc/frontend/sections.xml +++ b/app/code/Magento/Paypal/etc/frontend/sections.xml @@ -11,4 +11,8 @@
+ +
+
+ From bc35b71759ad74bcef1293707e581b1de2ba8158 Mon Sep 17 00:00:00 2001 From: Yaroslav Voronoy Date: Sun, 17 Jan 2016 16:56:14 +0200 Subject: [PATCH 59/61] MAGETWO-45594: XSS code still can be saved into database --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f366fcdb852a9..c1cc00631275e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,12 +35,14 @@ * Fixed an issue where import product with replace behaviour causes an error for multistore * Fixed an issue with validation of url_key during import * Fixed an issue with "Learn More" link for Payments Pro goes to Payflow Pro + * Fixed an issue with JS error appears if loading product grid after clean cache and static files Tests: * Fixed an issue with test failure in testGetPackagesForUpdate * Fixed integration tests related to setup/upgrade functionality * Fixed an issue where PHP7 Integration test failed * Fixed an issue with autoload functionality for jmx-generator.php file * Fixed an issue with legacy tests + * Fixed an issues in tests related to PHP7 * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes From 4b41db4db82072b9b43c5dfc3e6a442ba61f7c0c Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Tue, 19 Jan 2016 10:09:57 -0600 Subject: [PATCH 60/61] MAGETWO-47956: Magento 2.0.1 Publication - update CHANGELOG.md --- CHANGELOG.md | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1cc00631275e..585e6e9b5294f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,54 +1,39 @@ 2.0.1 ============= * Fixed bugs: - * Fixed an issue where can't deploy sample data after "composer create-project" - * Fixed a security issue on user account page - * Fixed a security issue on product page + * Fixed an issue where can't deploy sample data after "composer create-project * Fixed an issue where possible edit someone else reviews * Fixed an issue where possible view order details for certain orders * Fixed an issue where catalog price rule isn't applied to product created using Web API - * Fixed a potential vulnerability where possible insert SQL injection - * Fixed a potential vulnerability on checkout page * Fixed an issue with upload empty file to custom option - * Fixed an issue with performance on customer edit form * Fixed an issue where minicart does not clears after completing an order via PayPal - * Fixed an potential XSS vulnerability - * USPS January 17, 2016 API Changes * Fixed an issue plugin incorrect calls when proxy exists * Fixed an issue when travis CI builds fail due to authentication * Fixed an issue when custom options calculated incorrect for configurable products * Fixed an issue with changing category form on store view level - * Updated composer version in braintree package * Fixed an issue where URL rewrites works incorrect for sample data * Fixed an issue with BaseURL in static files * Fixed an issue where customer custom attribute of 'file' type isn't supported by UI Form Component * Fixed an issue when bin/magento setup:upgrade does not clear cache properly - * Fixed an issue where MessageBox plugin duplicating logic - * Fixed an issue where unnecessary StoreCookie plugin is executed on each request - * Fixed a potential security issue in input filter * Fixed an issue where category creation from product page fails if google experiments enabled - * Fixed a potential security issue with frontend captcha - * Fixed a potential security issue with block cache * Fixed an issue where information about selected country in address is not presented on checkout flow * Fixed an issue where customer segments prevent page from caching - * Fixed an performance issue related to swatch module * Fixed an issue where import product with replace behaviour causes an error for multistore * Fixed an issue with validation of url_key during import * Fixed an issue with "Learn More" link for Payments Pro goes to Payflow Pro * Fixed an issue with JS error appears if loading product grid after clean cache and static files -Tests: - * Fixed an issue with test failure in testGetPackagesForUpdate - * Fixed integration tests related to setup/upgrade functionality - * Fixed an issue where PHP7 Integration test failed - * Fixed an issue with autoload functionality for jmx-generator.php file - * Fixed an issue with legacy tests - * Fixed an issues in tests related to PHP7 * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes * [#2471](https://github.com/magento/magento2/issues/2471) -- Fixed an issue with incorrect prices on configurable product page when catalog prices include tax * [#2674](https://github.com/magento/magento2/issues/2674) -- Fixed an issue where plugins/interceptors don't work with early stage single instance objects * [#2888](https://github.com/magento/magento2/issues/2888) -- Fixed an issue where not all files are pre-compiled +* Various improvements: + * Fixed performance issue on customer edit form + * Fixed performance issue related to swatch module + * Fixed several security-related issues + * Added support of latest USPS API + * Added support of PHP 7.0.2 2.0.0 ============= From e8d0624b3740c2ad5e239a48d4c5af5a6c9a2c21 Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Tue, 19 Jan 2016 11:10:02 -0600 Subject: [PATCH 61/61] MAGETWO-47956: Magento 2.0.1 Publication - update CHANGELOG.md --- CHANGELOG.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 585e6e9b5294f..bb391a4a9f4e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,30 @@ 2.0.1 ============= * Fixed bugs: - * Fixed an issue where can't deploy sample data after "composer create-project - * Fixed an issue where possible edit someone else reviews - * Fixed an issue where possible view order details for certain orders - * Fixed an issue where catalog price rule isn't applied to product created using Web API - * Fixed an issue with upload empty file to custom option + * Fixed an issue to allow deployment of sample data after running "composer create-project" + * Fixed an issue that made it possible for someone to edit someone else's reviews + * Fixed an issue that made it possible to view order details for certain orders that were created by someone else + * Fixed an issue where catalog price rule isn't applied to a product that is created when using Web API + * Fixed an issue where an empty file was uploaded to custom option * Fixed an issue where minicart does not clears after completing an order via PayPal * Fixed an issue plugin incorrect calls when proxy exists * Fixed an issue when travis CI builds fail due to authentication - * Fixed an issue when custom options calculated incorrect for configurable products - * Fixed an issue with changing category form on store view level - * Fixed an issue where URL rewrites works incorrect for sample data + * Fixed an issue when custom options for configurable products were calculated incorrectly + * Fixed an issue with modifying a category form on store view level + * Fixed an issue where URL rewrites worked incorrectly for sample data * Fixed an issue with BaseURL in static files - * Fixed an issue where customer custom attribute of 'file' type isn't supported by UI Form Component + * Fixed an issue where a customer's custom attribute of 'file' type isn't supported by UI Form Component * Fixed an issue when bin/magento setup:upgrade does not clear cache properly - * Fixed an issue where category creation from product page fails if google experiments enabled - * Fixed an issue where information about selected country in address is not presented on checkout flow + * Fixed an issue where category creation from product page fails if Google Chrome Experiments are enabled + * Fixed an issue where information about the country selected in address is not presented in checkout flow * Fixed an issue where customer segments prevent page from caching - * Fixed an issue where import product with replace behaviour causes an error for multistore + * Fixed an issue where an imported product with replace behaviour causes an error for multi-store implementations. * Fixed an issue with validation of url_key during import * Fixed an issue with "Learn More" link for Payments Pro goes to Payflow Pro - * Fixed an issue with JS error appears if loading product grid after clean cache and static files + * Fixed an issue in which a JS error appears if loading a product grid after clearing cache and static files * GitHub requests: * [#2519](https://github.com/magento/magento2/issues/2519) -- Fixed an issue where synonyms don't work with Magento 2.0 - * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total" set to yes + * [#2675](https://github.com/magento/magento2/issues/2675) -- Fixed an issue with admin order creation when config "Include Tax In Order Total is set to yes * [#2471](https://github.com/magento/magento2/issues/2471) -- Fixed an issue with incorrect prices on configurable product page when catalog prices include tax * [#2674](https://github.com/magento/magento2/issues/2674) -- Fixed an issue where plugins/interceptors don't work with early stage single instance objects * [#2888](https://github.com/magento/magento2/issues/2888) -- Fixed an issue where not all files are pre-compiled @@ -145,7 +145,7 @@ * Added the ability of inline and bulk inline editing in data grids * WebApi Framework improvements: * Added the support for store codes in API calls - * Added the ability to update the Magento system to a particular version of Magento + * Added the ability to update the Magento system to a particular version of Magento * Added the ability to enable/disable modules for Magento application * Added the ability to use maintenance mode * Introduced the common interface for Webapi payload processors @@ -183,7 +183,7 @@ * Updated the extensions styles in the Web Installation Wizard * Added the ability to control access to the setup tool * Added the Install Components functionality for Web Installation Wizard - * Updated styles + * Updated styles * Sample Data: * Improved sample data installation UX * Updated sample data with Product Heros, color swatches, MAP and rule based product relations @@ -269,7 +269,7 @@ * [#1418](https://github.com/magento/magento2/issue/1418) -- Items in minicart are not cleared after successful placing an order * [#1408](https://github.com/magento/magento2/issue/1408) -- Error command cli setup:static-content:deploy * [#1396](https://github.com/magento/magento2/issue/1396) -- Products are not shown in category right after import - + 1.0.0-beta ============= * Framework improvements: