Skip to content

Commit e3a164e

Browse files
Merge remote-tracking branch 'upstream/develop' into develop
2 parents 141fa5e + d1b86ae commit e3a164e

File tree

275 files changed

+7818
-3896
lines changed

Some content is hidden

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

275 files changed

+7818
-3896
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/autoload.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@
3535
}
3636

3737
AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader));
38-
39-
// Sets default autoload mappings, may be overridden in Bootstrap::create
40-
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);

app/bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
}
2929

3030
require_once __DIR__ . '/autoload.php';
31+
// Sets default autoload mappings, may be overridden in Bootstrap::create
32+
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
33+
3134
require_once BP . '/app/functions.php';
3235

3336
/* Custom umask value may be provided in optional mage_umask file in root */

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/Bundle/Model/Product/Price.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
namespace Magento\Bundle\Model\Product;
87

98
use Magento\Customer\Api\GroupManagementInterface;
109
use Magento\Framework\Pricing\PriceCurrencyInterface;
10+
use Magento\Framework\App\ObjectManager;
11+
use Magento\Catalog\Api\Data\ProductTierPriceExtensionFactory;
1112

1213
/**
13-
* Bundle Price Model
14-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1514
* @api
15+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1616
*/
1717
class Price extends \Magento\Catalog\Model\Product\Type\Price
1818
{
@@ -48,7 +48,7 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price
4848
private $serializer;
4949

5050
/**
51-
* Price constructor.
51+
* Constructor
5252
*
5353
* @param \Magento\CatalogRule\Model\ResourceModel\RuleFactory $ruleFactory
5454
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
@@ -61,6 +61,7 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price
6161
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
6262
* @param \Magento\Catalog\Helper\Data $catalogData
6363
* @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
64+
* @param ProductTierPriceExtensionFactory|null $tierPriceExtensionFactory
6465
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6566
*/
6667
public function __construct(
@@ -74,10 +75,11 @@ public function __construct(
7475
\Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory $tierPriceFactory,
7576
\Magento\Framework\App\Config\ScopeConfigInterface $config,
7677
\Magento\Catalog\Helper\Data $catalogData,
77-
\Magento\Framework\Serialize\Serializer\Json $serializer = null
78+
\Magento\Framework\Serialize\Serializer\Json $serializer = null,
79+
ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null
7880
) {
7981
$this->_catalogData = $catalogData;
80-
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
82+
$this->serializer = $serializer ?: ObjectManager::getInstance()
8183
->get(\Magento\Framework\Serialize\Serializer\Json::class);
8284
parent::__construct(
8385
$ruleFactory,
@@ -88,7 +90,8 @@ public function __construct(
8890
$priceCurrency,
8991
$groupManagement,
9092
$tierPriceFactory,
91-
$config
93+
$config,
94+
$tierPriceExtensionFactory
9295
);
9396
}
9497

app/code/Magento/Bundle/Test/Unit/Model/Product/PriceTest.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
namespace Magento\Bundle\Test\Unit\Model\Product;
77

88
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
9+
use Magento\Catalog\Api\Data\ProductTierPriceExtensionFactory;
910

1011
/**
11-
* Test for Model ProductPrice.
12-
*
1312
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1413
*/
1514
class PriceTest extends \PHPUnit_Framework_TestCase
@@ -114,7 +113,10 @@ function ($value) {
114113
return json_decode($value, true);
115114
}
116115
);
117-
116+
$tierPriceExtensionFactoryMock = $this->getMockBuilder(ProductTierPriceExtensionFactory::class)
117+
->setMethods(['create'])
118+
->disableOriginalConstructor()
119+
->getMock();
118120
$objectManagerHelper = new ObjectManagerHelper($this);
119121
$this->model = $objectManagerHelper->getObject(
120122
\Magento\Bundle\Model\Product\Price::class,
@@ -129,7 +131,8 @@ function ($value) {
129131
'tierPriceFactory' => $tpFactory,
130132
'config' => $scopeConfig,
131133
'catalogData' => $this->catalogHelperMock,
132-
'serializer' => $this->serializer
134+
'serializer' => $this->serializer,
135+
'tierPriceExtensionFactory' => $tierPriceExtensionFactoryMock
133136
]
134137
);
135138
}

app/code/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function getGalleryImagesJson()
122122
}
123123
if (empty($imagesItems)) {
124124
$imagesItems[] = [
125-
'thumb' => $this->getImage($this->getProduct(), 'product_thumbnail_image')->getImageUrl(),
126-
'img' => $this->getImage($this->getProduct(), 'product_base_image')->getImageUrl(),
127-
'full' => $this->getImage($this->getProduct(), 'product_page_image_large')->getImageUrl(),
125+
'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),
126+
'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
127+
'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
128128
'caption' => '',
129129
'position' => '0',
130130
'isMain' => true,

0 commit comments

Comments
 (0)