Skip to content

Commit 0a2c5b7

Browse files
author
Magento CICD
authored
merge magento/2.2-develop into magento-tsg-csl3/2.2-develop-pr6
2 parents 07aeef3 + cbd8d8a commit 0a2c5b7

File tree

31 files changed

+121
-76
lines changed

31 files changed

+121
-76
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
- Information on your environment,
66
- Steps to reproduce,
77
- Expected and actual results,
8+
Fields marked with (*) are required. Please don't remove the template.
89
910
Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
1011
-->
1112

12-
### Preconditions
13+
### Preconditions (*)
1314
<!---
1415
Please provide as detailed information about your environment as possible.
1516
For example Magento version, tag, HEAD, PHP & MySQL version, etc..
1617
-->
1718
1.
1819
2.
1920

20-
### Steps to reproduce
21+
### Steps to reproduce (*)
2122
<!---
2223
It is important to provide a set of clear steps to reproduce this bug.
2324
If relevant please include code samples
@@ -26,10 +27,10 @@
2627
2.
2728
3.
2829

29-
### Expected result
30+
### Expected result (*)
3031
<!--- Tell us what should happen -->
3132
1. [Screenshots, logs or description]
3233

33-
### Actual result
34+
### Actual result (*)
3435
<!--- Tell us what happens instead -->
3536
1. [Screenshots, logs or description]

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@ about: Technical issue with the Magento 2 core components
66

77
<!---
88
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
9+
Fields marked with (*) are required. Please don't remove the template.
910
-->
1011

11-
### Preconditions
12+
### Preconditions (*)
1213
<!---
1314
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
1415
-->
1516
1.
1617
2.
1718

18-
### Steps to reproduce
19+
### Steps to reproduce (*)
1920
<!---
2021
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
2122
-->
2223
1.
2324
2.
2425

25-
### Expected result
26+
### Expected result (*)
2627
<!--- Tell us what do you expect to happen. -->
2728
1. [Screenshots, logs or description]
2829
2.
2930

30-
### Actual result
31+
### Actual result (*)
3132
<!--- Tell us what happened instead. Include error messages and issues. -->
3233
1. [Screenshots, logs or description]
3334
2.

.github/ISSUE_TEMPLATE/developer-experience-issue.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ about: Issues related to customization, extensibility, modularity
66

77
<!---
88
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
9+
Fields marked with (*) are required. Please don't remove the template.
910
-->
1011

11-
### Summary
12+
### Summary (*)
1213
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->
1314

14-
### Examples
15+
### Examples (*)
1516
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->
1617

1718
### Proposed solution

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ about: Please consider reporting directly to https://github.com/magento/communit
55
---
66

77
<!---
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.
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. Fields marked with (*) are required. Please don't remove the template.
99
-->
1010

11-
### Description
11+
### Description (*)
1212
<!--- Describe the feature you would like to add. -->
1313

14-
### Expected behavior
14+
### Expected behavior (*)
1515
<!--- What is the expected behavior of this feature? How is it going to work? -->
1616

1717
### Benefits

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
To help us process this pull request we recommend that you add the following information:
44
- Summary of the pull request,
55
- Issue(s) related to the changes made,
6-
- Manual testing scenarios,
6+
- Manual testing scenarios
7+
Fields marked with (*) are required. Please don't remove the template.
78
-->
89

910
<!--- Please provide a general summary of the Pull Request in the Title above -->
1011

11-
### Description
12+
### Description (*)
1213
<!---
1314
Please provide a description of the changes proposed in the pull request.
1415
Letting us know what has changed and why it needed changing will help us validate this pull request.
@@ -22,15 +23,15 @@
2223
1. magento/magento2#<issue_number>: Issue title
2324
2. ...
2425

25-
### Manual testing scenarios
26+
### Manual testing scenarios (*)
2627
<!---
2728
Please provide a set of unambiguous steps to test the proposed code change.
2829
Giving us manual testing scenarios will help with the processing and validation process.
2930
-->
3031
1. ...
3132
2. ...
3233

33-
### Contribution checklist
34+
### Contribution checklist (*)
3435
- [ ] Pull request has a meaningful description of its purpose
3536
- [ ] All commits are accompanied by meaningful commit messages
3637
- [ ] All new or changed code is covered with unit/integration tests (if applicable)

