Skip to content

Commit e681a81

Browse files
committed
DHLGW-1429: Upgrade module for Magento 2.4.8 PHP 8.3/8.4 compatibility
1 parent 38faaac commit e681a81

File tree

12 files changed

+72
-13
lines changed

12 files changed

+72
-13
lines changed

Block/Adminhtml/Container/Confirm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Confirm extends Container
2020
*
2121
* @return void
2222
*/
23+
#[\Override]
2324
protected function _construct()
2425
{
2526
$this->_controller = 'adminhtml';
@@ -31,6 +32,7 @@ protected function _construct()
3132
$this->removeButton('reset');
3233
}
3334

35+
#[\Override]
3436
public function getBackUrl()
3537
{
3638
return $this->getUrl('sales/order/index');

Block/Adminhtml/Data/Form/Confirm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ private function getTableHtml(): string
4545
* @return string
4646
* @throws LocalizedException
4747
*/
48+
#[\Override]
4849
public function toHtml()
4950
{
5051
Profiler::start('form/toHtml');
@@ -53,7 +54,7 @@ public function toHtml()
5354
if ($useContainer) {
5455
$html .= '<form ' . $this->serialize($this->getHtmlAttributes()) . '>';
5556
$html .= '<div>';
56-
if (strtolower($this->getData('method')) === 'post') {
57+
if (strtolower((string) $this->getData('method')) === 'post') {
5758
$html .= '<input name="form_key" type="hidden" value="' . $this->formKey->getFormKey() . '" />';
5859
}
5960
$html .= '</div>';

Block/Adminhtml/Widget/Form.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ private function addSelectCell(
144144
/**
145145
* @throws LocalizedException
146146
*/
147+
#[\Override]
147148
protected function _prepareForm(): self
148149
{
149150
$orders = $this->selectedOrders->get();
@@ -168,6 +169,7 @@ protected function _prepareForm(): self
168169
/**
169170
* @throws LocalizedException
170171
*/
172+
#[\Override]
171173
protected function _prepareLayout(): self
172174
{
173175
parent::_prepareLayout();

Block/Adminhtml/Widget/Form/Renderer/TableRow.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function getElement(): AbstractElement
3636
* @param AbstractElement $element
3737
* @return string
3838
*/
39+
#[\Override]
3940
public function render(AbstractElement $element)
4041
{
4142
$this->_element = $element;

Controller/Adminhtml/Shipment/Interactive.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Backend\App\Action\Context;
1313
use Magento\Framework\App\Action\HttpPostActionInterface;
1414
use Magento\Framework\App\Request\Http;
15+
use Magento\Framework\Controller\ResultInterface;
1516
use Magento\Framework\Exception\LocalizedException;
1617
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory;
1718
use Magento\Ui\Component\MassAction\Filter;
@@ -61,7 +62,8 @@ public function __construct(
6162
/**
6263
* @throws LocalizedException
6364
*/
64-
public function execute()
65+
#[\Override]
66+
public function execute(): ResultInterface
6567
{
6668
$this->_view->loadLayout();
6769
$this->_setActiveMenu('Magento_Sales::sales_order');

Controller/Adminhtml/Shipment/Submit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public function __construct(Context $context, SelectedShippingSettings $settings
3131
parent::__construct($context);
3232
}
3333

34-
public function execute()
34+
#[\Override]
35+
public function execute(): void
3536
{
3637
$inputValues = $this->getRequest()->getParam('inputs', []);
3738
foreach ($inputValues as $orderId => $orderInputValues) {

Model/ShippingSettings/TypeProcessor/ShippingOptions/UpdateInputDefaultsProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ private function getOptionInput(ShippingOptionInterface $serviceOption, string $
5050
*
5151
* @return ShippingOptionInterface[]
5252
*/
53+
#[\Override]
5354
public function process(
5455
string $carrierCode,
5556
array $shippingOptions,
5657
int $storeId,
5758
string $countryCode,
5859
string $postalCode,
59-
ShipmentInterface $shipment = null
60+
?ShipmentInterface $shipment = null
6061
): array {
6162
if (!$shipment) {
6263
// checkout scope, nothing to modify.

Model/ShippingSettings/TypeProcessor/ShippingOptions/UpdatePackageDimensionsProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,14 @@ private function processInputs(ShippingOptionInterface $shippingOption, Shipment
120120
*
121121
* @return ShippingOptionInterface[]
122122
*/
123+
#[\Override]
123124
public function process(
124125
string $carrierCode,
125126
array $shippingOptions,
126127
int $storeId,
127128
string $countryCode,
128129
string $postalCode,
129-
ShipmentInterface $shipment = null
130+
?ShipmentInterface $shipment = null
130131
): array {
131132
if (!$shipment) {
132133
// checkout scope, nothing to modify.

Ui/Component/MassAction/InteractiveBatchProcessing.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct(
3939
parent::__construct($context, $components, $data, $actions);
4040
}
4141

42+
#[\Override]
4243
public function prepare()
4344
{
4445
parent::prepare();

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
]
2222
},
2323
"require": {
24-
"php": "^8.2.0",
25-
"magento/framework": "^103.0.6",
26-
"magento/module-backend": "^102.0.6",
27-
"magento/module-config": "^101.2.6",
28-
"magento/module-sales": "^103.0.6",
29-
"magento/module-store": "^101.1.6",
30-
"magento/module-ui": "^101.1.6",
31-
"netresearch/module-shipping-core": "^3.0.0"
24+
"php": "^8.3.0 || ^8.4.0",
25+
"magento/framework": "^103.0.8",
26+
"magento/module-backend": "^102.0.8",
27+
"magento/module-config": "^101.2.8",
28+
"magento/module-sales": "^103.0.8",
29+
"magento/module-store": "^101.1.8",
30+
"magento/module-ui": "^101.1.8",
31+
"netresearch/module-shipping-core": "^3.2.0"
3232
}
3333
}

0 commit comments

Comments
 (0)