Skip to content

Commit 4abbb01

Browse files
author
Yuri Kovsher
committed
Merge remote-tracking branch 'main-ce/develop' into MAGETWO-36563
2 parents f9e670a + 61b5c11 commit 4abbb01

File tree

54 files changed

+704
-532
lines changed

Some content is hidden

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

54 files changed

+704
-532
lines changed

app/code/Magento/Catalog/Setup/UpgradeSchema.php

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,32 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
3131
'FK_CAT_PRD_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID'
3232
);
3333

34-
//Drop entity_type_id column for catalog product entities
35-
$connection->dropColumn($installer->getTable('catalog_product_entity'), 'entity_type_id');
36-
$connection->dropColumn($installer->getTable('catalog_product_entity_datetime'), 'entity_type_id');
37-
$connection->dropColumn($installer->getTable('catalog_product_entity_decimal'), 'entity_type_id');
38-
$connection->dropColumn($installer->getTable('catalog_product_entity_gallery'), 'entity_type_id');
39-
$connection->dropColumn($installer->getTable('catalog_product_entity_int'), 'entity_type_id');
40-
$connection->dropColumn($installer->getTable('catalog_product_entity_text'), 'entity_type_id');
41-
$connection->dropColumn($installer->getTable('catalog_product_entity_varchar'), 'entity_type_id');
42-
43-
//Drop entity_type_id column for catalog category entities
44-
$connection->dropColumn($installer->getTable('catalog_category_entity'), 'entity_type_id');
45-
$connection->dropColumn($installer->getTable('catalog_category_entity_datetime'), 'entity_type_id');
46-
$connection->dropColumn($installer->getTable('catalog_category_entity_decimal'), 'entity_type_id');
47-
$connection->dropColumn($installer->getTable('catalog_category_entity_int'), 'entity_type_id');
48-
$connection->dropColumn($installer->getTable('catalog_category_entity_text'), 'entity_type_id');
49-
$connection->dropColumn($installer->getTable('catalog_category_entity_varchar'), 'entity_type_id');
34+
$dropTablesColumn = [
35+
'catalog_product_entity',
36+
'catalog_product_entity_datetime',
37+
'catalog_product_entity_decimal',
38+
'catalog_product_entity_gallery',
39+
'catalog_product_entity_int',
40+
'catalog_product_entity_text',
41+
'catalog_product_entity_varchar',
42+
'catalog_category_entity',
43+
'catalog_category_entity_datetime',
44+
'catalog_category_entity_decimal',
45+
'catalog_category_entity_int',
46+
'catalog_category_entity_text',
47+
'catalog_category_entity_varchar'
48+
];
49+
foreach ($dropTablesColumn as $table) {
50+
$connection->dropIndex(
51+
$installer->getTable($table),
52+
$installer->getIdxName(
53+
$table,
54+
'entity_type_id',
55+
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX
56+
)
57+
);
58+
$connection->dropColumn($installer->getTable($table), 'entity_type_id');
59+
}
5060

5161
$installer->endSetup();
5262
}

app/code/Magento/Customer/Setup/UpgradeSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
4646
$installer->getIdxName(
4747
$installer->getTable($table),
4848
['entity_type_id'],
49-
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
49+
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX
5050
)
5151
);
5252
$connection->dropColumn($installer->getTable($table), 'entity_type_id');

app/code/Magento/Quote/Model/GuestCart/GuestBillingAddressManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->billingAddressManagement->assign($quoteIdMask->getId(), $address);
49+
return $this->billingAddressManagement->assign($quoteIdMask->getQuoteId(), $address);
5050
}
5151

5252
/**
@@ -56,6 +56,6 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->billingAddressManagement->get($quoteIdMask->getId());
59+
return $this->billingAddressManagement->get($quoteIdMask->getQuoteId());
6060
}
6161
}

app/code/Magento/Quote/Model/GuestCart/GuestCartItemRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getList($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
$cartItemList = $this->repository->getList($quoteIdMask->getId());
50+
$cartItemList = $this->repository->getList($quoteIdMask->getQuoteId());
5151
/** @var $item CartItemInterface */
5252
foreach ($cartItemList as $item) {
5353
$item->setQuoteId($quoteIdMask->getMaskedId());
@@ -62,7 +62,7 @@ public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
6262
{
6363
/** @var $quoteIdMask QuoteIdMask */
6464
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartItem->getQuoteId(), 'masked_id');
65-
$cartItem->setQuoteId($quoteIdMask->getId());
65+
$cartItem->setQuoteId($quoteIdMask->getQuoteId());
6666
return $this->repository->save($cartItem);
6767
}
6868

