Skip to content

Commit 2052111

Browse files
author
Sergii Kovalenko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-56989
2 parents a43a00a + 8bde202 commit 2052111

File tree

289 files changed

+5904
-1249
lines changed

Some content is hidden

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

289 files changed

+5904
-1249
lines changed

Diff for: app/bootstrap.php

+14-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
#ini_set('display_errors', 1);
1212

1313
/* PHP version validation */
14-
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50700 || PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
14+
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID >= 50605 && PHP_VERSION_ID < 50700 || PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
1515
if (PHP_SAPI == 'cli') {
16-
echo 'Magento supports PHP 5.6, 7.0.2, 7.0.4, and 7.0.6 or later. ' .
16+
echo 'Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. ' .
1717
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
1818
} else {
1919
echo <<<HTML
2020
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
21-
<p>Magento supports PHP 5.6, 7.0.2, 7.0.4, and 7.0.6 or later. Please read
21+
<p>Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. Please read
2222
<a target="_blank" href="http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html">
2323
Magento System Requirements</a>.
2424
</div>
@@ -35,6 +35,17 @@
3535
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
3636
umask($mask);
3737

38+
if (empty($_SERVER['ENABLE_IIS_REWRITES']) || ($_SERVER['ENABLE_IIS_REWRITES'] != 1)) {
39+
/*
40+
* Unset headers used by IIS URL rewrites.
41+
*/
42+
unset($_SERVER['HTTP_X_REWRITE_URL']);
43+
unset($_SERVER['HTTP_X_ORIGINAL_URL']);
44+
unset($_SERVER['IIS_WasUrlRewritten']);
45+
unset($_SERVER['UNENCODED_URL']);
46+
unset($_SERVER['ORIG_PATH_INFO']);
47+
}
48+
3849
if (!empty($_SERVER['MAGE_PROFILER'])
3950
&& isset($_SERVER['HTTP_ACCEPT'])
4051
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false

Diff for: app/code/Magento/AdminNotification/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-admin-notification",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-store": "100.2.*",
77
"magento/module-backend": "100.2.*",
88
"magento/module-media-storage": "100.2.*",

Diff for: app/code/Magento/AdvancedPricingImportExport/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-advanced-pricing-import-export",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-catalog": "101.1.*",
77
"magento/module-catalog-inventory": "100.2.*",
88
"magento/module-eav": "100.2.*",

Diff for: app/code/Magento/Authorization/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-authorization",
33
"description": "Authorization module provides access to Magento ACL functionality.",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-backend": "100.2.*",
77
"magento/framework": "100.2.*"
88
},

Diff for: app/code/Magento/Authorizenet/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-authorizenet",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-sales": "100.2.*",
77
"magento/module-store": "100.2.*",
88
"magento/module-quote": "100.2.*",

Diff for: app/code/Magento/Backend/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-backend",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-store": "100.2.*",
77
"magento/module-directory": "100.2.*",
88
"magento/module-developer": "100.2.*",

Diff for: app/code/Magento/Backup/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-backup",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-store": "100.2.*",
77
"magento/module-backend": "100.2.*",
88
"magento/module-cron": "100.2.*",

Diff for: app/code/Magento/Braintree/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-braintree",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/framework": "100.2.*",
77
"magento/magento-composer-installer": "*",
88
"magento/module-config": "100.2.*",

Diff for: app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/paypal.js

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ define([
9898
quote.totals.subscribe(function () {
9999
if (self.grandTotalAmount !== quote.totals()['base_grand_total']) {
100100
self.grandTotalAmount = quote.totals()['base_grand_total'];
101-
self.reInitPayPal();
102101
}
103102
});
104103

Diff for: app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

+7-14
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,12 @@ protected function getBundleOptions()
268268
'arguments' => [
269269
'data' => [
270270
'config' => [
271-
'componentType' => 'dynamicRows',
271+
'componentType' => Container::NAME,
272+
'component' => 'Magento_Bundle/js/components/bundle-dynamic-rows',
272273
'template' => 'ui/dynamic-rows/templates/collapsible',
273-
'label' => '',
274274
'additionalClasses' => 'admin__field-wide',
275-
'collapsibleHeader' => true,
276-
'columnsHeader' => false,
277-
'deleteProperty' => false,
278-
'addButton' => false,
279275
'dataScope' => 'data.bundle_options',
276+
'bundleSelectionsName' => 'product_bundle_container.bundle_selections'
280277
],
281278
],
282279
],
@@ -318,14 +315,11 @@ protected function getBundleOptions()
318315
'arguments' => [
319316
'data' => [
320317
'config' => [
321-
'componentType' => DynamicRows::NAME,
322-
'label' => '',
318+
'componentType' => Container::NAME,
319+
'component' => 'Magento_Bundle/js/components/bundle-dynamic-rows-grid',
323320
'sortOrder' => 50,
324321
'additionalClasses' => 'admin__field-wide',
325-
'component' => 'Magento_Ui/js/dynamic-rows/dynamic-rows-grid',
326322
'template' => 'ui/dynamic-rows/templates/default',
327-
'columnsHeader' => false,
328-
'columnsHeaderAfterRender' => true,
329323
'provider' => 'product_form.product_form_data_source',
330324
'dataProvider' => '${ $.dataScope }' . '.bundle_button_proxy',
331325
'identificationDRProperty' => 'product_id',
@@ -343,8 +337,7 @@ protected function getBundleOptions()
343337
'selection_qty' => '',
344338
],
345339
'links' => ['insertData' => '${ $.provider }:${ $.dataProvider }'],
346-
'source' => 'product',
347-
'addButton' => false,
340+
'source' => 'product'
348341
],
349342
],
350343
],
@@ -561,7 +554,7 @@ protected function getBundleSelections()
561554
'componentType' => Container::NAME,
562555
'isTemplate' => true,
563556
'component' => 'Magento_Ui/js/dynamic-rows/record',
564-
'is_collection' => true,
557+
'is_collection' => true
565558
],
566559
],
567560
],

