Skip to content

Commit fbb81c9

Browse files
Merge pull request #11 from magento/2.3-develop
2.3 develop
2 parents 82d0491 + 943e2cd commit fbb81c9

File tree

1,258 files changed

+30982
-9783
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,258 files changed

+30982
-9783
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# Contributing to Magento 2 code
22

33
Contributions to the Magento 2 codebase are done using the fork & pull model.
4-
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes (hence the phrase “pull request”).
4+
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes. For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
55

6-
Contributions can take the form of new components/features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations or just good suggestions.
6+
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 or optimizations.
77

8-
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor for two weeks, the issue is closed.
8+
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks, the pull request will be closed.
99

1010

1111
## Contribution requirements
1212

13-
1. Contributions must adhere to [Magento coding standards](http://devdocs.magento.com/guides/v2.0/coding-standards/bk-coding-standards.html).
14-
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request to be merged quickly and without additional clarification requests.
15-
3. Commits must be accompanied by meaningful commit messages.
16-
4. PRs which include bug fixing, must be accompanied with step-by-step description of how to reproduce the bug.
13+
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
14+
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
15+
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.2-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
16+
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
1717
3. PRs which include new logic or new features must be submitted along with:
18-
* Unit/integration test coverage (we will be releasing more information on writing test coverage in the near future).
19-
* Proposed [documentation](http://devdocs.magento.com) update. Documentation contributions can be submitted [here](https://github.com/magento/devdocs).
20-
4. For large features or changes, please [open an issue](https://github.com/magento/magento2/issues) and discuss first. This may prevent duplicate or unnecessary effort, and it may gain you some additional contributors.
21-
5. All automated tests are passed successfully (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
18+
* Unit/integration test coverage
19+
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
20+
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.
21+
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
2222

2323
## Contribution process
2424

25-
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). By doing that, you will be able to collaborate with the Magento 2 development team, fork the Magento 2 project and be able to easily send pull requests.
25+
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
2626

2727
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.
2828
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
2929
3. Create and test your work.
30-
4. Fork the Magento 2 repository according to [Fork a repository instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow [Create a pull request instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#pull_request).
31-
5. Once your contribution is received, Magento 2 development team will review the contribution and collaborate with you as needed to improve the quality of the contribution.
30+
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).
31+
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3232

3333
## Code of Conduct
3434

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
1-
<!--- Provide a general summary of the issue in the Title above -->
2-
<!--- Before adding new issues, please, check this article https://github.com/magento/magento2/wiki/Issue-reporting-guidelines-->
1+
<!---
2+
Thank you for contributing to Magento.
3+
To help us process this issue we recommend that you add the following information:
4+
- Summary of the issue,
5+
- Information on your environment,
6+
- Steps to reproduce,
7+
- Expected and actual results,
8+
9+
Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
10+
-->
311

412
### Preconditions
5-
<!--- Provide a more detailed information of environment you use -->
6-
<!--- Magento version, tag, HEAD, etc., PHP & MySQL version, etc.. -->
13+
<!---
14+
Please provide as detailed information about your environment as possible.
15+
For example Magento version, tag, HEAD, PHP & MySQL version, etc..
16+
-->
717
1.
818
2.
919

1020
### Steps to reproduce
11-
<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant -->
21+
<!---
22+
It is important to provide a set of clear steps to reproduce this bug.
23+
If relevant please include code samples
24+
-->
1225
1.
1326
2.
1427
3.
1528

1629
### Expected result
1730
<!--- Tell us what should happen -->
18-
1.
31+
1. [Screenshots, logs or description]
1932

2033
### Actual result
2134
<!--- Tell us what happens instead -->
22-
1. [Screenshot, logs]
23-
24-
<!--- (This may be platform independent comment) -->
35+
1. [Screenshots, logs or description]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1-
<!--- Provide a general summary of the Pull Request in the Title above -->
1+
<!---
2+
Thank you for contributing to Magento.
3+
To help us process this pull request we recommend that you add the following information:
4+
- Summary of the pull request,
5+
- Issue(s) related to the changes made,
6+
- Manual testing scenarios,
7+
-->
8+
9+
<!--- Please provide a general summary of the Pull Request in the Title above -->
210

311
### Description
4-
<!--- Provide a description of the changes proposed in the pull request -->
12+
<!---
13+
Please provide a description of the changes proposed in the pull request.
14+
Letting us know what has changed and why it needed changing will help us validate this pull request.
15+
-->
516

617
### Fixed Issues (if relevant)
7-
<!--- Provide a list of fixed issues in the format magento/magento2#<issue_number>, if relevant -->
18+
<!---
19+
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
20+
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
21+
-->
822
1. magento/magento2#<issue_number>: Issue title
923
2. ...
1024

1125
### Manual testing scenarios
12-
<!--- Provide a set of unambiguous steps to test the proposed code change -->
26+
<!---
27+
Please provide a set of unambiguous steps to test the proposed code change.
28+
Giving us manual testing scenarios will help with the processing and validation process.
29+
-->
1330
1. ...
1431
2. ...
1532

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
global:
2323
- COMPOSER_BIN_DIR=~/bin
2424
- INTEGRATION_SETS=3
25-
- NODE_JS_VERSION=6
25+
- NODE_JS_VERSION=8
2626
- MAGENTO_HOST_NAME="magento2.travis"
2727
matrix:
2828
- TEST_SUITE=unit

COPYING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2013-2018 Magento, Inc.
1+
Copyright © 2013-present Magento, Inc.
22

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

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ public function execute()
6262
if (empty($result)) {
6363
$result[] = [
6464
'severity' => (string)\Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE,
65-
'text' => 'You have viewed and resolved all recent system notices. '
66-
. 'Please refresh the web page to clear the notice alert.',
65+
'text' => __(
66+
'You have viewed and resolved all recent system notices. '
67+
. 'Please refresh the web page to clear the notice alert.'
68+
)
6769
];
6870
}
6971
/** @var \Magento\Framework\Controller\Result\Json $resultJson */

app/code/Magento/AdminNotification/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Severity,Severity
4848
"Date Added","Date Added"
4949
Message,Message
5050
Actions,Actions
51+
"You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert.","You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert."

app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
use Magento\Framework\Model\ResourceModel\Db\Context;
1111
use Magento\Framework\EntityManager\MetadataPool;
1212
use Magento\Catalog\Api\Data\CategoryInterface;
13+
use Magento\Framework\App\ObjectManager;
14+
use Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver as TableResolver;
15+
use Magento\Framework\Search\Request\Dimension;
16+
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
1317

1418
/**
1519
* @api
@@ -29,22 +33,30 @@ class Index extends AbstractDb
2933
*/
3034
protected $metadataPool;
3135

36+
/**
37+
* @var TableResolver
38+
*/
39+
private $tableResolver;
40+
3241
/**
3342
* Index constructor.
3443
* @param Context $context
3544
* @param StoreManagerInterface $storeManager
3645
* @param MetadataPool $metadataPool
3746
* @param null $connectionName
47+
* @param TableResolver|null $tableResolver
3848
*/
3949
public function __construct(
4050
Context $context,
4151
StoreManagerInterface $storeManager,
4252
MetadataPool $metadataPool,
43-
$connectionName = null
53+
$connectionName = null,
54+
TableResolver $tableResolver = null
4455
) {
4556
parent::__construct($context, $connectionName);
4657
$this->storeManager = $storeManager;
4758
$this->metadataPool = $metadataPool;
59+
$this->tableResolver = $tableResolver ?: ObjectManager::getInstance()->get(TableResolver::class);
4860
}
4961

5062
/**
@@ -116,8 +128,17 @@ public function getCategoryProductIndexData($storeId = null, $productIds = null)
116128
{
117129
$connection = $this->getConnection();
118130

131+
$catalogCategoryProductDimension = new Dimension(\Magento\Store\Model\Store::ENTITY, $storeId);
132+
133+
$catalogCategoryProductTableName = $this->tableResolver->resolve(
134+
AbstractAction::MAIN_INDEX_TABLE,
135+
[
136+
$catalogCategoryProductDimension
137+
]
138+
);
139+
119140
$select = $connection->select()->from(
120-
[$this->getTable('catalog_category_product_index')],
141+
[$catalogCategoryProductTableName],
121142
['category_id', 'product_id', 'position', 'store_id']
122143
)->where(
123144
'store_id = ?',

app/code/Magento/Analytics/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
Your reports can be accessed securely on a personalized dashboard outside of the admin panel by clicking on the
1818
"Go to Advanced Reporting" link. </br> For more information, see our <a href="https://magento.com/legal/terms/cloud-terms">
1919
terms and conditions</a>.]]></comment>
20-
<field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
20+
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
2121
<label>Advanced Reporting Service</label>
2222
<source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
2323
<backend_model>Magento\Analytics\Model\Config\Backend\Enabled</backend_model>
2424
<frontend_model>Magento\Analytics\Block\Adminhtml\System\Config\SubscriptionStatusLabel</frontend_model>
2525
<config_path>analytics/subscription/enabled</config_path>
2626
</field>
27-
<field id="collection_time" translate="label comment" type="time" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
27+
<field id="collection_time" translate="label" type="time" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
2828
<label>Time of day to send data</label>
2929
<frontend_model>Magento\Analytics\Block\Adminhtml\System\Config\CollectionTimeLabel</frontend_model>
3030
<backend_model>Magento\Analytics\Model\Config\Backend\CollectionTime</backend_model>

app/code/Magento/Backend/Block/Dashboard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Dashboard extends \Magento\Backend\Block\Template
2020
/**
2121
* @var string
2222
*/
23-
protected $_template = 'dashboard/index.phtml';
23+
protected $_template = 'Magento_Backend::dashboard/index.phtml';
2424

2525
/**
2626
* @return void

app/code/Magento/Backend/Block/Dashboard/Graph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard
9090
/**
9191
* @var string
9292
*/
93-
protected $_template = 'dashboard/graph.phtml';
93+
protected $_template = 'Magento_Backend::dashboard/graph.phtml';
9494

9595
/**
9696
* Adminhtml dashboard data

app/code/Magento/Backend/Block/Dashboard/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
1717
/**
1818
* @var string
1919
*/
20-
protected $_template = 'dashboard/grid.phtml';
20+
protected $_template = 'Magento_Backend::dashboard/grid.phtml';
2121

2222
/**
2323
* Setting default for every grid on dashboard

app/code/Magento/Backend/Block/Dashboard/Sales.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Sales extends \Magento\Backend\Block\Dashboard\Bar
1515
/**
1616
* @var string
1717
*/
18-
protected $_template = 'dashboard/salebar.phtml';
18+
protected $_template = 'Magento_Backend::dashboard/salebar.phtml';
1919

2020
/**
2121
* @var \Magento\Framework\Module\Manager

app/code/Magento/Backend/Block/Dashboard/Totals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Totals extends \Magento\Backend\Block\Dashboard\Bar
1616
/**
1717
* @var string
1818
*/
19-
protected $_template = 'dashboard/totalbar.phtml';
19+
protected $_template = 'Magento_Backend::dashboard/totalbar.phtml';
2020

2121
/**
2222
* @var \Magento\Framework\Module\Manager

app/code/Magento/Backend/Block/Page/Copyright.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ class Copyright extends \Magento\Backend\Block\Template
1818
*
1919
* @var string
2020
*/
21-
protected $_template = 'page/copyright.phtml';
21+
protected $_template = 'Magento_Backend::page/copyright.phtml';
2222
}

app/code/Magento/Backend/Block/Page/Footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Footer extends \Magento\Backend\Block\Template
1717
/**
1818
* @var string
1919
*/
20-
protected $_template = 'page/footer.phtml';
20+
protected $_template = 'Magento_Backend::page/footer.phtml';
2121

2222
/**
2323
* @var \Magento\Framework\App\ProductMetadataInterface

app/code/Magento/Backend/Block/Page/Header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Header extends \Magento\Backend\Block\Template
1818
/**
1919
* @var string
2020
*/
21-
protected $_template = 'page/header.phtml';
21+
protected $_template = 'Magento_Backend::page/header.phtml';
2222

2323
/**
2424
* Backend data

app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Fieldset extends \Magento\Backend\Block\Template implements RendererInterf
2525
/**
2626
* @var string
2727
*/
28-
protected $_template = 'store/switcher/form/renderer/fieldset.phtml';
28+
protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset.phtml';
2929

3030
/**
3131
* Retrieve an element

app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme
2323
/**
2424
* @var string
2525
*/
26-
protected $_template = 'store/switcher/form/renderer/fieldset/element.phtml';
26+
protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset/element.phtml';
2727

2828
/**
2929
* Retrieve an element

app/code/Magento/Backend/Block/Template.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Backend\Block;
710

811
/**
@@ -17,10 +20,12 @@
1720
* Example:
1821
* <block name="my.block" class="Magento\Backend\Block\Template" template="My_Module::template.phtml" >
1922
* <arguments>
20-
* <argument name="viewModel" xsi:type="object">My\Module\ViewModel\Custom</argument>
23+
* <argument name="view_model" xsi:type="object">My\Module\ViewModel\Custom</argument>
2124
* </arguments>
2225
* </block>
2326
*
27+
* Your class object can then be accessed by doing $block->getViewModel()
28+
*
2429
* @api
2530
* @SuppressWarnings(PHPMD.NumberOfChildren)
2631
* @since 100.0.2

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ public function __construct(
6868
$this->_storeManager = $storeManager;
6969
$this->_currencyLocator = $currencyLocator;
7070
$this->_localeCurrency = $localeCurrency;
71-
$defaultBaseCurrencyCode = $this->_scopeConfig->getValue(
72-
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE,
73-
'default'
74-
);
71+
$defaultBaseCurrencyCode = $currencyLocator->getDefaultCurrency($this->_request);
7572
$this->_defaultBaseCurrency = $currencyFactory->create()->load($defaultBaseCurrencyCode);
7673
}
7774

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function render(\Magento\Framework\DataObject $row)
6565
*/
6666
protected function _getCheckboxHtml($value, $checked)
6767
{
68-
$id = 'id_' . rand(0, 999);
68+
$id = 'id_' . random_int(0, 999);
6969
$html = '<label class="data-grid-checkbox-cell-inner" for="'. $id .'">';
7070
$html .= '<input type="checkbox" name="' . $this->getColumn()->getName() . '" ';
7171
$html .= 'id="' . $id . '" data-role="select-row"';

0 commit comments

Comments
 (0)