Skip to content

Commit bd8d2ac

Browse files
Merge branch '2.0' into MAGETWO-55441
2 parents 70f4be4 + 7b76231 commit bd8d2ac

File tree

24 files changed

+141
-92
lines changed

24 files changed

+141
-92
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2.0.8
2+
=============
3+
* Fixed bugs:
4+
* Fixed exception when merchant resets "Product Attributes mass update" Admin form.
5+
* Fixed fatal error in CLI command after compilation on some environments.
6+
* Fixed duplicate URL keys on creating configurable product.
7+
* Fixed issue with Magento sending emails from Admin using default configuration instead of a store-specific email address.
8+
* Fixed issue with delayed session messages.
9+
* GitHub requests:
10+
* [#3490](https://github.com/magento/magento2/pull/3490) -- Fix support for GLOB_BRACE on non-GNU Linux systems
11+
* [#3018](https://github.com/magento/magento2/issues/3018) -- Magento\Sales\Model\OrderRepository::getList() is incomplete
12+
113
2.0.7
214
=============
315
* GitHub requests:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function getDefaultEntities()
6767
{
6868
return [
6969
'catalog_category' => [
70+
'entity_type_id' => 3,
7071
'entity_model' => 'Magento\Catalog\Model\ResourceModel\Category',
7172
'attribute_model' => 'Magento\Catalog\Model\ResourceModel\Eav\Attribute',
7273
'table' => 'catalog_category_entity',
@@ -335,6 +336,7 @@ public function getDefaultEntities()
335336
],
336337
],
337338
'catalog_product' => [
339+
'entity_type_id' => 4,
338340
'entity_model' => 'Magento\Catalog\Model\ResourceModel\Product',
339341
'attribute_model' => 'Magento\Catalog\Model\ResourceModel\Eav\Attribute',
340342
'table' => 'catalog_product_entity',

app/code/Magento/Catalog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"magento/module-catalog-sample-data": "Sample Data version:100.0.*"
3535
},
3636
"type": "magento2-module",
37-
"version": "100.0.7",
37+
"version": "100.0.8",
3838
"license": [
3939
"OSL-3.0",
4040
"AFL-3.0"

app/code/Magento/CatalogImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ext-ctype": "*"
1717
},
1818
"type": "magento2-module",
19-
"version": "100.0.6",
19+
"version": "100.0.7",
2020
"license": [
2121
"OSL-3.0",
2222
"AFL-3.0"

app/code/Magento/CatalogUrlRewrite/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/framework": "100.0.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.0.5",
16+
"version": "100.0.6",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/Checkout/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"magento/module-cookie": "100.0.*"
2828
},
2929
"type": "magento2-module",
30-
"version": "100.0.6",
30+
"version": "100.0.7",
3131
"license": [
3232
"OSL-3.0",
3333
"AFL-3.0"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public function getDefaultEntities()
126126
{
127127
$entities = [
128128
'customer' => [
129+
'entity_type_id' => \Magento\Customer\Api\CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER,
129130
'entity_model' => 'Magento\Customer\Model\ResourceModel\Customer',
130131
'attribute_model' => 'Magento\Customer\Model\Attribute',
131132
'table' => 'customer_entity',
@@ -338,6 +339,7 @@ public function getDefaultEntities()
338339
],
339340
],
340341
'customer_address' => [
342+
'entity_type_id' => \Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS,
341343
'entity_model' => 'Magento\Customer\Model\ResourceModel\Address',
342344
'attribute_model' => 'Magento\Customer\Model\Attribute',
343345
'table' => 'customer_address_entity',

app/code/Magento/Customer/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"magento/module-customer-sample-data": "Sample Data version:100.0.*"
3030
},
3131
"type": "magento2-module",
32-
"version": "100.0.6",
32+
"version": "100.0.7",
3333
"license": [
3434
"OSL-3.0",
3535
"AFL-3.0"

app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getAllOptions($withEmpty = true, $defaultValues = false)
6666
}
6767
$options = $defaultValues ? $this->_optionsDefault[$storeId] : $this->_options[$storeId];
6868
if ($withEmpty) {
69-
array_unshift($options, ['label' => '', 'value' => '']);
69+
$options = $this->addEmptyOption($options);
7070
}
7171

7272
return $options;
@@ -89,11 +89,21 @@ public function getSpecificOptions($ids, $withEmpty = true)
8989
->load()
9090
->toOptionArray();
9191
if ($withEmpty) {
92-
array_unshift($options, ['label' => '', 'value' => '']);
92+
$options = $this->addEmptyOption($options);
9393
}
9494
return $options;
9595
}
9696

97+
/**
98+
* @param array $options
99+
* @return array
100+
*/
101+
private function addEmptyOption(array $options)
102+
{
103+
array_unshift($options, ['label' => $this->getAttribute()->getIsRequired() ? '' : ' ', 'value' => '']);
104+
return $options;
105+
}
106+
97107
/**
98108
* Get a text for option value
99109
*

app/code/Magento/Eav/Setup/EavSetup.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,21 @@ public function addEntityType($code, array $params)
192192
'additional_attribute_table' => $this->_getValue($params, 'additional_attribute_table'),
193193
'entity_attribute_collection' => $this->_getValue($params, 'entity_attribute_collection'),
194194
];
195+
if (isset($params['entity_type_id'])) {
196+
$data['entity_type_id'] = $params['entity_type_id'];
197+
}
195198

196199
if ($this->getEntityType($code, 'entity_type_id')) {
197200
$this->updateEntityType($code, $data);
198201
} else {
199202
$this->setup->getConnection()->insert($this->setup->getTable('eav_entity_type'), $data);
200203
}
201204

202-
$this->addAttributeSet($code, $this->_defaultAttributeSetName);
205+
if (isset($params['entity_type_id'])) {
206+
$this->addAttributeSet($code, $this->_defaultAttributeSetName, null, $params['entity_type_id']);
207+
} else {
208+
$this->addAttributeSet($code, $this->_defaultAttributeSetName);
209+
}
203210
$this->addAttributeGroup($code, $this->_defaultGroupName, $this->_generalGroupName);
204211

205212
return $this;
@@ -310,16 +317,21 @@ public function getAttributeSetSortOrder($entityTypeId, $sortOrder = null)
310317
* @param int|string $entityTypeId
311318
* @param string $name
312319
* @param int $sortOrder
320+
* @param int $setId
313321
* @return $this
314322
*/
315-
public function addAttributeSet($entityTypeId, $name, $sortOrder = null)
323+
public function addAttributeSet($entityTypeId, $name, $sortOrder = null, $setId = null)
316324
{
317325
$data = [
318326
'entity_type_id' => $this->getEntityTypeId($entityTypeId),
319327
'attribute_set_name' => $name,
320328
'sort_order' => $this->getAttributeSetSortOrder($entityTypeId, $sortOrder),
321329
];
322330

331+
if ($setId !== null) {
332+
$data['attribute_set_id'] = $setId;
333+
}
334+
323335
$setId = $this->getAttributeSet($entityTypeId, $name, 'attribute_set_id');
324336
if ($setId) {
325337
$this->updateAttributeSet($entityTypeId, $setId, $data);

0 commit comments

Comments
 (0)