Skip to content

Commit e35ff85

Browse files
committed
AC-7422_v1::Incompatible issues fix for PHP8.2
1 parent 913cbf9 commit e35ff85

File tree

8 files changed

+503
-465
lines changed

8 files changed

+503
-465
lines changed

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class Bundle extends AbstractView
3636
protected $options;
3737

3838
/**
39-
* Catalog product
40-
*
4139
* @var \Magento\Catalog\Helper\Product
4240
*/
4341
protected $catalogProduct;
@@ -405,7 +403,7 @@ private function getConfigData(Product $product, array $options)
405403
*/
406404
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
407405
{
408-
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
406+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/{$optionId}") ?? [];
409407
$selections = $options[$optionId]['selections'];
410408
array_walk(
411409
$selections,

app/code/Magento/Paypal/Model/PayLaterConfig.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ class PayLaterConfig
1515
/**
1616
* Configuration key for Styles settings
1717
*/
18-
const CONFIG_KEY_STYLE = 'style';
18+
public const CONFIG_KEY_STYLE = 'style';
1919

2020
/**
2121
* Configuration key for Position setting
2222
*/
23-
const CONFIG_KEY_POSITION = 'position';
23+
public const CONFIG_KEY_POSITION = 'position';
2424

2525
/**
2626
* Checkout payment step placement
2727
*/
28-
const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment';
28+
public const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment';
2929

3030
/**
3131
* @var Config
@@ -91,11 +91,11 @@ public function getSectionConfig(string $section, string $key)
9191
{
9292
if (!array_key_exists($section, $this->configData)) {
9393
$sectionName = $section === self::CHECKOUT_PAYMENT_PLACEMENT
94-
? self::CHECKOUT_PAYMENT_PLACEMENT : "${section}page";
94+
? self::CHECKOUT_PAYMENT_PLACEMENT : "{$section}page";
9595

9696
$this->configData[$section] = [
97-
'display' => (boolean)$this->config->getPayLaterConfigValue("${sectionName}_display"),
98-
'position' => $this->config->getPayLaterConfigValue("${sectionName}_position"),
97+
'display' => (boolean)$this->config->getPayLaterConfigValue("{$sectionName}_display"),
98+
'position' => $this->config->getPayLaterConfigValue("{$sectionName}_position"),
9999
'style' => $this->getConfigStyles($sectionName)
100100
];
101101
}
@@ -113,17 +113,17 @@ private function getConfigStyles(string $sectionName): array
113113
{
114114
$logoType = $logoPosition = $textColor = $textSize = null;
115115
$color = $ratio = null;
116-
$styleLayout = $this->config->getPayLaterConfigValue("${sectionName}_stylelayout");
116+
$styleLayout = $this->config->getPayLaterConfigValue("{$sectionName}_stylelayout");
117117
if ($styleLayout === 'text') {
118-
$logoType = $this->config->getPayLaterConfigValue("${sectionName}_logotype");
118+
$logoType = $this->config->getPayLaterConfigValue("{$sectionName}_logotype");
119119
if ($logoType === 'primary' || $logoType === 'alternative') {
120-
$logoPosition = $this->config->getPayLaterConfigValue("${sectionName}_logoposition");
120+
$logoPosition = $this->config->getPayLaterConfigValue("{$sectionName}_logoposition");
121121
}
122-
$textColor = $this->config->getPayLaterConfigValue("${sectionName}_textcolor");
123-
$textSize = $this->config->getPayLaterConfigValue("${sectionName}_textsize");
122+
$textColor = $this->config->getPayLaterConfigValue("{$sectionName}_textcolor");
123+
$textSize = $this->config->getPayLaterConfigValue("{$sectionName}_textsize");
124124
} elseif ($styleLayout === 'flex') {
125-
$color = $this->config->getPayLaterConfigValue("${sectionName}_color");
126-
$ratio = $this->config->getPayLaterConfigValue("${sectionName}_ratio");
125+
$color = $this->config->getPayLaterConfigValue("{$sectionName}_color");
126+
$ratio = $this->config->getPayLaterConfigValue("{$sectionName}_ratio");
127127
}
128128

129129
return [

app/code/Magento/Quote/Model/Quote/Address/Rate.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ class Rate extends AbstractModel
4343
protected $_address;
4444

4545
/**
46+
* @var carrier_sort_order
47+
*/
48+
public $carrier_sort_order;
49+
50+
/**
51+
* Check the Quote rate
52+
*
4653
* @return void
4754
*/
4855
protected function _construct()
@@ -51,6 +58,8 @@ protected function _construct()
5158
}
5259

5360
/**
61+
* Set Address id with address before save
62+
*
5463
* @return $this
5564
*/
5665
public function beforeSave()
@@ -63,6 +72,8 @@ public function beforeSave()
6372
}
6473

6574
/**
75+
* Set address
76+
*
6677
* @param \Magento\Quote\Model\Quote\Address $address
6778
* @return $this
6879
*/
@@ -73,6 +84,8 @@ public function setAddress(\Magento\Quote\Model\Quote\Address $address)
7384
}
7485

7586
/**
87+
* Get Method for address
88+
*
7689
* @return \Magento\Quote\Model\Quote\Address
7790
*/
7891
public function getAddress()
@@ -81,6 +94,8 @@ public function getAddress()
8194
}
8295

8396
/**
97+
* Import shipping rate
98+
*
8499
* @param \Magento\Quote\Model\Quote\Address\RateResult\AbstractResult $rate
85100
* @return $this
86101
*/

app/code/Magento/Sales/Helper/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
166166

167167
$internalErrors = libxml_use_internal_errors(true);
168168

169-
$data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
169+
$data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');
170170
$domDocument->loadHTML(
171171
'<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>'
172172
);

composer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
"preferred-install": "dist",
1515
"sort-packages": true
1616
},
17+
"repositories": [
18+
{
19+
"type": "vcs",
20+
"url": "https://github.com/magento/composer"
21+
},
22+
{
23+
"type": "vcs",
24+
"url": "https://github.com/wikimedia/less.php"
25+
}
26+
],
1727
"require": {
1828
"php": "~8.1.0||~8.2.0",
1929
"ext-bcmath": "*",
@@ -65,15 +75,15 @@
6575
"laminas/laminas-validator": "^2.23",
6676
"league/flysystem": "^2.4",
6777
"league/flysystem-aws-s3-v3": "^2.4",
68-
"magento/composer": "^1.9.0-beta1",
78+
"magento/composer": "dev-develop",
6979
"magento/composer-dependency-version-audit-plugin": "^0.1",
7080
"magento/magento-composer-installer": ">=0.4.0-beta1",
7181
"magento/zend-cache": "^1.16",
7282
"magento/zend-db": "^1.16",
7383
"magento/zend-pdf": "^1.16",
7484
"monolog/monolog": "^2.7",
7585
"opensearch-project/opensearch-php": "^1.0 || ^2.0, <2.0.1",
76-
"pelago/emogrifier": "^6.0.0",
86+
"pelago/emogrifier": "^7",
7787
"php-amqplib/php-amqplib": "^3.2",
7888
"phpseclib/mcrypt_compat": "^2.0",
7989
"phpseclib/phpseclib": "^3.0",
@@ -86,7 +96,7 @@
8696
"tubalmartin/cssmin": "^4.1",
8797
"web-token/jwt-framework": "^3.1",
8898
"webonyx/graphql-php": "^14.11",
89-
"wikimedia/less.php": "^3.0"
99+
"wikimedia/less.php": "dev-main"
90100
},
91101
"require-dev": {
92102
"allure-framework/allure-phpunit": "^2",

0 commit comments

Comments
 (0)