Diff for: app/code/Magento/Bundle/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-bundle",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-store": "100.2.*",
77
"magento/module-catalog": "101.1.*",
88
"magento/module-tax": "100.2.*",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* Copyright © 2016 Magento. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'underscore',
8+
'Magento_Ui/js/dynamic-rows/dynamic-rows-grid'
9+
], function (_, dynamicRowsGrid) {
10+
'use strict';
11+
12+
return dynamicRowsGrid.extend({
13+
defaults: {
14+
label: '',
15+
columnsHeader: false,
16+
columnsHeaderAfterRender: true,
17+
addButton: false
18+
},
19+
20+
/**
21+
* Initialize elements from grid
22+
*
23+
* @param {Array} data
24+
*
25+
* @returns {Object} Chainable.
26+
*/
27+
initElements: function (data) {
28+
var newData = this.getNewData(data),
29+
recordIndex;
30+
31+
this.parsePagesData(data);
32+
33+
if (newData.length) {
34+
if (this.insertData().length) {
35+
recordIndex = data.length - newData.length - 1;
36+
37+
_.each(newData, function (newRecord) {
38+
this.processingAddChild(newRecord, ++recordIndex, newRecord[this.identificationProperty]);
39+
}, this);
40+
}
41+
}
42+
43+
return this;
44+
},
45+
46+
/**
47+
* Mapping value from grid
48+
*
49+
* @param {Array} data
50+
*/
51+
mappingValue: function (data) {
52+
if (_.isEmpty(data)) {
53+
return;
54+
}
55+
56+
this._super();
57+
}
58+
});
59+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/**
2+
* Copyright © 2016 Magento. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'underscore',
8+
'mageUtils',
9+
'uiRegistry',
10+
'Magento_Ui/js/dynamic-rows/dynamic-rows'
11+
], function (_, utils, registry, dynamicRows) {
12+
'use strict';
13+
14+
return dynamicRows.extend({
15+
defaults: {
16+
label: '',
17+
collapsibleHeader: true,
18+
columnsHeader: false,
19+
deleteProperty: false,
20+
addButton: false
21+
},
22+
23+
/**
24+
* Set new data to dataSource,
25+
* delete element
26+
*
27+
* @param {Array} data - record data
28+
*/
29+
_updateData: function (data) {
30+
var elems = _.clone(this.elems()),
31+
path,
32+
dataArr,
33+
optionBaseData;
34+
35+
dataArr = this.recordData.splice(this.startIndex, this.recordData().length - this.startIndex);
36+
dataArr.splice(0, this.pageSize);
37+
elems = _.sortBy(this.elems(), function (elem) {
38+
return ~~elem.index;
39+
});
40+
41+
data.concat(dataArr).forEach(function (rec, idx) {
42+
if (elems[idx]) {
43+
elems[idx].recordId = rec[this.identificationProperty];
44+
}
45+
46+
if (!rec.position) {
47+
rec.position = this.maxPosition;
48+
this.setMaxPosition();
49+
}
50+
51+
path = this.dataScope + '.' + this.index + '.' + (this.startIndex + idx);
52+
optionBaseData = _.pick(rec, function (value) {
53+
return !_.isObject(value);
54+
});
55+
this.source.set(path, optionBaseData);
56+
this.source.set(path + '.bundle_button_proxy', []);
57+
this.source.set(path + '.bundle_selections', []);
58+
this.removeBundleItemsFromOption(idx);
59+
_.each(rec['bundle_selections'], function (obj, index) {
60+
this.source.set(path + '.bundle_button_proxy' + '.' + index, rec['bundle_button_proxy'][index]);
61+
this.source.set(path + '.bundle_selections' + '.' + index, obj);
62+
}, this);
63+
}, this);
64+
65+
this.elems(elems);
66+
},
67+
68+
/**
69+
* Removes nested dynamic-rows-grid rendered records from option
70+
*
71+
* @param {Number|String} index - element index
72+
*/
73+
removeBundleItemsFromOption: function (index) {
74+
var bundleSelections = registry.get(this.name + '.' + index + '.' + this.bundleSelectionsName),
75+
bundleSelectionsLength = (bundleSelections.elems() || []).length,
76+
i;
77+
78+
if (bundleSelectionsLength) {
79+
for (i = 0; i < bundleSelectionsLength; i++) {
80+
bundleSelections.elems()[0].destroy();
81+
}
82+
}
83+
},
84+
85+
/**
86+
* {@inheritdoc}
87+
*/
88+
processingAddChild: function (ctx, index, prop) {
89+
var recordIds = _.map(this.recordData(), function (rec) {
90+
return parseInt(rec['record_id'], 10);
91+
}),
92+
maxRecordId = _.max(recordIds);
93+
94+
prop = maxRecordId > -1 ? maxRecordId + 1 : prop;
95+
this._super(ctx, index, prop);
96+
}
97+
});
98+
});

