Skip to content

Commit ea4b382

Browse files
committed
Merge branch '2.3-develop' into update_symfony
2 parents 5ca795b + 70466fa commit ea4b382

File tree

121 files changed

+3568
-728
lines changed

Some content is hidden

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

121 files changed

+3568
-728
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@
8585
</field>
8686
<field id="min_order_total" translate="label" type="text" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="0">
8787
<label>Minimum Order Total</label>
88+
<validate>validate-number validate-zero-or-greater</validate>
8889
</field>
8990
<field id="max_order_total" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0">
9091
<label>Maximum Order Total</label>
92+
<validate>validate-number validate-zero-or-greater</validate>
9193
</field>
9294
<field id="sort_order" translate="label" type="text" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0">
9395
<label>Sort Order</label>

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

+2
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@
101101
<field id="min_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
102102
<label>Minimum Order Total</label>
103103
<config_path>payment/authorizenet_acceptjs/min_order_total</config_path>
104+
<validate>validate-number validate-zero-or-greater</validate>
104105
</field>
105106
<field id="max_order_total" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0">
106107
<label>Maximum Order Total</label>
107108
<config_path>payment/authorizenet_acceptjs/max_order_total</config_path>
109+
<validate>validate-number validate-zero-or-greater</validate>
108110
</field>
109111
<field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
110112
<label>Sort Order</label>

app/code/Magento/Bundle/Setup/Patch/Data/ApplyAttributesUpdate.php

+13-14
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use Magento\Eav\Setup\EavSetupFactory;
1515

1616
/**
17-
* Class ApplyAttributesUpdate
18-
* @package Magento\Bundle\Setup\Patch
17+
* Class \Magento\Bundle\Setup\Patch\ApplyAttributesUpdate
1918
*/
2019
class ApplyAttributesUpdate implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -44,7 +43,7 @@ public function __construct(
4443
}
4544

