Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/2.3-develop' into JeroenVanLeu…
Browse files Browse the repository at this point in the history
…sden-patch-1
  • Loading branch information
nmalevanec committed Jan 18, 2019
2 parents 1af8c78 + e5c1527 commit 43b9a9d
Show file tree
Hide file tree
Showing 994 changed files with 26,777 additions and 5,122 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Magento 2 development team will review all issues and contributions submitte
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
3. PRs which include new logic or new features must be submitted along with:
* Unit/integration test coverage
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).

Expand All @@ -27,7 +27,7 @@ If you are a new GitHub user, we recommend that you create your own [free github
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
3. Create and test your work.
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

## Code of Conduct
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +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"] && [ $TEST_SUITE != "graphql-api-functional" ]; 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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To get detailed information about changes in Magento 2.3.0, see the [Release Not

2.1.0
=============
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](https://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")

2.0.0
=============
Expand Down Expand Up @@ -1025,7 +1025,7 @@ Tests:
* Improved backend menu keyboard accessibility
* Accessibility improvements: WAI-ARIA in a product item on a category page and related products
* Checkout flow code can work with a separate DB storage
* <a href="http://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
* <a href="https://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
* Addressed naming inconsistencies in REST routes
* Added Advanced Developer workflow for frontend developers
* Setup
Expand Down
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
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
7 changes: 6 additions & 1 deletion app/code/Magento/Analytics/Model/Cryptographer.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ private function getInitializationVector()
*/
private function validateCipherMethod($cipherMethod)
{
$methods = openssl_get_cipher_methods();
$methods = array_map(
'strtolower',
openssl_get_cipher_methods()
);
$cipherMethod = strtolower($cipherMethod);

return (false !== array_search($cipherMethod, $methods));
}
}
6 changes: 3 additions & 3 deletions app/code/Magento/Analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Magento_Analytics Module

The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](http://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.

The module implements the following functionality:

Expand All @@ -16,8 +16,8 @@ The module implements the following functionality:

## Structure

Beyond the [usual module file structure](http://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](http://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](https://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
The language declares SQL queries using XML declaration.

## Subscription Process
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
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
->with(
$archiveSource,
$archiveAbsolutePath,
$isArchiveSourceDirectory ? true : false
$isArchiveSourceDirectory
);

$fileContent = 'Some text';
Expand Down Expand Up @@ -222,7 +222,7 @@ public function prepareExportDataDataProvider()
{
return [
'Data source for archive is directory' => [true],
'Data source for archive doesn\'t directory' => [false],
'Data source for archive isn\'t directory' => [false],
];
}

Expand Down
8 changes: 5 additions & 3 deletions app/code/Magento/Authorizenet/Model/Directpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ protected function processOrder(\Magento\Sales\Model\Order $order)
//decline the order (in case of wrong response code) but don't return money to customer.
$message = $e->getMessage();
$this->declineOrder($order, $message, false);

throw $e;
}

Expand Down Expand Up @@ -777,7 +778,7 @@ protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment
}

/**
* Add status comment
* Add status comment to history
*
* @param \Magento\Sales\Model\Order\Payment $payment
* @return $this
Expand Down Expand Up @@ -832,6 +833,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
->void($response);
}
$order->registerCancellation($message)->save();
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
} catch (\Exception $e) {
//quiet decline
$this->getPsrLogger()->critical($e);
Expand Down Expand Up @@ -866,7 +868,7 @@ public function getConfigInterface()
* Getter for specified value according to set payment method code
*
* @param mixed $key
* @param int|string|null|\Magento\Store\Model\Store $storeId
* @param mixed $storeId
* @return mixed
*/
public function getValue($key, $storeId = null)
Expand Down Expand Up @@ -930,7 +932,7 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
}

/**
* Add statuc comment on update.
* Add status comment on update
*
* @param \Magento\Sales\Model\Order\Payment $payment
* @param \Magento\Framework\DataObject $response
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Authorizenet/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
<group>authorizenet</group>
</authorizenet_directpost>
</payment>
</default>
Expand Down
15 changes: 15 additions & 0 deletions app/code/Magento/Authorizenet/etc/payment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
<groups>
<group id="authorizenet">
<label>Authorize.net</label>
</group>
</groups>
</payment>
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* See COPYING.txt for license details.
*/

namespace Magento\Backend\Block\Widget\Form\Element;

/**
* Form element dependencies mapper
* Assumes that one element may depend on other element values.
* Will toggle as "enabled" only if all elements it depends from toggle as true.
*/
namespace Magento\Backend\Block\Widget\Form\Element;

/**
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -117,6 +116,7 @@ public function addConfigOptions(array $options)

/**
* HTML output getter
*
* @return string
*/
protected function _toHtml()
Expand All @@ -139,7 +139,8 @@ protected function _toHtml()
}

/**
* Field dependences JSON map generator
* Field dependencies JSON map generator
*
* @return string
*/
protected function _getDependsJson()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Magento\Backend\Block\Widget\Grid\Massaction;

use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\DataObject;

/**
Expand Down Expand Up @@ -52,7 +53,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand Down Expand Up @@ -217,6 +218,7 @@ public function getGridJsObjectName()
* Retrieve JSON string of selected checkboxes
*
* @return string
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelectedJson()
{
Expand All @@ -231,6 +233,7 @@ public function getSelectedJson()
* Retrieve array of selected checkboxes
*
* @return string[]
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelected()
{
Expand All @@ -252,6 +255,8 @@ public function getApplyButtonHtml()
}

/**
* Get mass action javascript code.
*
* @return string
*/
public function getJavaScript()
Expand All @@ -268,6 +273,8 @@ public function getJavaScript()
}

/**
* Get grid ids in JSON format.
*
* @return string
*/
public function getGridIdsJson()
Expand All @@ -284,6 +291,11 @@ public function getGridIdsJson()
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}

if ($allIdsCollection instanceof AbstractDb) {
$allIdsCollection->getSelect()->limit();
$allIdsCollection->clear();
}

$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
Expand All @@ -292,6 +304,8 @@ public function getGridIdsJson()
}

/**
* Get Html id.
*
* @return string
*/
public function getHtmlId()
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Model/Search/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function load()

$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
$searchFields = ['firstname', 'lastname', 'company'];
$searchFields = ['firstname', 'lastname', 'billing_company'];
$filters = [];
foreach ($searchFields as $field) {
$filters[] = $this->filterBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
<argument name="adminUser" defaultValue="_ENV"/>
</arguments>
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
<waitForPageLoad stepKey="waitForAdminLoginPageLoad"/>
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/>
<fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
<closeAdminNotification stepKey="closeAdminNotification"/>
</actionGroup>
</actionGroups>
</actionGroups>
Loading

0 comments on commit 43b9a9d

Please sign in to comment.