Skip to content

Commit efeda8d

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-94369
2 parents 6d060bb + 8f38ed2 commit efeda8d

File tree

152 files changed

+4073
-1927
lines changed

Some content is hidden

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

152 files changed

+4073
-1927
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Technical issue with the Magento 2 core components
4+
5+
---
6+
7+
<!---
8+
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
9+
-->
10+
11+
### Preconditions
12+
<!---
13+
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
14+
-->
15+
1.
16+
2.
17+
18+
### Steps to reproduce
19+
<!---
20+
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
21+
-->
22+
1.
23+
2.
24+
25+
### Expected result
26+
<!--- Tell us what do you expect to happen. -->
27+
1. [Screenshots, logs or description]
28+
2.
29+
30+
### Actual result
31+
<!--- Tell us what happened instead. Include error messages and issues. -->
32+
1. [Screenshots, logs or description]
33+
2.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Developer experience issue
3+
about: Issues related to customization, extensibility, modularity
4+
5+
---
6+
7+
<!---
8+
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
9+
-->
10+
11+
### Summary
12+
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->
13+
14+
### Examples
15+
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->
16+
17+
### Proposed solution
18+
<!--- Suggest your potential solutions for this issue. -->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Please consider reporting directly to https://github.com/magento/community-features
4+
5+
---
6+
7+
<!---
8+
Important: This repository is intended only for Magento 2 Technical Issues. Enter Feature Requests at https://github.com/magento/community-features. Project stakeholders monitor and manage requests. Feature requests entered using this form may be moved to the forum.
9+
-->
10+
11+
### Description
12+
<!--- Describe the feature you would like to add. -->
13+
14+
### Expected behavior
15+
<!--- What is the expected behavior of this feature? How is it going to work? -->
16+
17+
### Benefits
18+
<!--- How do you think this feature would improve Magento? -->
19+
20+
### Additional information
21+
<!--- What other information can you provide about the desired feature? -->

app/code/Magento/Authorizenet/view/frontend/requirejs-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
var config = {
77
map: {
88
'*': {
9-
transparent: 'Magento_Payment/transparent'
9+
transparent: 'Magento_Payment/js/transparent'
1010
}
1111
}
1212
};