4645
/**
47-
* {@inheritdoc}
46+
* @inheritdoc
4847
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
4948
*/
5049
public function apply()
@@ -66,8 +65,8 @@ public function apply()
6665
',',
6766
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to')
6867
);
69-
if (!in_array('bundle', $applyTo)) {
70-
$applyTo[] = 'bundle';
68+
if (!in_array(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $applyTo)) {
69+
$applyTo[] = \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE;
7170
$eavSetup->updateAttribute(
7271
\Magento\Catalog\Model\Product::ENTITY,
7372
$field,
@@ -78,7 +77,7 @@ public function apply()
7877
}
7978

8079
$applyTo = explode(',', $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'cost', 'apply_to'));
81-
unset($applyTo[array_search('bundle', $applyTo)]);
80+
unset($applyTo[array_search(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $applyTo)]);
8281
$eavSetup->updateAttribute(\Magento\Catalog\Model\Product::ENTITY, 'cost', 'apply_to', implode(',', $applyTo));
8382

8483
/**
@@ -106,7 +105,7 @@ public function apply()
106105
'visible_on_front' => false,
107106
'used_in_product_listing' => true,
108107
'unique' => false,
109-
'apply_to' => 'bundle'
108+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
110109
]
111110
);
112111

@@ -131,7 +130,7 @@ public function apply()
131130
'comparable' => false,
132131
'visible_on_front' => false,
133132
'unique' => false,
134-
'apply_to' => 'bundle'
133+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
135134
]
136135
);
137136

@@ -157,7 +156,7 @@ public function apply()
157156
'visible_on_front' => false,
158157
'used_in_product_listing' => true,
159158
'unique' => false,
160-
'apply_to' => 'bundle'
159+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
161160
]
162161
);
163162

@@ -184,7 +183,7 @@ public function apply()
184183
'visible_on_front' => false,
185184
'used_in_product_listing' => true,
186185
'unique' => false,
187-
'apply_to' => 'bundle'
186+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
188187
]
189188
);
190189

@@ -210,29 +209,29 @@ public function apply()
210209
'visible_on_front' => false,
211210
'used_in_product_listing' => true,
212211
'unique' => false,
213-
'apply_to' => 'bundle'
212+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
214213
]
215214
);
216215
}
217216

218217
/**
219-
* {@inheritdoc}
218+
* @inheritdoc
220219
*/
221220
public static function getDependencies()
222221
{
223222
return [];
224223
}
225224

226225
/**
227-
* {@inheritdoc}
226+
* @inheritdoc
228227
*/
229228
public static function getVersion()
230229
{
231230
return '2.0.0';
232231
}
233232

234233
/**
235-
* {@inheritdoc}
234+
* @inheritdoc
236235
*/
237236
public function getAliases()
238237
{

app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ public function apply()
4141
'catalog_product_index_price_bundle_opt_tmp',
4242
];
4343
foreach ($tables as $table) {
44-
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
44+
$tableName = $this->schemaSetup->getTable($table);
45+
if ($this->schemaSetup->getConnection()->isTableExists($tableName)) {
46+
$this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB');
47+
}
4548
}
4649

4750
$this->schemaSetup->endSetup();

app/code/Magento/CardinalCommerce/etc/config.xml

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
99
<default>
10+
<dev>
11+
<js>
12+
<minify_exclude>
13+
<cardinal_commerce>/v1/songbird</cardinal_commerce>
14+
</minify_exclude>
15+
</js>
16+
</dev>
1017
<three_d_secure>
1118
<cardinal>
1219
<environment>production</environment>

app/code/Magento/Catalog/Model/Product/Type/Price.php

+2-14
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ class Price
9393
*/
9494
private $tierPriceExtensionFactory;
9595

96-
/**
97-
* @var \Magento\CatalogRule\Model\RuleDateFormatterInterface
98-
*/
99-
private $ruleDateFormatter;
100-
10196
/**
10297
* Constructor
10398
*
@@ -111,7 +106,6 @@ class Price
111106
* @param \Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory $tierPriceFactory
112107
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
113108
* @param ProductTierPriceExtensionFactory|null $tierPriceExtensionFactory
114-
* @param \Magento\CatalogRule\Model\RuleDateFormatterInterface|null $ruleDateFormatter
115109
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
116110
*/
117111
public function __construct(
@@ -124,8 +118,7 @@ public function __construct(
124118
GroupManagementInterface $groupManagement,
125119
\Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory $tierPriceFactory,
126120
\Magento\Framework\App\Config\ScopeConfigInterface $config,
127-
ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null,
128-
\Magento\CatalogRule\Model\RuleDateFormatterInterface $ruleDateFormatter = null
121+
ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null
129122
) {
130123
$this->_ruleFactory = $ruleFactory;
131124
$this->_storeManager = $storeManager;
@@ -138,8 +131,6 @@ public function __construct(
138131
$this->config = $config;
139132
$this->tierPriceExtensionFactory = $tierPriceExtensionFactory ?: ObjectManager::getInstance()
140133
->get(ProductTierPriceExtensionFactory::class);
141-
$this->ruleDateFormatter = $ruleDateFormatter ?: ObjectManager::getInstance()
142-
->get(\Magento\CatalogRule\Model\RuleDateFormatterInterface::class);
143134
}
144135

145136
/**
@@ -605,10 +596,7 @@ public function calculatePrice(
605596
) {
606597
\Magento\Framework\Profiler::start('__PRODUCT_CALCULATE_PRICE__');
607598
if ($wId instanceof Store) {
608-
$sId = $wId->getId();
609599
$wId = $wId->getWebsiteId();
610-
} else {
611-
$sId = $this->_storeManager->getWebsite($wId)->getDefaultGroup()->getDefaultStoreId();
612600
}
613601

614602
$finalPrice = $basePrice;
@@ -622,7 +610,7 @@ public function calculatePrice(
622610
);
623611

624612
if ($rulePrice === false) {
625-
$date = $this->ruleDateFormatter->getDate($sId);
613+
$date = $this->_localeDate->date(null, null, false);
626614
$rulePrice = $this->_ruleFactory->create()->getRulePrice($date, $wId, $gId, $productId);
627615
}
628616

app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public function apply()
4747
'catalog_category_product_index_tmp',
4848
];
4949
foreach ($tables as $table) {
50-
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
50+
$tableName = $this->schemaSetup->getTable($table);
51+
if ($this->schemaSetup->getConnection()->isTableExists($tableName)) {
52+
$this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB');
53+
}
5154
}
5255

5356
$this->schemaSetup->endSetup();

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</section>
5050
<section name="CatalogWYSIWYGSection">
5151
<element name="ShowHideBtn" type="button" selector="#togglecategory_form_description"/>
52-
<element name="TinyMCE4" type="text" selector=".mce-branding-powered-by"/>
52+
<element name="TinyMCE4" type="text" selector=".mce-branding"/>
5353
<element name="Style" type="button" selector=".mce-txt" />
5454
<element name="Bold" type="button" selector=".mce-i-bold" />
5555
<element name="Italic" type="button" selector=".mce-i-italic" />

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<element name="Save" type="button" selector="#save" timeout="30"/>
2121
<element name="DeleteAttribute" type="button" selector="#delete" timeout="30"/>
2222
<element name="SaveAndEdit" type="button" selector="#save_and_edit_button" timeout="30"/>
23-
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//div[@class='mce-branding-powered-by']"/>
23+
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//*[contains(@class,'mce-branding')]"/>
2424
<element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
2525
<element name="useInLayeredNavigation" type="select" selector="#is_filterable"/>
2626
<element name="addSwatch" type="button" selector="#add_new_swatch_text_option_button"/>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@
121121
<element name="InsertImageIcon" type="button" selector="//div[contains(@id, '{{var1}}')]//i[@class='mce-ico mce-i-image']" parameterized="true"/>
122122
<element name="InsertTable" type="button" selector="//div[contains(@id, '{{var1}}')]//i[@class='mce-ico mce-i-table']" parameterized="true"/>
123123
<element name="SpecialCharacter" type="button" selector="//div[contains(@id, '{{var1}}')]//i[@class='mce-ico mce-i-charmap']" parameterized="true"/>
124-
<element name="TinyMCE4" type="text" selector="//div[contains(@id, '{{var1}}')]//div[@class='mce-branding-powered-by']" parameterized="true"/>
124+
<element name="TinyMCE4" type="text" selector="//div[contains(@id, '{{var1}}')]//*[contains(@class,'mce-branding')]" parameterized="true"/>
125125
</section>
126126
<section name="ProductDescriptionWYSIWYGToolbarSection">
127-
<element name="TinyMCE4" type ="button" selector="//div[@id='editorproduct_form_description']//div[@class='mce-branding-powered-by']" />
127+
<element name="TinyMCE4" type ="button" selector="//div[@id='editorproduct_form_description']//*[contains(@class,'mce-branding')]" />
128128
<element name="showHideBtn" type="button" selector="#toggleproduct_form_description"/>
129129
<element name="InsertImageBtn" type="button" selector="#buttonsproduct_form_description > .scalable.action-add-image.plugin" />
130130
<element name="Style" type="button" selector="//div[@id='editorproduct_form_description']//span[text()='Paragraph']" />
@@ -162,7 +162,7 @@
162162
<element name="confirmDelete" type="button" selector=".action-primary.action-accept" />
163163
</section>
164164
<section name="ProductShortDescriptionWYSIWYGToolbarSection">
165-
<element name="TinyMCE4" type ="button" selector="//div[@id='editorproduct_form_short_description']//div[@class='mce-branding-powered-by']" />
165+
<element name="TinyMCE4" type ="button" selector="//div[@id='editorproduct_form_short_description']//*[contains(@class,'mce-branding')]" />
166166
<element name="InsertImageBtn" type="button" selector="#buttonsproduct_form_short_description > .scalable.action-add-image.plugin" />
167167
<element name="showHideBtn" type="button" selector="#toggleproduct_form_short_description"/>
168168
<element name="Style" type="button" selector="//div[@id='editorproduct_form_short_description']//span[text()='Paragraph']" />

app/code/Magento/CatalogInventory/Setup/Patch/Schema/ChangeTmpTablesEngine.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public function apply()
3535
{
3636
$this->schemaSetup->startSetup();
3737

38-
$this->schemaSetup->getConnection()->changeTableEngine('cataloginventory_stock_status_tmp', 'InnoDB');
38+
$tableName = $this->schemaSetup->getTable('cataloginventory_stock_status_tmp');
39+
if ($this->schemaSetup->getConnection()->isTableExists($tableName)) {
40+
$this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB');
41+
}
3942

4043
$this->schemaSetup->endSetup();
4144
}

app/code/Magento/CatalogRule/Model/ResourceModel/Product/CollectionProcessor.php

+2-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection;
1212
use Magento\CatalogRule\Pricing\Price\CatalogRulePrice;
13-
use Magento\Framework\App\ObjectManager;
1413

1514
/**
1615
* Add catalog rule prices to collection
@@ -44,34 +43,25 @@ class CollectionProcessor
4443
*/
4544
private $localeDate;
4645

47-
/**
48-
* @var \Magento\CatalogRule\Model\RuleDateFormatterInterface
49-
*/
50-
private $ruleDateFormatter;
51-
5246
/**
5347
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
5448
* @param \Magento\Framework\App\ResourceConnection $resourceConnection
5549
* @param \Magento\Customer\Model\Session $customerSession
5650
* @param \Magento\Framework\Stdlib\DateTime $dateTime
5751
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
58-
* @param \Magento\CatalogRule\Model\RuleDateFormatterInterface|null $ruleDateFormatter
5952
*/
6053
public function __construct(
6154
\Magento\Store\Model\StoreManagerInterface $storeManager,
6255
\Magento\Framework\App\ResourceConnection $resourceConnection,
6356
\Magento\Customer\Model\Session $customerSession,
6457
\Magento\Framework\Stdlib\DateTime $dateTime,
65-
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
66-
\Magento\CatalogRule\Model\RuleDateFormatterInterface $ruleDateFormatter = null
58+
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
6759
) {
6860
$this->storeManager = $storeManager;
6961
$this->resource = $resourceConnection;
7062
$this->customerSession = $customerSession;
7163
$this->dateTime = $dateTime;
7264
$this->localeDate = $localeDate;
73-
$this->ruleDateFormatter = $ruleDateFormatter ?: ObjectManager::getInstance()
74-
->get(\Magento\CatalogRule\Model\RuleDateFormatterInterface::class);
7565
}
7666

7767
/**
@@ -100,7 +90,7 @@ public function addPriceData(ProductCollection $productCollection, $joinColumn =
10090
),
10191
$connection->quoteInto(
10292
'catalog_rule.rule_date = ?',
103-
$this->dateTime->formatDate($this->ruleDateFormatter->getDate($store->getId()), false)
93+
$this->dateTime->formatDate($this->localeDate->date(null, null, false), false)
10494
),
10595
]
10696
),

app/code/Magento/CatalogRule/Model/ResourceModel/Product/LinkedProductSelectBuilderByCatalogRulePrice.php

+2-12
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ class LinkedProductSelectBuilderByCatalogRulePrice implements LinkedProductSelec
5555
*/
5656
private $baseSelectProcessor;
5757

58-
/**
59-
* @var \Magento\CatalogRule\Model\RuleDateFormatterInterface
60-
*/
61-
private $ruleDateFormatter;
62-
6358
/**
6459
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
6560
* @param \Magento\Framework\App\ResourceConnection $resourceConnection
@@ -68,7 +63,6 @@ class LinkedProductSelectBuilderByCatalogRulePrice implements LinkedProductSelec
6863
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
6964
* @param \Magento\Framework\EntityManager\MetadataPool $metadataPool
7065
* @param BaseSelectProcessorInterface $baseSelectProcessor
71-
* @param \Magento\CatalogRule\Model\RuleDateFormatterInterface|null $ruleDateFormatter
7266
*/
7367
public function __construct(
7468
\Magento\Store\Model\StoreManagerInterface $storeManager,
@@ -77,8 +71,7 @@ public function __construct(
7771
\Magento\Framework\Stdlib\DateTime $dateTime,
7872
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
7973
\Magento\Framework\EntityManager\MetadataPool $metadataPool,
80-
BaseSelectProcessorInterface $baseSelectProcessor = null,
81-
\Magento\CatalogRule\Model\RuleDateFormatterInterface $ruleDateFormatter = null
74+
BaseSelectProcessorInterface $baseSelectProcessor = null
8275
) {
8376
$this->storeManager = $storeManager;
8477
$this->resource = $resourceConnection;
@@ -88,17 +81,14 @@ public function __construct(
8881
$this->metadataPool = $metadataPool;
8982
$this->baseSelectProcessor = (null !== $baseSelectProcessor)
9083
? $baseSelectProcessor : ObjectManager::getInstance()->get(BaseSelectProcessorInterface::class);
91-
$this->ruleDateFormatter = $ruleDateFormatter ?: ObjectManager::getInstance()
92-
->get(\Magento\CatalogRule\Model\RuleDateFormatterInterface::class);
9384
}
9485

9586
/**
9687
* @inheritdoc
9788
*/
9889
public function build($productId)
9990
{
100-
$timestamp = $this->ruleDateFormatter->getTimeStamp($this->storeManager->getStore());
101-
$currentDate = $this->dateTime->formatDate($timestamp, false);
91+
$currentDate = $this->dateTime->formatDate($this->localeDate->date(null, null, false), false);
10292
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
10393
$productTable = $this->resource->getTableName('catalog_product_entity');
10494

0 commit comments

Comments
 (0)