Skip to content

Commit 1d409db

Browse files
committed
Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-53238
2 parents 6010651 + b7da986 commit 1d409db

File tree

252 files changed

+2628
-1302
lines changed

Some content is hidden

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

252 files changed

+2628
-1302
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ php:
1414
env:
1515
global:
1616
- COMPOSER_BIN_DIR=~/bin
17-
- INTEGRATION_SETS=2
17+
- INTEGRATION_SETS=3
1818
matrix:
1919
- TEST_SUITE=unit
2020
- TEST_SUITE=integration INTEGRATION_INDEX=1
2121
- TEST_SUITE=integration INTEGRATION_INDEX=2
22+
- TEST_SUITE=integration INTEGRATION_INDEX=3
2223
- TEST_SUITE=static
2324
cache:
2425
apt: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Use the following table to verify you have the correct prerequisites to install
3333
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache.html">Apache</a></td>
3434
</tr>
3535
<tr>
36-
<td>PHP ~5.5.22 or 5.6.x</td>
36+
<td>PHP 5.6.x, 7.0.2 or 7.0.6</td>
3737
<td><code>php -v</code></td>
3838
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html">PHP Ubuntu</a><br><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html">PHP CentOS</a></td>
3939
</tr>

app/bootstrap.php

Lines changed: 3 additions & 3 deletions
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 < 50522) {
14+
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50700 || PHP_VERSION_ID === 70002 || PHP_VERSION_ID >= 70006)) {
1515
if (PHP_SAPI == 'cli') {
16-
echo 'Magento supports PHP 5.5.22 or later. ' .
16+
echo 'Magento supports PHP 5.6, 7.0.2, 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.5.22 or later. Please read
21+
<p>Magento supports PHP 5.6, 7.0.2, 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>

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-store": "100.1.*",
77
"magento/module-backend": "100.1.*",
88
"magento/module-media-storage": "100.1.*",

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-catalog": "101.0.*",
77
"magento/module-catalog-inventory": "100.1.*",
88
"magento/module-eav": "100.1.*",

app/code/Magento/Authorization/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-backend": "100.1.*",
77
"magento/framework": "100.1.*"
88
},

app/code/Magento/Authorizenet/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-sales": "100.1.*",
77
"magento/module-store": "100.1.*",
88
"magento/module-quote": "100.1.*",
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Backend\Model\Setup;
7+
8+
use Magento\Backend\Model\Menu;
9+
use Magento\Backend\Model\Menu\Builder;
10+
use Magento\Framework\App\DocRootLocator;
11+
12+
/**
13+
* Plugin class to remove web setup wizard from menu if application root is pub/ and no setup url variable is specified.
14+
*/
15+
class MenuBuilder
16+
{
17+
/**
18+
* @var DocRootLocator
19+
*/
20+
protected $docRootLocator;
21+
22+
/**
23+
* MenuBuilder constructor.
24+
*
25+
* @param DocRootLocator $docRootLocator
26+
*/
27+
public function __construct(DocRootLocator $docRootLocator)
28+
{
29+
$this->docRootLocator = $docRootLocator;
30+
}
31+
32+
/**
33+
* Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
34+
*
35+
* @param Builder $subject
36+
* @param Menu $menu
37+
* @return Menu
38+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
39+
*/
40+
public function afterGetResult(Builder $subject, Menu $menu)
41+
{
42+
if ($this->docRootLocator->isPub()) {
43+
$menu->remove('Magento_Backend::setup_wizard');
44+
}
45+
return $menu;
46+
}
47+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Backend\Test\Unit\Model;
8+
9+
use Magento\Backend\Model\Setup\MenuBuilder;
10+
11+
class MenuBuilderTest extends \PHPUnit_Framework_TestCase
12+
{
13+
/**
14+
* @dataProvider afterGetResultDataProvider
15+
*
16+
* @param string $isPub
17+
* @param int $times
18+
* @param bool $result
19+
*/
20+
public function testAfterGetResult($isPub, $times)
21+
{
22+
$docRootLocator = $this->getMock('\Magento\Framework\App\DocRootLocator', [], [], '', false);
23+
$docRootLocator->expects($this->once())->method('isPub')->willReturn($isPub);
24+
$model = new MenuBuilder($docRootLocator);
25+
/** @var \Magento\Backend\Model\Menu $menu */
26+
$menu = $this->getMock('\Magento\Backend\Model\Menu', [], [], '', false);
27+
$menu->expects($this->exactly($times))->method('remove')->willReturn(true);
28+
29+
/** @var \Magento\Backend\Model\Menu\Builder $menuBuilder */
30+
$menuBuilder = $this->getMock('\Magento\Backend\Model\Menu\Builder', [], [], '', false);
31+
32+
$this->assertInstanceOf(
33+
'\Magento\Backend\Model\Menu',
34+
$model->afterGetResult($menuBuilder, $menu)
35+
);
36+
}
37+
38+
public function afterGetResultDataProvider()
39+
{
40+
return [[true, 1], [false, 0],];
41+
}
42+
}

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-store": "100.1.*",
77
"magento/module-directory": "100.1.*",
88
"magento/module-developer": "100.1.*",

app/code/Magento/Backend/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,7 @@
138138
<argument name="isIncludesAvailable" xsi:type="boolean">false</argument>
139139
</arguments>
140140
</type>
141+
<type name="Magento\Backend\Model\Menu\Builder">
142+
<plugin name="SetupMenuBuilder" type="Magento\Backend\Model\Setup\MenuBuilder" />
143+
</type>
141144
</config>

app/code/Magento/Backup/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-store": "100.1.*",
77
"magento/module-backend": "100.1.*",
88
"magento/module-cron": "100.1.*",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Braintree\Gateway\Request;
7+
8+
use Magento\Payment\Gateway\Request\BuilderInterface;
9+
use Magento\Framework\App\ProductMetadataInterface;
10+
11+
/**
12+
* Class BnCodeDataBuilder
13+
*/
14+
class ChannelDataBuilder implements BuilderInterface
15+
{
16+
/**
17+
* @var ProductMetadataInterface
18+
*/
19+
private $productMetadata;
20+
21+
/**
22+
* @var string
23+
*/
24+
private static $channel = 'channel';
25+
26+
/**
27+
* @var string
28+
*/
29+
private static $channelValue = 'Magento2_Cart_%s_BT';
30+
31+
/**
32+
* Constructor
33+
*
34+
* @param ProductMetadataInterface $productMetadata
35+
*/
36+
public function __construct(ProductMetadataInterface $productMetadata)
37+
{
38+
$this->productMetadata = $productMetadata;
39+
}
40+
41+
/**
42+
* @inheritdoc
43+
*/
44+
public function build(array $buildSubject)
45+
{
46+
return [
47+
self::$channel => sprintf(self::$channelValue, $this->productMetadata->getEdition())
48+
];
49+
}
50+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Braintree\Test\Unit\Gateway\Request;
7+
8+
use Magento\Braintree\Gateway\Request\ChannelDataBuilder;
9+
use Magento\Framework\App\ProductMetadataInterface;
10+
11+
/**
12+
* Class PaymentDataBuilderTest
13+
*
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
15+
*/
16+
class ChannelDataBuilderTest extends \PHPUnit_Framework_TestCase
17+
{
18+
/**
19+
* @var ProductMetadataInterface|\PHPUnit_Framework_MockObject_MockObject
20+
*/
21+
private $productMetadataMock;
22+
23+
/**
24+
* @var ChannelDataBuilder
25+
*/
26+
private $builder;
27+
28+
protected function setUp()
29+
{
30+
$this->productMetadataMock = $this->getMock(ProductMetadataInterface::class);
31+
$this->builder = new ChannelDataBuilder($this->productMetadataMock);
32+
}
33+
34+
/**
35+
* @param string $edition
36+
* @param array $expected
37+
* @covers \Magento\Braintree\Gateway\Request\ChannelDataBuilder::build
38+
* @dataProvider buildDataProvider
39+
*/
40+
public function testBuild($edition, array $expected)
41+
{
42+
$buildSubject = [];
43+
$this->productMetadataMock->expects(static::once())
44+
->method('getEdition')
45+
->willReturn($edition);
46+
47+
$this->assertEquals($expected, $this->builder->build($buildSubject));
48+
}
49+
50+
/**
51+
* Get list of variations for build test
52+
* @return array
53+
*/
54+
public function buildDataProvider()
55+
{
56+
return [
57+
['FirstEdition', ['channel' => 'Magento2_Cart_FirstEdition_BT']],
58+
['SecondEdition', ['channel' => 'Magento2_Cart_SecondEdition_BT']],
59+
];
60+
}
61+
}

app/code/Magento/Braintree/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/framework": "100.1.*",
77
"magento/magento-composer-installer": "*",
88
"magento/module-config": "100.1.*",

app/code/Magento/Braintree/etc/adminhtml/di.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<argument name="builders" xsi:type="array">
2525
<item name="customer" xsi:type="string">Magento\Braintree\Gateway\Request\CustomerDataBuilder</item>
2626
<item name="payment" xsi:type="string">Magento\Braintree\Gateway\Request\PaymentDataBuilder</item>
27+
<item name="channel" xsi:type="string">Magento\Braintree\Gateway\Request\ChannelDataBuilder</item>
2728
<item name="address" xsi:type="string">Magento\Braintree\Gateway\Request\AddressDataBuilder</item>
2829
<item name="vault" xsi:type="string">Magento\Braintree\Gateway\Request\VaultDataBuilder</item>
2930
</argument>
@@ -34,6 +35,7 @@
3435
<argument name="builders" xsi:type="array">
3536
<item name="customer" xsi:type="string">Magento\Braintree\Gateway\Request\CustomerDataBuilder</item>
3637
<item name="payment" xsi:type="string">Magento\Braintree\Gateway\Request\PaymentDataBuilder</item>
38+
<item name="channel" xsi:type="string">Magento\Braintree\Gateway\Request\ChannelDataBuilder</item>
3739
<item name="address" xsi:type="string">Magento\Braintree\Gateway\Request\AddressDataBuilder</item>
3840
</argument>
3941
</arguments>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
<argument name="builders" xsi:type="array">
143143
<item name="customer" xsi:type="string">Magento\Braintree\Gateway\Request\CustomerDataBuilder</item>
144144
<item name="payment" xsi:type="string">Magento\Braintree\Gateway\Request\PaymentDataBuilder</item>
145+
<item name="channel" xsi:type="string">Magento\Braintree\Gateway\Request\ChannelDataBuilder</item>
145146
<item name="address" xsi:type="string">Magento\Braintree\Gateway\Request\AddressDataBuilder</item>
146147
<item name="vault" xsi:type="string">Magento\Braintree\Gateway\Request\VaultDataBuilder</item>
147148
<item name="3dsecure" xsi:type="string">Magento\Braintree\Gateway\Request\ThreeDSecureDataBuilder</item>
@@ -165,6 +166,7 @@
165166
<argument name="builders" xsi:type="array">
166167
<item name="customer" xsi:type="string">Magento\Braintree\Gateway\Request\CustomerDataBuilder</item>
167168
<item name="payment" xsi:type="string">Magento\Braintree\Gateway\Request\PaymentDataBuilder</item>
169+
<item name="channel" xsi:type="string">Magento\Braintree\Gateway\Request\ChannelDataBuilder</item>
168170
<item name="address" xsi:type="string">Magento\Braintree\Gateway\Request\AddressDataBuilder</item>
169171
<item name="3dsecure" xsi:type="string">Magento\Braintree\Gateway\Request\ThreeDSecureDataBuilder</item>
170172
<item name="kount" xsi:type="string">Magento\Braintree\Gateway\Request\KountPaymentDataBuilder</item>
@@ -184,6 +186,7 @@
184186
<argument name="builders" xsi:type="array">
185187
<item name="customer" xsi:type="string">Magento\Braintree\Gateway\Request\CustomerDataBuilder</item>
186188
<item name="payment" xsi:type="string">Magento\Braintree\Gateway\Request\PaymentDataBuilder</item>
189+
<item name="channel" xsi:type="string">Magento\Braintree\Gateway\Request\ChannelDataBuilder</item>
187190
</argument>
188191
</arguments>
189192
</virtualType>

app/code/Magento/Bundle/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-store": "100.1.*",
77
"magento/module-catalog": "101.0.*",
88
"magento/module-tax": "100.1.*",

app/code/Magento/BundleImportExport/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-catalog": "101.0.*",
77
"magento/module-import-export": "100.1.*",
88
"magento/module-catalog-import-export": "100.1.*",

app/code/Magento/CacheInvalidate/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-page-cache": "100.1.*",
77
"magento/framework": "100.1.*"
88
},

app/code/Magento/Captcha/composer.json

Lines changed: 1 addition & 1 deletion
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.5.22|~5.6.0|~7.0.0",
5+
"php": "~5.6.0|7.0.2|~7.0.6",
66
"magento/module-store": "100.1.*",
77
"magento/module-customer": "100.1.*",
88
"magento/module-checkout": "100.1.*",

0 commit comments

Comments
 (0)