Skip to content

Commit 986adf1

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-67291
2 parents 821cf58 + f8b51d3 commit 986adf1

File tree

528 files changed

+7746
-1173
lines changed

Some content is hidden

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

528 files changed

+7746
-1173
lines changed

.gitignore

Lines changed: 4 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

.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/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<class>separator-top</class>
3434
<label>Store Email Addresses</label>
3535
<tab>general</tab>
36-
<resource>Magento_Backend::trans_email</resource>
36+
<resource>Magento_Config::trans_email</resource>
3737
<group id="ident_custom1" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
3838
<label>Custom Email 1</label>
3939
<field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Stock.php

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Bundle\Model\ResourceModel\Indexer;
77

88
use Magento\Catalog\Api\Data\ProductInterface;
9+
use Magento\CatalogInventory\Model\Indexer\Stock\Action\Full;
910

1011
/**
1112
* Bundle Stock Status Indexer Resource Model
@@ -15,16 +16,33 @@
1516
class Stock extends \Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\DefaultStock
1617
{
1718
/**
18-
* Reindex temporary (price result data) for defined product(s)
19-
*
20-
* @param int|array $entityIds
21-
* @return $this
19+
* @var \Magento\Indexer\Model\ResourceModel\FrontendResource
2220
*/
23-
public function reindexEntity($entityIds)
24-
{
25-
$this->_updateIndex($entityIds);
21+
private $indexerStockFrontendResource;
2622

27-
return $this;
23+
/**
24+
* Class constructor
25+
*
26+
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
27+
* @param \Magento\Framework\Indexer\Table\StrategyInterface $tableStrategy
28+
* @param \Magento\Eav\Model\Config $eavConfig
29+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
30+
* @param string $connectionName
31+
* @param null|\Magento\Indexer\Model\Indexer\StateFactory $stateFactory
32+
* @param null|\Magento\Indexer\Model\ResourceModel\FrontendResource $indexerStockFrontendResource
33+
*/
34+
public function __construct(
35+
\Magento\Framework\Model\ResourceModel\Db\Context $context,
36+
\Magento\Framework\Indexer\Table\StrategyInterface $tableStrategy,
37+
\Magento\Eav\Model\Config $eavConfig,
38+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
39+
$connectionName = null,
40+
\Magento\Indexer\Model\Indexer\StateFactory $stateFactory = null,
41+
\Magento\Indexer\Model\ResourceModel\FrontendResource $indexerStockFrontendResource = null
42+
) {
43+
parent::__construct($context, $tableStrategy, $eavConfig, $scopeConfig, $connectionName, $stateFactory);
44+
$this->indexerStockFrontendResource = $indexerStockFrontendResource ?: ObjectManager::getInstance()
45+
->get(\Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\FrontendResource::class);
2846
}
2947

3048
/**
@@ -48,7 +66,10 @@ protected function _prepareBundleOptionStockData($entityIds = null, $usePrimaryT
4866
{
4967
$this->_cleanBundleOptionStockData();
5068
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
51-
$idxTable = $usePrimaryTable ? $this->getMainTable() : $this->getIdxTable();
69+
$table = $this->getActionType() === Full::ACTION_TYPE
70+
? $this->getMainTable()
71+
: $this->indexerStockFrontendResource->getMainTable();
72+
$idxTable = $usePrimaryTable ? $table : $this->getIdxTable();
5273
$connection = $this->getConnection();
5374
$select = $connection->select()->from(
5475
['product' => $this->getTable('catalog_product_entity')],

app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
use Magento\Customer\Api\GroupManagementInterface;
99
use Magento\Framework\DataObject;
1010
use Magento\Framework\DB\Select;
11+
use Magento\Framework\EntityManager\MetadataPool;
12+
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
13+
use Magento\Framework\App\ObjectManager;
1114

1215
/**
1316
* Bundle Selections Resource Collection
17+
*
18+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1419
*/
1520
class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
1621
{
@@ -38,6 +43,99 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
3843
*/
3944
private $websiteScopePriceJoined = false;
4045

46+
/**
47+
* @var \Magento\Indexer\Model\ResourceModel\FrontendResource
48+
*/
49+
private $indexerStockFrontendResource;
50+
51+
/**
52+
* Collection constructor.
53+
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
54+
* @param \Psr\Log\LoggerInterface $logger
55+
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
56+
* @param \Magento\Framework\Event\ManagerInterface $eventManager
57+
* @param \Magento\Eav\Model\Config $eavConfig
58+
* @param \Magento\Framework\App\ResourceConnection $resource
59+
* @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
60+
* @param \Magento\Catalog\Model\ResourceModel\Helper $resourceHelper
61+
* @param \Magento\Framework\Validator\UniversalFactory $universalFactory
62+
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
63+
* @param \Magento\Framework\Module\Manager $moduleManager
64+
* @param \Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState
65+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
66+
* @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
67+
* @param \Magento\Catalog\Model\ResourceModel\Url $catalogUrl
68+
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
69+
* @param \Magento\Customer\Model\Session $customerSession
70+
* @param \Magento\Framework\Stdlib\DateTime $dateTime
71+
* @param GroupManagementInterface $groupManagement
72+
* @param \Magento\Framework\DB\Adapter\AdapterInterface|null $connection
73+
* @param ProductLimitationFactory|null $productLimitationFactory
74+
* @param MetadataPool|null $metadataPool
75+
* @param \Magento\Indexer\Model\ResourceModel\FrontendResource|null $indexerFrontendResource
76+
* @param \Magento\Indexer\Model\ResourceModel\FrontendResource|null $categoryProductIndexerFrontend
77+
* @param \Magento\Indexer\Model\ResourceModel\FrontendResource|null $indexerStockFrontendResource
78+
*
79+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
80+
* @SuppressWarnings(Magento.TypeDuplication)
81+
*/
82+
public function __construct(
83+
\Magento\Framework\Data\Collection\EntityFactory $entityFactory,
84+
\Psr\Log\LoggerInterface $logger,
85+
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
86+
\Magento\Framework\Event\ManagerInterface $eventManager,
87+
\Magento\Eav\Model\Config $eavConfig,
88+
\Magento\Framework\App\ResourceConnection $resource,
89+
\Magento\Eav\Model\EntityFactory $eavEntityFactory,
90+
\Magento\Catalog\Model\ResourceModel\Helper $resourceHelper,
91+
\Magento\Framework\Validator\UniversalFactory $universalFactory,
92+
\Magento\Store\Model\StoreManagerInterface $storeManager,
93+
\Magento\Framework\Module\Manager $moduleManager,
94+
\Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState,
95+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
96+
\Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
97+
\Magento\Catalog\Model\ResourceModel\Url $catalogUrl,
98+
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
99+
\Magento\Customer\Model\Session $customerSession,
100+
\Magento\Framework\Stdlib\DateTime $dateTime,
101+
GroupManagementInterface $groupManagement,
102+
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
103+
ProductLimitationFactory $productLimitationFactory = null,
104+
MetadataPool $metadataPool = null,
105+
\Magento\Indexer\Model\ResourceModel\FrontendResource $indexerFrontendResource = null,
106+
\Magento\Indexer\Model\ResourceModel\FrontendResource $categoryProductIndexerFrontend = null,
107+
\Magento\Indexer\Model\ResourceModel\FrontendResource $indexerStockFrontendResource = null
108+
) {
109+
parent::__construct(
110+
$entityFactory,
111+
$logger,
112+
$fetchStrategy,
113+
$eventManager,
114+
$eavConfig,
115+
$resource,
116+
$eavEntityFactory,
117+
$resourceHelper,
118+
$universalFactory,
119+
$storeManager,
120+
$moduleManager,
121+
$catalogProductFlatState,
122+
$scopeConfig,
123+
$productOptionFactory,
124+
$catalogUrl,
125+
$localeDate,
126+
$customerSession,
127+
$dateTime,
128+
$groupManagement,
129+
$connection,
130+
$productLimitationFactory,
131+
$metadataPool,
132+
$indexerFrontendResource,
133+
$categoryProductIndexerFrontend
134+
);
135+
$this->indexerStockFrontendResource = $indexerStockFrontendResource ?: ObjectManager::getInstance()
136+
->get(\Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\FrontendResource::class);
137+
}
138+
41139
/**
42140
* Initialize collection
43141
*
@@ -162,7 +260,7 @@ public function addQuantityFilter()
162260
{
163261
$this->getSelect()
164262
->joinInner(
165-
['stock' => $this->getTable('cataloginventory_stock_status')],
263+
['stock' => $this->indexerStockFrontendResource->getMainTable()],
166264
'selection.product_id = stock.product_id',
167265
[]
168266
)

0 commit comments

Comments
 (0)