Skip to content

Commit 96f894b

Browse files
author
Oleksii Korshenko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-68877-PR-9484
2 parents d27b457 + e2feb2e commit 96f894b

File tree

54 files changed

+639
-173
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

+639
-173
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ atlassian*
6666
!/vendor/.htaccess
6767
/generated/*
6868
!/generated/.htaccess
69+
.DS_Store

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,22 @@ env:
2222
- MAGENTO_HOST_NAME="magento2.travis"
2323
matrix:
2424
- TEST_SUITE=unit
25+
- TEST_SUITE=static
26+
- TEST_SUITE=js GRUNT_COMMAND=spec
27+
- TEST_SUITE=js GRUNT_COMMAND=static
2528
- TEST_SUITE=integration INTEGRATION_INDEX=1
2629
- TEST_SUITE=integration INTEGRATION_INDEX=2
2730
- TEST_SUITE=integration INTEGRATION_INDEX=3
28-
- TEST_SUITE=static
29-
- TEST_SUITE=js
3031
- TEST_SUITE=functional ACCEPTANCE_INDEX=1
3132
- TEST_SUITE=functional ACCEPTANCE_INDEX=2
3233
matrix:
3334
exclude:
3435
- php: 7.0
3536
env: TEST_SUITE=static
3637
- php: 7.0
37-
env: TEST_SUITE=js
38+
env: TEST_SUITE=js GRUNT_COMMAND=spec
39+
- php: 7.0
40+
env: TEST_SUITE=js GRUNT_COMMAND=static
3841
- php: 7.0
3942
env: TEST_SUITE=functional ACCEPTANCE_INDEX=1
4043
- php: 7.0
@@ -49,4 +52,11 @@ cache:
4952
before_install: ./dev/travis/before_install.sh
5053
install: composer install --no-interaction --prefer-dist
5154
before_script: ./dev/travis/before_script.sh
52-
script: ./dev/travis/script.sh
55+
script:
56+
# Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails
57+
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
58+
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
59+
60+
# The scripts for grunt/phpunit type tests
61+
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
62+
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ If you are a new GitHub user, we recommend that you create your own [free github
2929
3. Create and test your work.
3030
4. Fork the Magento 2 repository according to [Fork a repository instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow [Create a pull request instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#pull_request).
3131
5. Once your contribution is received, Magento 2 development team will review the contribution and collaborate with you as needed to improve the quality of the contribution.
32+
33+
## Code of Conduct
34+
35+
Please note that this project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
36+
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).

app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
data-validate="{required:true}"
4444
value=""
4545
placeholder="<?php /* @escapeNotVerified */ echo __('password') ?>"
46-
autocomplete="off"
46+
autocomplete="new-password"
4747
/>
4848
</div>
4949
</div>

app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<fieldset class="admin__fieldset password-box-container">
7474
<div class="admin__field field _required">
7575
<label for="password" class="admin__field-label"><span><?php /* @escapeNotVerified */ echo __('User Password')?></span></label>
76-
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="off"></div>
76+
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="new-password"></div>
7777
</div>
7878

7979
<div class="admin__field field maintenance-checkbox-container">
@@ -119,7 +119,7 @@
119119
<span><?php /* @escapeNotVerified */ echo __('FTP Password') ?></span>
120120
</label>
121121
<div class="admin__field-control">
122-
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="off">
122+
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="new-password">
123123
</div>
124124
</div>
125125
<div class="admin__field field">

app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public function execute()
144144
$this->messageManager->addSuccess(__('You duplicated the product.'));
145145
}
146146
} catch (\Magento\Framework\Exception\LocalizedException $e) {
147+
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
147148
$this->messageManager->addError($e->getMessage());
148149
$this->getDataPersistor()->set('catalog_product', $data);
149150
$redirectBack = $productId ? true : 'new';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ public function save(\Magento\Catalog\Api\Data\ProductInterface $product, $saveO
634634
} catch (LocalizedException $e) {
635635
throw $e;
636636
} catch (\Exception $e) {
637-
throw new \Magento\Framework\Exception\CouldNotSaveException(__('Unable to save product'));
637+
throw new \Magento\Framework\Exception\CouldNotSaveException(__('Unable to save product'), $e);
638638
}
639639
unset($this->instances[$product->getSku()]);
640640
unset($this->instancesById[$product->getId()]);

app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<formElements>
2828
<fileUploader>
2929
<settings>
30-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
30+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
3131
<maxFileSize>2097152</maxFileSize>
3232
<uploaderConfig>
3333
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
@@ -87,7 +87,7 @@
8787
<formElements>
8888
<fileUploader>
8989
<settings>
90-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
90+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
9191
<maxFileSize>2097152</maxFileSize>
9292
<uploaderConfig>
9393
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
@@ -147,7 +147,7 @@
147147
<formElements>
148148
<fileUploader>
149149
<settings>
150-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
150+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
151151
<maxFileSize>2097152</maxFileSize>
152152
<uploaderConfig>
153153
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,15 +1228,15 @@ protected function _saveLinks()
12281228
'linked_product_id' => $linkedId,
12291229
'link_type_id' => $linkId,
12301230
];
1231-
if (!empty($linkPositions[$linkedKey])) {
1232-
$positionRows[] = [
1233-
'link_id' => $productLinkKeys[$linkKey],
1234-
'product_link_attribute_id' => $positionAttrId[$linkId],
1235-
'value' => $linkPositions[$linkedKey],
1236-
];
1237-
}
1238-
$nextLinkId++;
12391231
}
1232+
if (!empty($linkPositions[$linkedKey])) {
1233+
$positionRows[] = [
1234+
'link_id' => $productLinkKeys[$linkKey],
1235+
'product_link_attribute_id' => $positionAttrId[$linkId],
1236+
'value' => $linkPositions[$linkedKey],
1237+
];
1238+
}
1239+
$nextLinkId++;
12401240
}
12411241
}
12421242
}

app/code/Magento/Cms/Model/BlockRepository.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,10 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria
154154

155155
$this->collectionProcessor->process($criteria, $collection);
156156

157-
$blocks = [];
158-
/** @var Block $blockModel */
159-
foreach ($collection as $blockModel) {
160-
$blockData = $this->dataBlockFactory->create();
161-
$this->dataObjectHelper->populateWithArray(
162-
$blockData,
163-
$blockModel->getData(),
164-
\Magento\Cms\Api\Data\BlockInterface::class
165-
);
166-
$blocks[] = $this->dataObjectProcessor->buildOutputDataArray(
167-
$blockData,
168-
\Magento\Cms\Api\Data\BlockInterface::class
169-
);
170-
}
171-
172157
/** @var Data\BlockSearchResultsInterface $searchResults */
173158
$searchResults = $this->searchResultsFactory->create();
174159
$searchResults->setSearchCriteria($criteria);
175-
$searchResults->setItems($blocks);
160+
$searchResults->setItems($collection->getItems());
176161
$searchResults->setTotalCount($collection->getSize());
177162
return $searchResults;
178163
}

0 commit comments

Comments
 (0)