Skip to content

Commit 9301e9d

Browse files
author
Andrey Konosov
committed
Merge remote-tracking branch 'main/develop' into epam-3-1
Conflicts: composer.lock
2 parents bac1f10 + 774f7c3 commit 9301e9d

File tree

159 files changed

+3436
-1524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+3436
-1524
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ php:
44
- 5.6
55
env:
66
- TEST_SUITE=unit
7-
- TEST_SUITE=integration
7+
- TEST_SUITE=integration_part_1
8+
- TEST_SUITE=integration_part_2
89
- TEST_SUITE=integration_integrity
910
- TEST_SUITE=static_phpcs
1011
- TEST_SUITE=static_annotation
@@ -32,7 +33,7 @@ before_script:
3233
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
3334
# Install MySQL 5.6, create DB for integration tests
3435
- >
35-
sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then
36+
sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then
3637
sudo apt-get remove --purge mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5;
3738
sudo apt-get autoremove;
3839
sudo apt-get autoclean;
@@ -50,10 +51,12 @@ script:
5051
# Unit tests
5152
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
5253
# Integration tests
53-
- sh -c "if [ '$TEST_SUITE' = 'integration' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist; fi"
54+
- sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; bash IntegationTestsForTravis.sh 2; fi"
55+
- sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis1; fi"
56+
- sh -c "if [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis2; fi"
5457
# Integration integrity tests
5558
- sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi"
5659
# Static tests [Code Style]
5760
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
5861
# Static tests [Code Style]
59-
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
62+
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"

app/code/Magento/Backend/Block/Menu.php

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -455,28 +455,14 @@ public function renderNavigation($menu, $level = 0, $limit = 0, $colBrakes = [])
455455
}
456456

