Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into graphql-93
Browse files Browse the repository at this point in the history
  • Loading branch information
Valeriy Nayda committed Dec 21, 2018
2 parents 958a0ac + c307d25 commit a3544dc
Show file tree
Hide file tree
Showing 1,272 changed files with 32,673 additions and 8,133 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ atlassian*
/.php_cs
/.php_cs.cache
/grunt-config.json
/dev/tools/grunt/configs/local-themes.js
/pub/media/*.*
!/pub/media/.htaccess
/pub/media/attribute/*
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ env:
- TEST_SUITE=integration INTEGRATION_INDEX=2
- TEST_SUITE=integration INTEGRATION_INDEX=3
- TEST_SUITE=functional
- TEST_SUITE=graphql-api-functional
matrix:
exclude:
- php: 7.1
Expand All @@ -43,6 +44,8 @@ matrix:
env: TEST_SUITE=js GRUNT_COMMAND=static
- php: 7.1
env: TEST_SUITE=functional
- php: 7.1
env: TEST_SUITE=graphql-api-functional
cache:
apt: true
directories:
Expand All @@ -61,5 +64,6 @@ script:

# The scripts for grunt/phpunit type tests
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js"] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
- if [ $TEST_SUITE == "graphql-api-functional" ]; then phpunit -c dev/tests/api-functional; fi
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ Magento is thankful for any contribution that can improve our code base, documen
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
</a>

<h3>Labels applied by the Magento team</h3>
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
Please review the <a href="https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
### Labels applied by the Magento team
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.

<h2>Reporting security issues</h2>
## Reporting security issues

To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).

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>.
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).

<h2>License</h2>
## License

Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license.

Expand All @@ -59,3 +59,13 @@ Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LI
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.
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise.

## Community Engineering Slack

To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://tinyurl.com/engcom-slack).


We have channels for each project. These channels are recommended for new members:

- [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions
- [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes
- [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog
3 changes: 3 additions & 0 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
/* 'composer install' validation */
if (file_exists($vendorAutoload)) {
$composerAutoloader = include $vendorAutoload;
} else if (file_exists("{$vendorDir}/autoload.php")) {
$vendorAutoload = "{$vendorDir}/autoload.php";
$composerAutoloader = include $vendorAutoload;
} else {
throw new \Exception(
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
Expand Down
10 changes: 5 additions & 5 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
#ini_set('display_errors', 1);

/* PHP version validation */
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70103) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
echo 'Magento supports PHP 7.1.3 or later. ' .
'Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
<a target="_blank" href="http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
<p>Magento supports PHP 7.1.3 or later. Please read
<a target="_blank" href="https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html">
Magento System Requirements</a>.
</div>
HTML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
namespace Magento\AdminNotification\Model\ResourceModel;

/**
* Inbox resource model
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -77,8 +79,7 @@ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object)
'is_read=?',
0
);
$return = $connection->fetchPairs($select);
return $return;
return $connection->fetchPairs($select);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization error message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,7 +29,7 @@ class Error extends \Magento\AdminNotification\Model\System\Message\Media\Abstra
protected function _shouldBeDisplayed()
{
$data = $this->_syncFlag->getFlagData();
return isset($data['has_errors']) && true == $data['has_errors'];
return !empty($data['has_errors']);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization success message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,8 +29,8 @@ protected function _shouldBeDisplayed()
{
$state = $this->_syncFlag->getState();
$data = $this->_syncFlag->getFlagData();
$hasErrors = isset($data['has_errors']) && true == $data['has_errors'] ? true : false;
return false == $hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
$hasErrors = !empty($data['has_errors']);
return !$hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
$columnName = $this->nameResolver->getName($attributeData);
if (isset($attributeData['function'])) {
$prefix = '';
if (isset($attributeData['distinct']) && $attributeData['distinct'] == true) {
if (!empty($attributeData['distinct'])) {
$prefix = ' DISTINCT ';
}
$expression = new ColumnValueExpression(
Expand Down
12 changes: 12 additions & 0 deletions app/code/Magento/Analytics/Test/Mftf/Page/AdminConfigPage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminConfigGeneralAnalyticsPage" url="admin/system_config/edit/section/analytics/" area="admin" module="Magento_Config">
<section name="AdminConfigAdvancedReportingSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminConfigSection">
<element name="advancedReportingMenuItem" type="text" selector="//*[@id='system_config_tabs']/div[1]//span[text()='Advanced Reporting']"/>
<section name="AdminConfigAdvancedReportingSection">
<element name="advancedReportingMenuItem" type="text" selector="//*[@class='admin__page-nav-link item-nav']//span[text()='Advanced Reporting']"/>
<element name="advancedReportingService" type="select" selector="#analytics_general_enabled"/>
<element name="advancedReportingServiceLabel" type="text" selector="#row_analytics_general_enabled>td.label>label>span"/>
<element name="advancedReportingServiceStatus" type="text" selector="#row_analytics_general_enabled>td.value>p>span"/>
Expand All @@ -17,6 +17,5 @@
<element name="advancedReportingMinute" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(3)"/>
<element name="advancedReportingSeconds" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(4)"/>
<element name="advancedReportingBlankIndustryError" type="text" selector=".message-error>div"/>
<element name="advancedReportingSuccessMessage" type="text" selector=".message-success>div"/>
</section>
</sections>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
<group value="analytics"/>
</annotations>
<after>
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
<waitForPageLoad stepKey="waitForAdminConfig"/>
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="--Please Select--"/>
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
<see stepKey="seeBlankIndustryErrorMessage" selector="{{AdminConfigSection.advancedReportingBlankIndustryError}}" userInput="Please select an industry."/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="--Please Select--" stepKey="selectAdvancedReportingIndustry"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingBlankIndustryError}}" userInput="Please select an industry." stepKey="seeBlankIndustryErrorMessage"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,24 @@
<group value="analytics"/>
</annotations>
<after>
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<!--Goto admin stores configure page -->
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
<!--Enable Advanced Reporting-->
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
<see stepKey="seeAdvancedReportingServiceLabelEnabled" selector="{{AdminConfigSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service"/>
<selectOption stepKey="selectAdvancedReportingServiceEnabled" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Enable"/>
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
<click stepKey="clickSaveConfigButtonEnabled" selector="{{AdminConfigSection.saveButton}}"/>
<see stepKey="seeSaveConfigurationMessageEnabled" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
<see stepKey="seeAdvancedReportingServiceEnabled" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Enable"/>
<see stepKey="seeAdvancedReportingServiceStatusEnabled" selector="{{AdminConfigSection.advancedReportingServiceStatus}}" userInput="Subscription status: Pending"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton1"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="seeAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceStatus}}" userInput="Subscription status: Pending" stepKey="seeAdvancedReportingServiceStatusEnabled"/>
<!--Disable Advanced Reporting-->
<see stepKey="seeAdvancedReportingServiceLabelDisabled" selector="{{AdminConfigSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service"/>
<selectOption stepKey="selectAdvancedReportingServiceDisabled" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Disable"/>
<click stepKey="clickSaveConfigButtonDisabled" selector="{{AdminConfigSection.saveButton}}"/>
<see stepKey="seeSaveConfigurationMessageDisabled" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
<see stepKey="seeAdvancedReportingServiceDisabled" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Disable"/>
<see stepKey="seeAdvancedReportingServiceStatusDisabled" selector="{{AdminConfigSection.advancedReportingServiceStatus}}" userInput="Subscription status: Disabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelDisabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Disable" stepKey="selectAdvancedReportingServiceDisabled"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton2"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess2"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Disable" stepKey="seeAdvancedReportingServiceDisabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceStatus}}" userInput="Subscription status: Disabled" stepKey="seeAdvancedReportingServiceStatusDisabled"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
</annotations>

<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>

<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
<see stepKey="seeIndustrySuccessMessage" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</test>
</tests>
Loading

0 comments on commit a3544dc

Please sign in to comment.