app/code/Magento/Backend/view/adminhtml/web/js/media-uploader.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,10 @@ define([
123123
this.element.find('input[type=file]').fileupload('option', {
124124
process: [{
125125
action: 'load',
126-
fileTypes: /^image\/(gif|jpeg|png)$/
126+
fileTypes: /^image\/(gif|jpeg|png)$/,
127+
maxFileSize: this.options.maxFileSize
127128
}, {
128-
action: 'resize',
129-
maxWidth: this.options.maxWidth,
130-
maxHeight: this.options.maxHeight
129+
action: 'resize'
131130
}, {
132131
action: 'save'
133132
}]

app/code/Magento/BundleGraphQl/Model/Resolver/BundleItemLinks.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
namespace Magento\BundleGraphQl\Model\Resolver;
99

10+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1011
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1112
use Magento\BundleGraphQl\Model\Resolver\Links\Collection;
1213
use Magento\Framework\GraphQl\Config\Element\Field;
13-
use Magento\Framework\GraphQl\Query\Resolver\Value;
1414
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1515
use Magento\Framework\GraphQl\Query\ResolverInterface;
1616

1717
/**
18-
* {@inheritdoc}
18+
* @inheritdoc
1919
*/
2020
class BundleItemLinks implements ResolverInterface
2121
{
@@ -42,16 +42,14 @@ public function __construct(
4242
}
4343

4444
/**
45-
* {@inheritDoc}
45+
* @inheritdoc
4646
*/
47-
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) : Value
47+
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
4848
{
4949
if (!isset($value['option_id']) || !isset($value['parent_id'])) {
50-
$result = function () {
51-
return null;
52-
};
53-
return $this->valueFactory->create($result);
50+
throw new GraphQlInputException(__('"option_id" and "parent_id" values should be specified'));
5451
}
52+
5553
$this->linkCollection->addIdFilters((int)$value['option_id'], (int)$value['parent_id']);
5654
$result = function () use ($value) {
5755
return $this->linkCollection->getLinksForOptionId((int)$value['option_id']);

app/code/Magento/BundleGraphQl/Model/Resolver/BundleItems.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
use Magento\Catalog\Api\Data\ProductInterface;
1414
use Magento\Framework\EntityManager\MetadataPool;
1515
use Magento\Framework\GraphQl\Config\Element\Field;
16-
use Magento\Framework\GraphQl\Query\Resolver\Value;
1716
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1817
use Magento\Framework\GraphQl\Query\ResolverInterface;
1918

2019
/**
21-
* {@inheritdoc}
20+
* @inheritdoc
2221
*/
2322
class BundleItems implements ResolverInterface
2423
{
@@ -35,31 +34,31 @@ class BundleItems implements ResolverInterface
3534
/**
3635
* @var MetadataPool
3736
*/
38-
private $metdataPool;
37+
private $metadataPool;
3938

4039
/**
4140
* @param Collection $bundleOptionCollection
4241
* @param ValueFactory $valueFactory
43-
* @param MetadataPool $metdataPool
42+
* @param MetadataPool $metadataPool
4443
*/
4544
public function __construct(
4645
Collection $bundleOptionCollection,
4746
ValueFactory $valueFactory,
48-
MetadataPool $metdataPool
47+
MetadataPool $metadataPool
4948
) {
5049
$this->bundleOptionCollection = $bundleOptionCollection;
5150
$this->valueFactory = $valueFactory;
52-
$this->metdataPool = $metdataPool;
51+
$this->metadataPool = $metadataPool;
5352
}
5453

5554
/**
5655
* Fetch and format bundle option items.
5756
*
5857
* {@inheritDoc}
5958
*/
60-
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) : Value
59+
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
6160
{
62-
$linkField = $this->metdataPool->getMetadata(ProductInterface::class)->getLinkField();
61+
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
6362
if ($value['type_id'] !== Type::TYPE_CODE
6463
|| !isset($value[$linkField])
6564
|| !isset($value[ProductInterface::SKU])

app/code/Magento/BundleGraphQl/Model/Resolver/Options/Label.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
namespace Magento\BundleGraphQl\Model\Resolver\Options;
99

10+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1011
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
11-
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Deferred\Product;
12+
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Deferred\Product as ProductDataProvider;
1213
use Magento\Framework\GraphQl\Config\Element\Field;
13-
use Magento\Framework\GraphQl\Query\Resolver\Value;
1414
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1515
use Magento\Framework\GraphQl\Query\ResolverInterface;
1616

@@ -19,42 +19,38 @@
1919
*/
2020
class Label implements ResolverInterface
2121
{
22-
2322
/**
2423
* @var ValueFactory
2524
*/
2625
private $valueFactory;
2726

2827
/**
29-
* @var Product
28+
* @var ProductDataProvider
3029
*/
3130
private $product;
3231

3332
/**
3433
* @param ValueFactory $valueFactory
35-
* @param Product $product
34+
* @param ProductDataProvider $product
3635
*/
37-
public function __construct(ValueFactory $valueFactory, Product $product)
36+
public function __construct(ValueFactory $valueFactory, ProductDataProvider $product)
3837
{
3938
$this->valueFactory = $valueFactory;
4039
$this->product = $product;
4140
}
4241

4342
/**
44-
* @inheritDoc
43+
* @inheritdoc
4544
*/
4645
public function resolve(
4746
Field $field,
4847
$context,
4948
ResolveInfo $info,
5049
array $value = null,
5150
array $args = null
52-
): Value {
51+
) {
5352
if (!isset($value['sku'])) {
54-
$result = function () {
55-
return null;
56-
};
57-
return $this->valueFactory->create($result);
53+
throw new GraphQlInputException(__('"sku" value should be specified'));
5854
}
5955

6056
$this->product->addProductSku($value['sku']);

app/code/Magento/BundleGraphQl/Model/Resolver/Product/Fields/DynamicPrice.php

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,33 @@
55
*/
66
declare(strict_types=1);
77

8-
98
namespace Magento\BundleGraphQl\Model\Resolver\Product\Fields;
109

1110
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1211
use Magento\Bundle\Model\Product\Type as Bundle;
1312
use Magento\Framework\GraphQl\Config\Element\Field;
14-
use Magento\Framework\GraphQl\Query\Resolver\Value;
15-
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1613
use Magento\Framework\GraphQl\Query\ResolverInterface;
1714

1815
/**
19-
* {@inheritdoc}
16+
* @inheritdoc
2017
*/
2118
class DynamicPrice implements ResolverInterface
2219
{
2320
/**
24-
* @var ValueFactory
25-
*/
26-
private $valueFactory;
27-
28-
/**
29-
* @param ValueFactory $valueFactory
30-
*/
31-
public function __construct(ValueFactory $valueFactory)
32-
{
33-
$this->valueFactory = $valueFactory;
34-
}
35-
36-
/**
37-
* {@inheritdoc}
21+
* @inheritdoc
3822
*/
3923
public function resolve(
4024
Field $field,
4125
$context,
4226
ResolveInfo $info,
4327
array $value = null,
4428
array $args = null
45-
): Value {
29+
) {
4630
$result = null;
4731
if ($value['type_id'] === Bundle::TYPE_CODE) {
4832
$result = isset($value['price_type']) ? !$value['price_type'] : null;
4933
}
5034

51-
return $this->valueFactory->create(
52-
function () use ($result) {
53-
return $result;
54-
}
55-
);
35+
return $result;
5636
}
5737
}

app/code/Magento/BundleGraphQl/Model/Resolver/Product/Fields/DynamicSku.php

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,33 @@
55
*/
66
declare(strict_types=1);
77

8-
98
namespace Magento\BundleGraphQl\Model\Resolver\Product\Fields;
109

1110
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1211
use Magento\Bundle\Model\Product\Type as Bundle;
1312
use Magento\Framework\GraphQl\Config\Element\Field;
14-
use Magento\Framework\GraphQl\Query\Resolver\Value;
15-
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1613
use Magento\Framework\GraphQl\Query\ResolverInterface;
1714

1815
/**
19-
* {@inheritdoc}
16+
* @inheritdoc
2017
*/
2118
class DynamicSku implements ResolverInterface
2219
{
2320
/**
24-
* @var ValueFactory
25-
*/
26-
private $valueFactory;
27-
28-
/**
29-
* @param ValueFactory $valueFactory
30-
*/
31-
public function __construct(ValueFactory $valueFactory)
32-
{
33-
$this->valueFactory = $valueFactory;
34-
}
35-
36-
/**
37-
* {@inheritdoc}
21+
* @inheritdoc
3822
*/
3923
public function resolve(
4024
Field $field,
4125
$context,
4226
ResolveInfo $info,
4327
array $value = null,
4428
array $args = null
45-
): Value {
46-
$result = function () {
47-
return null;
48-
};
29+
) {
30+
$result = null;
4931
if ($value['type_id'] === Bundle::TYPE_CODE) {
5032
$result = isset($value['sku_type']) ? !$value['sku_type'] : null;
5133
}
5234

53-
return $this->valueFactory->create(
54-
function () use ($result) {
55-
return $result;
56-
}
57-
);
35+
return $result;
5836
}
5937
}

0 commit comments

Comments
 (0)