Diff for: app/code/Magento/BundleImportExport/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-bundle-import-export",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-catalog": "101.1.*",
77
"magento/module-import-export": "100.2.*",
88
"magento/module-catalog-import-export": "100.2.*",

Diff for: app/code/Magento/CacheInvalidate/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-cache-invalidate",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-page-cache": "100.2.*",
77
"magento/framework": "100.2.*"
88
},

Diff for: app/code/Magento/Captcha/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-captcha",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
66
"magento/module-store": "100.2.*",
77
"magento/module-customer": "100.2.*",
88
"magento/module-checkout": "100.2.*",

Diff for: app/code/Magento/Catalog/Model/Product.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* @method Product setHasError(bool $value)
2323
* @method \Magento\Catalog\Model\ResourceModel\Product getResource()
2424
* @method null|bool getHasError()
25-
* @method Product setAssociatedProductIds(array $productIds)
2625
* @method array getAssociatedProductIds()
2726
* @method Product setNewVariationsAttributeSetId(int $value)
2827
* @method int getNewVariationsAttributeSetId()
@@ -2614,4 +2613,16 @@ private function getMediaGalleryProcessor()
26142613
}
26152614
return $this->mediaGalleryProcessor;
26162615
}
2616+
2617+
/**
2618+
* Set the associated products
2619+
*
2620+
* @param array $productIds
2621+
* @return $this
2622+
*/
2623+
public function setAssociatedProductIds(array $productIds)
2624+
{
2625+
$this->getExtensionAttributes()->setConfigurableProductLinks($productIds);
2626+
return $this;
2627+
}
26172628
}

Diff for: app/code/Magento/Catalog/Model/ProductRepository.php

+1
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
640640

641641
$collection->load();
642642

643+
$collection->addCategoryIds();
643644
$searchResult = $this->searchResultsFactory->create();
644645
$searchResult->setSearchCriteria($searchCriteria);
645646
$searchResult->setItems($collection->getItems());

0 commit comments

Comments
 (0)