Skip to content

Commit f69aa19

Browse files
committed
Merge remote-tracking branch 'remotes/mainline-ce/2.3-develop' into MAGETWO-89470-Media-Gallery-Dynamic-Config
2 parents 019f1dc + 1d35fa6 commit f69aa19

File tree

866 files changed

+19409
-4775
lines changed

Some content is hidden

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

866 files changed

+19409
-4775
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ services:
1717
language: php
1818
php:
1919
- 7.1
20+
- 7.2
2021
env:
2122
global:
2223
- COMPOSER_BIN_DIR=~/bin
@@ -32,6 +33,16 @@ env:
3233
- TEST_SUITE=integration INTEGRATION_INDEX=2
3334
- TEST_SUITE=integration INTEGRATION_INDEX=3
3435
- TEST_SUITE=functional
36+
matrix:
37+
exclude:
38+
- php: 7.1
39+
env: TEST_SUITE=static
40+
- php: 7.1
41+
env: TEST_SUITE=js GRUNT_COMMAND=spec
42+
- php: 7.1
43+
env: TEST_SUITE=js GRUNT_COMMAND=static
44+
- php: 7.1
45+
env: TEST_SUITE=functional
3546
cache:
3647
apt: true
3748
directories:

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
44
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.png)](https://crowdin.com/project/magento-2)
55
<h2>Welcome</h2>
6-
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.
6+
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

88
## Magento system requirements
9-
[Magento system requirements](http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements2.html)
9+
[Magento system requirements](http://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html)
1010

1111
## Install Magento
1212
To install Magento, see either:
1313

14-
* [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento.
15-
* [Installation guide](http://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html)
14+
* [Installation guide](http://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html)
1615

1716
<h2>Contributing to the Magento 2 code base</h2>
1817
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
@@ -23,11 +22,24 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].
2322

2423
To suggest documentation improvements, click [here][4].
2524

26-
[1]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html>
27-
[2]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#report>
25+
[1]: <http://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html>
26+
[2]: <http://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report>
2827
[3]: <https://github.com/magento/magento2/issues>
2928
[4]: <http://devdocs.magento.com>
3029

30+
<h3>Community Maintainers</h3>
31+
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
32+
33+
<a href="https://magento.com/magento-contributors#maintainers">
34+
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/>
35+
</a>
36+
37+
<h3>Top Contributors</h3>
38+
Magento team thanks for any contribution that can improve our code base, documentation or increase test coverage. We always recognize our most active members, your contributions are the foundation of the Magento open source platform.
39+
<a href="https://magento.com/magento-contributors">
40+
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
41+
</a>
42+
3143
<h3>Labels applied by the Magento team</h3>
3244

3345
| Label | Description |

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
8+
"php": "~7.1.3||~7.2.0",
99
"lib-libxml": "*",
1010
"magento/framework": "*",
1111
"magento/module-backend": "*",

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
8+
"php": "~7.1.3||~7.2.0",
99
"magento/framework": "*",
1010
"magento/module-catalog": "*",
1111
"magento/module-catalog-import-export": "*",

app/code/Magento/AdvancedSearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/module-customer": "*",
1414
"magento/module-search": "*",
1515
"magento/module-store": "*",
16-
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0"
16+
"php": "~7.1.3||~7.2.0"
1717
},
1818
"type": "magento2-module",
1919
"license": [

app/code/Magento/Amqp/Setup/ConfigOptionsList.php

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ConfigOptionsList implements ConfigOptionsListInterface
2525
const INPUT_KEY_QUEUE_AMQP_PASSWORD = 'amqp-password';
2626
const INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST = 'amqp-virtualhost';
2727
const INPUT_KEY_QUEUE_AMQP_SSL = 'amqp-ssl';
28+
const INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS = 'amqp-ssl-options';
2829

2930
/**
3031
* Path to the values in the deployment config
@@ -35,6 +36,7 @@ class ConfigOptionsList implements ConfigOptionsListInterface
3536
const CONFIG_PATH_QUEUE_AMQP_PASSWORD = 'queue/amqp/password';
3637
const CONFIG_PATH_QUEUE_AMQP_VIRTUAL_HOST = 'queue/amqp/virtualhost';
3738
const CONFIG_PATH_QUEUE_AMQP_SSL = 'queue/amqp/ssl';
39+
const CONFIG_PATH_QUEUE_AMQP_SSL_OPTIONS = 'queue/amqp/ssl_options';
3840

3941
/**
4042
* Default values
@@ -109,6 +111,13 @@ public function getOptions()
109111
'Amqp SSL',
110112
self::DEFAULT_AMQP_SSL
111113
),
114+
new TextConfigOption(
115+
self::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS,
116+
TextConfigOption::FRONTEND_WIZARD_TEXTAREA,
117+
self::CONFIG_PATH_QUEUE_AMQP_SSL_OPTIONS,
118+
'Amqp SSL Options (JSON)',
119+
self::DEFAULT_AMQP_SSL
120+
),
112121
];
113122
}
114123

@@ -140,6 +149,21 @@ public function createConfig(array $data, DeploymentConfig $deploymentConfig)
140149
if (!$this->isDataEmpty($data, self::INPUT_KEY_QUEUE_AMQP_SSL)) {
141150
$configData->set(self::CONFIG_PATH_QUEUE_AMQP_SSL, $data[self::INPUT_KEY_QUEUE_AMQP_SSL]);
142151
}
152+
if (!$this->isDataEmpty(
153+
$data,
154+
self::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS
155+
)) {
156+
$options = json_decode(
157+
$data[self::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS],
158+
true
159+
);
160+
if ($options !== null) {
161+
$configData->set(
162+
self::CONFIG_PATH_QUEUE_AMQP_SSL_OPTIONS,
163+
$options
164+
);
165+
}
166+
}
143167
}
144168

145169
return [$configData];
@@ -154,12 +178,28 @@ public function validate(array $options, DeploymentConfig $deploymentConfig)
154178

155179
if (isset($options[self::INPUT_KEY_QUEUE_AMQP_HOST])
156180
&& $options[self::INPUT_KEY_QUEUE_AMQP_HOST] !== '') {
181+
if (!$this->isDataEmpty(
182+
$options,
183+
self::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS
184+
)) {
185+
$sslOptions = json_decode(
186+
$options[self::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS],
187+
true
188+
);
189+
} else {
190+
$sslOptions = null;
191+
}
192+
$isSslEnabled = !empty($options[self::INPUT_KEY_QUEUE_AMQP_SSL])
193+
&& $options[self::INPUT_KEY_QUEUE_AMQP_SSL] !== 'false';
194+
157195
$result = $this->connectionValidator->isConnectionValid(
158196
$options[self::INPUT_KEY_QUEUE_AMQP_HOST],
159197
$options[self::INPUT_KEY_QUEUE_AMQP_PORT],
160198
$options[self::INPUT_KEY_QUEUE_AMQP_USER],
161199
$options[self::INPUT_KEY_QUEUE_AMQP_PASSWORD],
162-
$options[self::INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST]
200+
$options[self::INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST],
201+
$isSslEnabled,
202+
$sslOptions
163203
);
164204

165205
if (!$result) {

app/code/Magento/Amqp/Setup/ConnectionValidator.php

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,27 @@
55
*/
66
namespace Magento\Amqp\Setup;
77

8-
use PhpAmqpLib\Connection\AMQPStreamConnection;
8+
use Magento\Framework\Amqp\Connection\Factory as ConnectionFactory;
9+
use Magento\Framework\Amqp\Connection\FactoryOptions;
910

1011
/**
1112
* Class ConnectionValidator - validates Amqp related settings
1213
*/
1314
class ConnectionValidator
1415
{
16+
/**
17+
* @var ConnectionFactory
18+
*/
19+
private $connectionFactory;
20+
21+
/**
22+
* @param ConnectionFactory $connectionFactory
23+
*/
24+
public function __construct(ConnectionFactory $connectionFactory)
25+
{
26+
$this->connectionFactory = $connectionFactory;
27+
}
28+
1529
/**
1630
* Checks Amqp Connection
1731
*
@@ -20,18 +34,33 @@ class ConnectionValidator
2034
* @param string $user
2135
* @param string $password
2236
* @param string $virtualHost
37+
* @param bool $ssl
38+
* @param string[]|null $sslOptions
2339
* @return bool true if the connection succeeded, false otherwise
2440
*/
25-
public function isConnectionValid($host, $port, $user, $password = '', $virtualHost = '')
26-
{
41+
public function isConnectionValid(
42+
$host,
43+
$port,
44+
$user,
45+
$password = '',
46+
$virtualHost = '',
47+
bool $ssl = false,
48+
array $sslOptions = null
49+
) {
2750
try {
28-
$connection = new AMQPStreamConnection(
29-
$host,
30-
$port,
31-
$user,
32-
$password,
33-
$virtualHost
34-
);
51+
$options = new FactoryOptions();
52+
$options->setHost($host);
53+
$options->setPort($port);
54+
$options->setUsername($user);
55+
$options->setPassword($password);
56+
$options->setVirtualHost($virtualHost);
57+
$options->setSslEnabled($ssl);
58+
59+
if ($sslOptions) {
60+
$options->setSslOptions($sslOptions);
61+
}
62+
63+
$connection = $this->connectionFactory->create($options);
3564

3665
$connection->close();
3766
} catch (\Exception $e) {

app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function setUp()
4747
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_PASSWORD => 'password',
4848
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST => 'virtual host',
4949
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL => 'ssl',
50-
50+
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS => '{"ssl_option":"test"}',
5151
];
5252

5353
$this->objectManager = new ObjectManager($this);
@@ -113,7 +113,14 @@ public function testGetOptions()
113113
ConfigOptionsList::CONFIG_PATH_QUEUE_AMQP_SSL,
114114
'Amqp SSL',
115115
ConfigOptionsList::DEFAULT_AMQP_SSL
116-
)
116+
),
117+
new TextConfigOption(
118+
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS,
119+
TextConfigOption::FRONTEND_WIZARD_TEXTAREA,
120+
ConfigOptionsList::CONFIG_PATH_QUEUE_AMQP_SSL_OPTIONS,
121+
'Amqp SSL Options (JSON)',
122+
ConfigOptionsList::DEFAULT_AMQP_SSL
123+
),
117124
];
118125
$this->assertEquals($expectedOptions, $this->model->getOptions());
119126
}
@@ -167,6 +174,7 @@ public function getCreateConfigDataProvider()
167174
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_PASSWORD => 'password',
168175
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST => 'virtual host',
169176
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL => 'ssl',
177+
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS => '{"ssl_option":"test"}',
170178
],
171179
['queue' =>
172180
['amqp' =>
@@ -177,6 +185,7 @@ public function getCreateConfigDataProvider()
177185
'password' => 'password',
178186
'virtualhost' => 'virtual host',
179187
'ssl' => 'ssl',
188+
'ssl_options' => ['ssl_option' => 'test'],
180189
]
181190
]
182191
],
@@ -189,6 +198,7 @@ public function getCreateConfigDataProvider()
189198
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_PASSWORD => 'password',
190199
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_VIRTUAL_HOST => 'virtual host',
191200
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL => 'ssl',
201+
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_SSL_OPTIONS => '{"ssl_option":"test"}',
192202
],
193203
['queue' =>
194204
['amqp' =>
@@ -199,6 +209,7 @@ public function getCreateConfigDataProvider()
199209
'password' => 'password',
200210
'virtualhost' => 'virtual host',
201211
'ssl' => 'ssl',
212+
'ssl_options' => ['ssl_option' => 'test'],
202213
]
203214
]
204215
],

app/code/Magento/Amqp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/framework": "*",
99
"magento/framework-amqp": "*",
1010
"magento/framework-message-queue": "*",
11-
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0"
11+
"php": "~7.1.3||~7.2.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/Analytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-analytics",
33
"description": "N/A",
44
"require": {
5-
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
5+
"php": "~7.1.3||~7.2.0",
66
"magento/module-backend": "*",
77
"magento/module-config": "*",
88
"magento/module-integration": "*",

0 commit comments

Comments
 (0)