Skip to content

Commit 4986cc4

Browse files
Merge branch 'develop' of https://github.com/magento-performance/magento2ce into MAGETWO-66727
2 parents dfcc21f + 404a1a0 commit 4986cc4

File tree

1,789 files changed

+70108
-14919
lines changed

Some content is hidden

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

1,789 files changed

+70108
-14919
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
/.settings
66
atlassian*
77
/nbproject
8+
/robots.txt
9+
/pub/robots.txt
810
/sitemap
911
/sitemap.xml
12+
/pub/sitemap
13+
/pub/sitemap.xml
1014
/.idea
1115
/.gitattributes
1216
/app/config_sandbox
@@ -41,6 +45,7 @@ atlassian*
4145
!/pub/media/customer/.htaccess
4246
/pub/media/downloadable/*
4347
!/pub/media/downloadable/.htaccess
48+
/pub/media/favicon/*
4449
/pub/media/import/*
4550
!/pub/media/import/.htaccess
4651
/pub/media/theme/*

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ addons:
99
- postfix
1010
language: php
1111
php:
12-
- 5.6.29
1312
- 7.0
1413
env:
1514
global:
@@ -30,12 +29,6 @@ cache:
3029
- $HOME/.nvm
3130
- $HOME/node_modules
3231
- $HOME/yarn.lock
33-
matrix:
34-
exclude:
35-
- php: 5.6.29
36-
env: TEST_SUITE=static
37-
- php: 5.6.29
38-
env: TEST_SUITE=js
3932
before_install: ./dev/travis/before_install.sh
4033
install: composer install --no-interaction --prefer-dist
4134
before_script: ./dev/travis/before_script.sh

COPYING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
66
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy.
77

88
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
9-
Please see <insert file name of the MEE license> for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
9+
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,33 @@ To suggest documentation improvements, click [here][4].
2727
[3]: <https://github.com/magento/magento2/issues>
2828
[4]: <http://devdocs.magento.com>
2929

30+
<h3>Labels applied by the Magento team</h3>
31+
32+
| Label | Description |
33+
| ------------- |-------------|
34+
| ![DOC](http://devdocs.magento.com/common/images/github_DOC.png) | Affects Documentation domain. |
35+
| ![PROD](http://devdocs.magento.com/common/images/github_PROD.png) | Affects the Product team (mostly feature requests or business logic change). |
36+
| ![TECH](http://devdocs.magento.com/common/images/github_TECH.png) | Affects Architect Group (mostly to make decisions around technology changes). |
37+
| ![accept](http://devdocs.magento.com/common/images/github_accept.png) | The pull request has been accepted and will be merged into mainline code. |
38+
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
39+
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
40+
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
41+
| ![acknowledged](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
42+
| ![acknowledged](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
43+
3044
<h2>Reporting security issues</h2>
3145

3246
To report security vulnerabilities in Magento software or web sites, please e-mail <a href="mailto:security@magento.com">security@magento.com</a>. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our <a href="https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc">encryption key</a> if it includes sensitive information. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
3347

34-
Stay up-to-date on the latest vulnerabilities and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
48+
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
49+
50+
<h2>License</h2>
51+
52+
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license
53+
54+
http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
55+
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy.
56+
57+
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
58+
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
3559

app/code/Magento/AdminNotification/view/adminhtml/ui_component/notification_area.xml

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,35 @@
99
<argument name="data" xsi:type="array">
1010
<item name="js_config" xsi:type="array">
1111
<item name="provider" xsi:type="string">notification_area.notification_area_data_source</item>
12-
<item name="deps" xsi:type="string">notification_area.notification_area_data_source</item>
1312
</item>
14-
<item name="spinner" xsi:type="string">columns</item>
1513
</argument>
16-
<dataSource name="notification_area_data_source">
17-
<argument name="dataProvider" xsi:type="configurableObject">
18-
<argument name="class" xsi:type="string">Magento\AdminNotification\Ui\Component\DataProvider\DataProvider</argument>
19-
<argument name="name" xsi:type="string">notification_area_data_source</argument>
20-
<argument name="primaryFieldName" xsi:type="string">identity</argument>
21-
<argument name="requestFieldName" xsi:type="string">identity</argument>
22-
<argument name="data" xsi:type="array">
23-
<item name="config" xsi:type="array">
24-
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
25-
<item name="update_url" xsi:type="url" path="mui/index/render"/>
26-
<item name="storageConfig" xsi:type="array">
27-
<item name="indexField" xsi:type="string">identity</item>
28-
</item>
29-
</item>
30-
</argument>
31-
</argument>
14+
<settings>
15+
<spinner>columns</spinner>
16+
<deps>
17+
<dep>notification_area.notification_area_data_source</dep>
18+
</deps>
19+
</settings>
20+
<dataSource name="notification_area_data_source" component="Magento_Ui/js/grid/provider">
21+
<settings>
22+
<storageConfig>
23+
<param name="indexField" xsi:type="string">identity</param>
24+
</storageConfig>
25+
<updateUrl path="mui/index/render"/>
26+
</settings>
27+
<dataProvider class="Magento\AdminNotification\Ui\Component\DataProvider\DataProvider" name="notification_area_data_source">
28+
<settings>
29+
<requestFieldName>identity</requestFieldName>
30+
<primaryFieldName>identity</primaryFieldName>
31+
</settings>
32+
</dataProvider>
3233
</dataSource>
33-
<columns name="columns">
34-
<argument name="data" xsi:type="array">
35-
<item name="config" xsi:type="array">
36-
<item name="component" xsi:type="string">Magento_AdminNotification/js/grid/listing</item>
37-
<item name="template" xsi:type="string">Magento_AdminNotification/grid/listing</item>
38-
</item>
39-
</argument>
40-
<column name="created_at">
41-
<argument name="data" xsi:type="array">
42-
<item name="config" xsi:type="array">
43-
<item name="component" xsi:type="string">Magento_AdminNotification/js/grid/columns/message</item>
44-
<item name="label" xsi:type="string" translate="true"/>
45-
<item name="dataType" xsi:type="string">text</item>
46-
<item name="sorting" xsi:type="string">asc</item>
47-
<item name="sortOrder" xsi:type="number">30</item>
48-
</item>
49-
</argument>
34+
<columns name="columns" component="Magento_AdminNotification/js/grid/listing" template="Magento_AdminNotification/grid/listing">
35+
<column name="created_at" component="Magento_AdminNotification/js/grid/columns/message" sortOrder="30">
36+
<settings>
37+
<dataType>text</dataType>
38+
<label translate="true"/>
39+
<sorting>asc</sorting>
40+
</settings>
5041
</column>
5142
</columns>
5243
</listing>

app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Activate.php

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,24 @@
66

77
namespace Magento\Analytics\Controller\Adminhtml\Subscription;
88

9+
use Magento\Analytics\Model\Config\Backend\Enabled;
910
use Magento\Analytics\Model\NotificationTime;
10-
use Magento\Analytics\Model\Subscription;
1111
use Magento\Backend\App\Action;
1212
use Magento\Backend\App\Action\Context;
13+
use Magento\Config\Model\Config\Source\Enabledisable;
14+
use Magento\Config\Model\PreparedValueFactory;
15+
use Magento\Framework\App\Config\ScopeConfigInterface;
1316
use Magento\Framework\Controller\Result\Json;
1417
use Magento\Framework\Controller\ResultFactory;
1518
use Magento\Framework\Exception\LocalizedException;
19+
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
1620
use Psr\Log\LoggerInterface;
1721

1822
/**
1923
* Activates subscription to Magento BI Advanced Reporting.
2024
*/
2125
class Activate extends Action
2226
{
23-
/**
24-
* Resource for managing subscription to Magento BI.
25-
*
26-
* @var Subscription
27-
*/
28-
private $subscription;
29-
3027
/**
3128
* @var LoggerInterface
3229
*/
@@ -46,23 +43,36 @@ class Activate extends Action
4643
*/
4744
private $subscriptionApprovedField = 'analytics_subscription_checkbox';
4845

46+
/**
47+
* @var AbstractDb
48+
*/
49+
private $configValueResource;
50+
51+
/**
52+
* @var PreparedValueFactory
53+
*/
54+
private $preparedValueFactory;
55+
4956
/**
5057
* Activate constructor.
5158
*
5259
* @param Context $context
53-
* @param Subscription $subscription
5460
* @param LoggerInterface $logger
5561
* @param NotificationTime $notificationTime
62+
* @param AbstractDb $configValueResource
63+
* @param PreparedValueFactory $preparedValueFactory
5664
*/
5765
public function __construct(
5866
Context $context,
59-
Subscription $subscription,
6067
LoggerInterface $logger,
61-
NotificationTime $notificationTime
68+
NotificationTime $notificationTime,
69+
AbstractDb $configValueResource,
70+
PreparedValueFactory $preparedValueFactory
6271
) {
63-
$this->subscription = $subscription;
6472
$this->logger = $logger;
6573
$this->notificationTime = $notificationTime;
74+
$this->configValueResource = $configValueResource;
75+
$this->preparedValueFactory = $preparedValueFactory;
6676
parent::__construct($context);
6777
}
6878

@@ -85,7 +95,14 @@ public function execute()
8595
{
8696
try {
8797
if ($this->getRequest()->getParam($this->subscriptionApprovedField)) {
88-
$this->subscription->enable();
98+
$configValue = $this->preparedValueFactory->create(
99+
Enabled::XML_ENABLED_CONFIG_STRUCTURE_PATH,
100+
Enabledisable::ENABLE_VALUE,
101+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
102+
);
103+
104+
$this->configValueResource
105+
->save($configValue);
89106
} else {
90107
$this->notificationTime->unsetLastTimeNotificationValue();
91108
}

app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Retry.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Analytics\Controller\Adminhtml\Subscription;
88

9-
use Magento\Analytics\Model\Subscription;
9+
use Magento\Analytics\Model\Config\Backend\Enabled\SubscriptionHandler;
1010
use Magento\Backend\App\Action;
1111
use Magento\Backend\App\Action\Context;
1212
use Magento\Framework\Controller\Result\Redirect;
@@ -21,19 +21,19 @@ class Retry extends Action
2121
/**
2222
* Resource for managing subscription to Magento Analytics.
2323
*
24-
* @var Subscription
24+
* @var SubscriptionHandler
2525
*/
26-
private $subscription;
26+
private $subscriptionHandler;
2727

2828
/**
2929
* @param Context $context
30-
* @param Subscription $subscription
30+
* @param SubscriptionHandler $subscriptionHandler
3131
*/
3232
public function __construct(
3333
Context $context,
34-
Subscription $subscription
34+
SubscriptionHandler $subscriptionHandler
3535
) {
36-
$this->subscription = $subscription;
36+
$this->subscriptionHandler = $subscriptionHandler;
3737
parent::__construct($context);
3838
}
3939

@@ -58,7 +58,7 @@ public function execute()
5858
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
5959
try {
6060
$resultRedirect->setPath('adminhtml');
61-
$this->subscription->retry();
61+
$this->subscriptionHandler->processEnabled();
6262
} catch (LocalizedException $e) {
6363
$this->getMessageManager()->addExceptionMessage($e, $e->getMessage());
6464
} catch (\Exception $e) {

app/code/Magento/Analytics/Cron/SignUp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
use Magento\Analytics\Model\Config\Backend\Enabled\SubscriptionHandler;
99
use Magento\Analytics\Model\Connector;
10-
use Magento\Analytics\Model\FlagManager;
10+
use Magento\Framework\FlagManager;
1111
use Magento\Framework\App\Config\ReinitableConfigInterface;
1212
use Magento\Framework\App\Config\Storage\WriterInterface;
1313

app/code/Magento/Analytics/Cron/Update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
namespace Magento\Analytics\Cron;
77

88
use Magento\Analytics\Model\Connector;
9-
use Magento\Analytics\Model\FlagManager;
109
use Magento\Analytics\Model\Plugin\BaseUrlConfigPlugin;
10+
use Magento\Framework\FlagManager;
1111
use Magento\Framework\App\Config\ReinitableConfigInterface;
1212
use Magento\Framework\App\Config\Storage\WriterInterface;
1313

app/code/Magento/Analytics/Model/Config/Backend/Enabled.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121
class Enabled extends Value
2222
{
23+
/**
24+
* Path to field subscription enabled into config structure.
25+
*/
26+
const XML_ENABLED_CONFIG_STRUCTURE_PATH = 'analytics/general/enabled';
27+
2328
/**
2429
* Service for processing of activation/deactivation MBI subscription.
2530
*

0 commit comments

Comments
 (0)