Skip to content

Commit aafadcf

Browse files
authored
Merge branch '2.4-develop' into Refactoring-StorefrontProductNameWithDoubleQuoteTest
2 parents 72d76fc + 9ff22de commit aafadcf

File tree

396 files changed

+3144
-5086
lines changed

Some content is hidden

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

396 files changed

+3144
-5086
lines changed

Gruntfile.js.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ module.exports = function (grunt) {
5252
prod: function (component) {
5353
var tasks = [
5454
'less',
55-
'autoprefixer',
5655
'cssmin',
5756
'usebanner'
5857
].map(function (task) {

app/bootstrap.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@
3030
exit(1);
3131
}
3232

33+
// PHP 8 compatibility. Define constants that are not present in PHP < 8.0
34+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80000) {
35+
if (!defined('T_NAME_QUALIFIED')) {
36+
define('T_NAME_QUALIFIED', 24001);
37+
}
38+
if (!defined('T_NAME_FULLY_QUALIFIED')) {
39+
define('T_NAME_FULLY_QUALIFIED', 24002);
40+
}
41+
}
42+
3343
require_once __DIR__ . '/autoload.php';
3444
// Sets default autoload mappings, may be overridden in Bootstrap::create
3545
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);

app/code/Magento/AdminAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*",
1111
"magento/module-config": "*",

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"lib-libxml": "*",
1010
"magento/framework": "*",
1111
"magento/module-backend": "*",

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-catalog": "*",
1111
"magento/module-catalog-import-export": "*",

app/code/Magento/AdvancedSearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/module-customer": "*",
1414
"magento/module-search": "*",
1515
"magento/module-store": "*",
16-
"php": "~7.3.0||~7.4.0"
16+
"php": "~7.4.0||~8.0.0"
1717
},
1818
"type": "magento2-module",
1919
"license": [

app/code/Magento/Amqp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/framework": "*",
99
"magento/framework-amqp": "*",
1010
"magento/framework-message-queue": "*",
11-
"php": "~7.3.0||~7.4.0"
11+
"php": "~7.4.0||~8.0.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/AmqpStore/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/framework": "*",
99
"magento/framework-amqp": "*",
1010
"magento/module-store": "*",
11-
"php": "~7.3.0||~7.4.0"
11+
"php": "~7.4.0||~8.0.0"
1212
},
1313
"suggest": {
1414
"magento/module-asynchronous-operations": "*",

app/code/Magento/Analytics/Model/Config/Mapper.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ public function execute($configData)
5252
$providerData['parameters'] = !empty($providerData['parameters'])
5353
? reset($providerData['parameters'])
5454
: [];
55-
$providerData['parameters'] = array_map(
56-
'reset',
57-
$providerData['parameters']
58-
);
55+
array_walk($providerData['parameters'], function (&$array) {
56+
$array = reset($array);
57+
});
5958
$providers[$providerType] = $providerData;
6059
}
6160
$files[$fileData['name']] = $fileData;

app/code/Magento/Analytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-analytics",
33
"description": "N/A",
44
"require": {
5-
"php": "~7.3.0||~7.4.0",
5+
"php": "~7.4.0||~8.0.0",
66
"magento/module-backend": "*",
77
"magento/module-config": "*",
88
"magento/module-integration": "*",

app/code/Magento/AsynchronousOperations/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"magento/module-authorization": "*",
1212
"magento/module-backend": "*",
1313
"magento/module-ui": "*",
14-
"php": "~7.3.0||~7.4.0"
14+
"php": "~7.4.0||~8.0.0"
1515
},
1616
"suggest": {
1717
"magento/module-admin-notification": "*",

app/code/Magento/Authorization/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*"
1111
},

app/code/Magento/AwsS3/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-remote-storage": "*",
1111
"league/flysystem": "^2.0",

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backup": "*",
1111
"magento/module-catalog": "*",

app/code/Magento/Backup/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*",
1111
"magento/module-cron": "*",

app/code/Magento/Bundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*",
1111
"magento/module-catalog": "*",

app/code/Magento/BundleGraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "N/A",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~7.3.0||~7.4.0",
6+
"php": "~7.4.0||~8.0.0",
77
"magento/module-catalog": "*",
88
"magento/module-bundle": "*",
99
"magento/module-graph-ql": "*",

app/code/Magento/BundleImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-bundle": "*",
1111
"magento/module-store": "*",

app/code/Magento/CacheInvalidate/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-page-cache": "*"
1111
},

app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class DefaultTest extends TestCase
5151
'case_sensitive' => '0',
5252
'shown_to_logged_in_user' => ['contact_us' => 1],
5353
'always_for' => [
54-
'user_create',
55-
'user_forgotpassword',
56-
'contact_us',
54+
'user_create' => '1',
55+
'user_forgotpassword' => '1',
56+
'contact_us' => '1'
5757
],
5858
];
5959

app/code/Magento/Captcha/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*",
1111
"magento/module-checkout": "*",

app/code/Magento/CardinalCommerce/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-checkout": "*",
1111
"magento/module-payment": "*",

app/code/Magento/Catalog/Model/ProductLink/CollectionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function (array $itemA, array $itemB): int {
8888
$posA = (int)$itemA['position'];
8989
$posB = (int)$itemB['position'];
9090

91-
return $posA <=> $posB;
91+
return (($posA - $posB) > 0) ? 1 : -1; // for PHP 7 and 8 consistency
9292
}
9393
);
9494

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,8 @@ public function getProductsPosition($category)
518518
$websiteId
519519
);
520520
}
521-
$bind = ['category_id' => (int)$category->getId()];
522521