@@ -73,6 +73,6 @@ public function deleteById($cartId, $itemId)
7373
{
7474
/** @var $quoteIdMask QuoteIdMask */
7575
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
76-
return $this->repository->deleteById($quoteIdMask->getId(), $itemId);
76+
return $this->repository->deleteById($quoteIdMask->getQuoteId(), $itemId);
7777
}
7878
}

app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function createEmptyCart()
5151
/** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */
5252
$quoteIdMask = $this->quoteIdMaskFactory->create();
5353
$cartId = $this->quoteManagement->createEmptyCart();
54-
$quoteIdMask->setId($cartId)->save();
54+
$quoteIdMask->setQuoteId($cartId)->save();
5555
return $quoteIdMask->getMaskedId();
5656
}
5757

@@ -62,7 +62,7 @@ public function assignCustomer($cartId, $customerId, $storeId)
6262
{
6363
/** @var $quoteIdMask QuoteIdMask */
6464
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
65-
return $this->quoteManagement->assignCustomer($quoteIdMask->getId(), $customerId, $storeId);
65+
return $this->quoteManagement->assignCustomer($quoteIdMask->getQuoteId(), $customerId, $storeId);
6666
}
6767

6868
/**
@@ -72,6 +72,6 @@ public function placeOrder($cartId)
7272
{
7373
/** @var $quoteIdMask QuoteIdMask */
7474
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
75-
return $this->quoteManagement->placeOrder($quoteIdMask->getId());
75+
return $this->quoteManagement->placeOrder($quoteIdMask->getQuoteId());
7676
}
7777
}

app/code/Magento/Quote/Model/GuestCart/GuestCartRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public function get($cartId)
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->quoteRepository->get($quoteIdMask->getId());
49+
return $this->quoteRepository->get($quoteIdMask->getQuoteId());
5050
}
5151
}

app/code/Magento/Quote/Model/GuestCart/GuestCartTotalRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public function get($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
return $this->cartTotalRepository->get($quoteIdMask->getId());
50+
return $this->cartTotalRepository->get($quoteIdMask->getQuoteId());
5151
}
5252
}

app/code/Magento/Quote/Model/GuestCart/GuestCouponManagement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function get($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
return $this->couponManagement->get($quoteIdMask->getId());
50+
return $this->couponManagement->get($quoteIdMask->getQuoteId());
5151
}
5252

5353
/**
@@ -57,7 +57,7 @@ public function set($cartId, $couponCode)
5757
{
5858
/** @var $quoteIdMask QuoteIdMask */
5959
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
60-
return $this->couponManagement->set($quoteIdMask->getId(), $couponCode);
60+
return $this->couponManagement->set($quoteIdMask->getQuoteId(), $couponCode);
6161
}
6262

6363
/**
@@ -67,6 +67,6 @@ public function remove($cartId)
6767
{
6868
/** @var $quoteIdMask QuoteIdMask */
6969
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
70-
return $this->couponManagement->remove($quoteIdMask->getId());
70+
return $this->couponManagement->remove($quoteIdMask->getQuoteId());
7171
}
7272
}

app/code/Magento/Quote/Model/GuestCart/GuestPaymentMethodManagement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method)
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->paymentMethodManagement->set($quoteIdMask->getId(), $method);
49+
return $this->paymentMethodManagement->set($quoteIdMask->getQuoteId(), $method);
5050
}
5151

5252
/**
@@ -56,7 +56,7 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->paymentMethodManagement->get($quoteIdMask->getId());
59+
return $this->paymentMethodManagement->get($quoteIdMask->getQuoteId());
6060
}
6161

6262
/**
@@ -66,6 +66,6 @@ public function getList($cartId)
6666
{
6767
/** @var $quoteIdMask QuoteIdMask */
6868
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
69-
return $this->paymentMethodManagement->getList($quoteIdMask->getId());
69+
return $this->paymentMethodManagement->getList($quoteIdMask->getQuoteId());
7070
}
7171
}

app/code/Magento/Quote/Model/GuestCart/GuestShippingAddressManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->shippingAddressManagement->assign($quoteIdMask->getId(), $address);
49+
return $this->shippingAddressManagement->assign($quoteIdMask->getQuoteId(), $address);
5050
}
5151

5252
/**
@@ -56,6 +56,6 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->shippingAddressManagement->get($quoteIdMask->getId());
59+
return $this->shippingAddressManagement->get($quoteIdMask->getQuoteId());
6060
}
6161
}

0 commit comments

Comments
 (0)