app/code/Magento/Catalog/Model/ImageUploader.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,9 @@ class ImageUploader
6969
/**
7070
* List of allowed image mime types
7171
*
72-
* @var array
72+
* @var string[]
7373
*/
74-
private $allowedMimeTypes = [
75-
'image/jpg',
76-
'image/jpeg',
77-
'image/gif',
78-
'image/png'
79-
];
74+
private $allowedMimeTypes;
8075

8176
/**
8277
* ImageUploader constructor
@@ -89,6 +84,7 @@ class ImageUploader
8984
* @param string $baseTmpPath
9085
* @param string $basePath
9186
* @param string[] $allowedExtensions
87+
* @param string[] $allowedMimeTypes
9288
*/
9389
public function __construct(
9490
\Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDatabase,
@@ -98,7 +94,8 @@ public function __construct(
9894
\Psr\Log\LoggerInterface $logger,
9995
$baseTmpPath,
10096
$basePath,
101-
$allowedExtensions
97+
$allowedExtensions,
98+
$allowedMimeTypes = []
10299
) {
103100
$this->coreFileStorageDatabase = $coreFileStorageDatabase;
104101
$this->mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
@@ -108,6 +105,7 @@ public function __construct(
108105
$this->baseTmpPath = $baseTmpPath;
109106
$this->basePath = $basePath;
110107
$this->allowedExtensions = $allowedExtensions;
108+
$this->allowedMimeTypes = $allowedMimeTypes;
111109
}
112110

113111
/**
@@ -167,7 +165,7 @@ public function getBasePath()
167165
}
168166

169167
/**
170-
* Retrieve base path
168+
* Retrieve allowed extensions
171169
*
172170
* @return string[]
173171
*/

app/code/Magento/Catalog/Test/Unit/Model/ImageUploaderTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,17 @@ class ImageUploaderTest extends \PHPUnit\Framework\TestCase
6969
/**
7070
* Allowed extensions
7171
*
72-
* @var string
72+
* @var array
7373
*/
7474
private $allowedExtensions;
7575

76+
/**
77+
* Allowed mime types
78+
*
79+
* @var array
80+
*/
81+
private $allowedMimeTypes;
82+
7683
protected function setUp()
7784
{
7885
$this->coreFileStorageDatabaseMock = $this->createMock(
@@ -97,6 +104,7 @@ protected function setUp()
97104
$this->baseTmpPath = 'base/tmp/';
98105
$this->basePath = 'base/real/';
99106
$this->allowedExtensions = ['.jpg'];
107+
$this->allowedMimeTypes = ['image/jpg', 'image/jpeg', 'image/gif', 'image/png'];
100108

101109
$this->imageUploader =
102110
new \Magento\Catalog\Model\ImageUploader(
@@ -107,7 +115,8 @@ protected function setUp()
107115
$this->loggerMock,
108116
$this->baseTmpPath,
109117
$this->basePath,
110-
$this->allowedExtensions
118+
$this->allowedExtensions,
119+
$this->allowedMimeTypes
111120
);
112121
}
113122

app/code/Magento/Catalog/etc/di.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@
212212
<item name="gif" xsi:type="string">gif</item>
213213
<item name="png" xsi:type="string">png</item>
214214
</argument>
215+
<argument name="allowedMimeTypes" xsi:type="array">
216+
<item name="jpg" xsi:type="string">image/jpg</item>
217+
<item name="jpeg" xsi:type="string">image/jpeg</item>
218+
<item name="gif" xsi:type="string">image/gif</item>
219+
<item name="png" xsi:type="string">image/png</item>
220+
</argument>
215221
</arguments>
216222
</virtualType>
217223
<type name="Magento\Catalog\Controller\Adminhtml\Category\Image\Upload">

app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
$label = $block->getChildData($alias, 'title');
2222
?>
2323
<div class="data item title"
24-
aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
24+
aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
2525
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
2626
<a class="data switch"
2727
tabindex="-1"

app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class="cart items data table"
2727
data-mage-init='{"shoppingCart":{"emptyCartButton": "action.clear",
2828
"updateCartActionContainer": "#update_cart_action_container"}}'>
29-
<caption role="heading" aria-level="2" class="table-caption"><?= /* @escapeNotVerified */ __('Shopping Cart Items') ?></caption>
29+
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Shopping Cart Items') ?></caption>
3030
<thead>
3131
<tr>
3232
<th class="col item" scope="col"><span><?= /* @escapeNotVerified */ __('Item') ?></span></th>

0 commit comments

Comments
 (0)