523-
return $this->getConnection()->fetchPairs($select, $bind);
522+
return $this->getConnection()->fetchPairs($select);
524523
}
525524

526525
/**

app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,7 @@ public function getProductsPosition($category)
714714
$websiteId
715715
);
716716
}
717-
$bind = ['category_id' => (int)$category->getId()];
718717

719-
return $this->getConnection()->fetchPairs($select, $bind);
718+
return $this->getConnection()->fetchPairs($select);
720719
}
721720
}

app/code/Magento/Catalog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-authorization": "*",
1111
"magento/module-asynchronous-operations": "*",

app/code/Magento/CatalogAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-catalog-analytics",
33
"description": "N/A",
44
"require": {
5-
"php": "~7.3.0||~7.4.0",
5+
"php": "~7.4.0||~8.0.0",
66
"magento/framework": "*",
77
"magento/module-catalog": "*",
88
"magento/module-analytics": "*"

app/code/Magento/CatalogCmsGraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "N/A",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~7.3.0||~7.4.0",
6+
"php": "~7.4.0||~8.0.0",
77
"magento/framework": "*",
88
"magento/module-catalog": "*",
99
"magento/module-cms-graph-ql": "*"

app/code/Magento/CatalogCustomerGraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "N/A",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~7.3.0||~7.4.0",
6+
"php": "~7.4.0||~8.0.0",
77
"magento/framework": "*",
88
"magento/module-catalog": "*",
99
"magento/module-customer": "*",

app/code/Magento/CatalogGraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "N/A",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~7.3.0||~7.4.0",
6+
"php": "~7.4.0||~8.0.0",
77
"magento/module-eav": "*",
88
"magento/module-catalog": "*",
99
"magento/module-catalog-inventory": "*",

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,10 +1607,12 @@ function ($name) use ($throwException, $exception) {
16071607
*/
16081608
public function testGetProductCategoriesDataSave(array $categoriesData, string $tableName, array $result)
16091609
{
1610-
$this->_connection->expects($this->at(1))->method('fetchOne')->willReturn('0');
1611-
$this->_connection->expects($this->at(3))->method('fetchOne')->willReturn('-2');
1612-
$this->skuProcessor->expects($this->at(0))->method('getNewSku')->willReturn(['entity_id' => 2]);
1613-
$this->skuProcessor->expects($this->at(1))->method('getNewSku')->willReturn(['entity_id' => 5]);
1610+
$this->_connection->method('fetchOne')->willReturnOnConsecutiveCalls('0', '-2');
1611+
$this->skuProcessor->method('getNewSku')
1612+
->willReturnOnConsecutiveCalls(
1613+
['entity_id' => 2],
1614+
['entity_id' => 5]
1615+
);
16141616
$actualResult = $this->invokeMethod(
16151617
$this->importProduct,
16161618
'getProductCategoriesDataSave',

app/code/Magento/CatalogImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"ext-ctype": "*",
1010
"magento/framework": "*",
1111
"magento/module-catalog": "*",

app/code/Magento/CatalogInventory/Test/Unit/Model/Config/Backend/ManagestockTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@
99

1010
use Magento\CatalogInventory\Model\Config\Backend\Managestock;
1111
use Magento\CatalogInventory\Model\Indexer\Stock\Processor;
12+
use Magento\Framework\App\Config\ScopeConfigInterface;
1213
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1314
use PHPUnit\Framework\MockObject\MockObject;
1415
use PHPUnit\Framework\TestCase;
1516

1617
class ManagestockTest extends TestCase
1718
{
19+
/**
20+
* @var ScopeConfigInterface|MockObject
21+
*/
22+
private $configMock;
23+
1824
/** @var Processor|MockObject */
1925
protected $stockIndexerProcessor;
2026

@@ -27,10 +33,15 @@ protected function setUp(): void
2733
Processor::class
2834
)->disableOriginalConstructor()
2935
->getMock();
36+
$this->configMock = $this->getMockBuilder(ScopeConfigInterface::class)
37+
->disableOriginalConstructor()
38+
->getMock();
39+
3040
$this->model = (new ObjectManager($this))->getObject(
3141
Managestock::class,
3242
[
33-
'stockIndexerProcessor' => $this->stockIndexerProcessor,
43+
'config' => $this->configMock,
44+
'stockIndexerProcessor' => $this->stockIndexerProcessor
3445
]
3546
);
3647
}
@@ -57,6 +68,8 @@ public function testSaveAndRebuildIndex($newStockValue, $callCount)
5768
{
5869
$this->model->setValue($newStockValue);
5970
$this->stockIndexerProcessor->expects($this->exactly($callCount))->method('markIndexerAsInvalid');
71+
$this->configMock->method('getValue')->willReturn(0); // old value for stock status
72+
6073
$this->model->afterSave();
6174
}
6275
}

app/code/Magento/CatalogInventory/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-catalog": "*",
1111
"magento/module-config": "*",

app/code/Magento/CatalogInventoryGraphQl/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "N/A",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~7.3.0||~7.4.0",
6+
"php": "~7.4.0||~8.0.0",
77
"magento/framework": "*",
88
"magento/module-store": "*",
99
"magento/module-catalog": "*",

0 commit comments

Comments
 (0)