457457
$id = $this->getJsId($menuItem->getId());
458-
if (count($menu) > 1 || $level != 1) {
459-
$output .= '<li ' . $this->getUiId(
460-
$menuItem->getId()
461-
) . ' class="item-' . $itemClass . ' ' . $this->_renderItemCssClass(
462-
$menuItem,
463-
$level
464-
) . ($level == 0 ? '" id="' . $id . '" aria-haspopup="true' : '')
465-
. '" role="menu-item">' . $this->_renderAnchor(
466-
$menuItem,
467-
$level
468-
) . $this->_addSubMenu(
469-
$menuItem,
470-
$level,
471-
$limit,
472-
$id
473-
) . '</li>';
458+
$subMenu = $this->_addSubMenu($menuItem, $level, $limit, $id);
459+
if (count($menu) > 1 || $level != 1 || $menuItem->getUrl() !== '#') {
460+
$output .= '<li ' . $this->getUiId($menuItem->getId())
461+
. ' class="item-' . $itemClass . ' ' . $this->_renderItemCssClass($menuItem, $level)
462+
. ($level == 0 ? '" id="' . $id . '" aria-haspopup="true' : '')
463+
. '" role="menu-item">' . $this->_renderAnchor($menuItem, $level) . $subMenu . '</li>';
474464
} else {
475-
$output .= $this->_addSubMenu(
476-
$menuItem,
477-
$level,
478-
$limit,
479-
$id);
465+
$output .= $subMenu;
480466
}
481467

482468
$itemPosition++;

app/code/Magento/Backend/Block/Widget/Button/Item.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,25 @@
1616
*/
1717
class Item extends \Magento\Framework\Object
1818
{
19+
/**
20+
* Object delete flag
21+
*
22+
* @var bool
23+
*/
24+
protected $_isDeleted = false;
25+
26+
/**
27+
* Set _isDeleted flag value (if $isDeleted parameter is defined) and return current flag value
28+
*
29+
* @param boolean $isDeleted
30+
* @return bool
31+
*/
32+
public function isDeleted($isDeleted = null)
33+
{
34+
$result = $this->_isDeleted;
35+
if ($isDeleted !== null) {
36+
$this->_isDeleted = $isDeleted;
37+
}
38+
return $result;
39+
}
1940
}

app/code/Magento/Backup/Model/Resource/Db.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ public function getTableStatus($tableName)
124124

125125
if ($row) {
126126
$statusObject = new \Magento\Framework\Object();
127-
$statusObject->setIdFieldName('name');
128127
foreach ($row as $field => $value) {
129128
$statusObject->setData(strtolower($field), $value);
130129
}

app/code/Magento/Bundle/Model/Option.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ protected function _construct()
5353
*/
5454
public function addSelection(\Magento\Catalog\Model\Product $selection)
5555
{
56-
$selections = $this->getDataSetDefault('selections', []);
56+
if (!$this->hasData('selections')) {
57+
$this->setData('selections', []);
58+
}
59+
$selections = $this->getData('selections');
5760
$selections[] = $selection;
5861
$this->setSelections($selections);
5962
}

app/code/Magento/Catalog/Model/Product/Visibility.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function __construct(
4949
) {
5050
$this->_eavEntityAttribute = $eavEntityAttribute;
5151
parent::__construct($data);
52-
$this->setIdFieldName('visibility_id');
5352
}
5453

5554
/**

app/code/Magento/Catalog/Model/Resource/Product/Action.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function _construct()
4040
public function updateAttributes($entityIds, $attrData, $storeId)
4141
{
4242
$object = new \Magento\Framework\Object();
43-
$object->setIdFieldName('entity_id')->setStoreId($storeId);
43+
$object->setStoreId($storeId);
4444

4545
$this->_getWriteAdapter()->beginTransaction();
4646
try {
@@ -54,6 +54,7 @@ public function updateAttributes($entityIds, $attrData, $storeId)
5454
foreach ($entityIds as $entityId) {
5555
$i++;
5656
$object->setId($entityId);
57+
$object->setEntityId($entityId);
5758
// collect data for save
5859
$this->_saveAttributeValue($object, $attribute, $value);
5960
// save collected data every 1000 rows

app/code/Magento/Catalog/Model/Resource/Url.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ protected function _getCategories($categoryIds, $storeId = null, $path = null)
432432
}
433433

434434
$category = new \Magento\Framework\Object($row);
435-
$category->setIdFieldName('entity_id');
435+
$category->setId($row['entity_id']);
436+
$category->setEntityId($row['entity_id']);
436437
$category->setStoreId($storeId);
437438
$this->_prepareCategoryParentId($category);
438439

@@ -535,7 +536,8 @@ protected function _getProducts($productIds, $storeId, $entityId, &$lastEntityId
535536
$rowSet = $adapter->fetchAll($select, $bind);
536537
foreach ($rowSet as $row) {
537538
$product = new \Magento\Framework\Object($row);
538-
$product->setIdFieldName('entity_id');
539+
$product->setId($row['entity_id']);
540+
$product->setEntityId($row['entity_id']);
539541
$product->setCategoryIds([]);
540542
$product->setStoreId($storeId);
541543
$products[$product->getId()] = $product;

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ protected function getProductEmulator($typeId)
627627
{
628628
if (!isset($this->productEmulators[$typeId])) {
629629
$productEmulator = new \Magento\Framework\Object();
630-
$productEmulator->setIdFieldName('entity_id')->setTypeId($typeId);
630+
$productEmulator->setTypeId($typeId);
631631
$this->productEmulators[$typeId] = $productEmulator;
632632
}
633633
return $this->productEmulators[$typeId];

app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlPathGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(
5656
/**
5757
* Build category URL path
5858
*
59-
* @param \Magento\Catalog\Api\Data\CategoryInterface|\Magento\Framework\Object $category
59+
* @param \Magento\Catalog\Api\Data\CategoryInterface|\Magento\Framework\Model\AbstractModel $category
6060
* @return string
6161
*/
6262
public function getUrlPath($category)

0 commit comments

Comments
 (0)