Skip to content

Commit 7f625de

Browse files
Merge pull request #524 from magento-gl/AC-13306
AC-13306::Adobe Commerce 2.4.8 core code is compatible with PHP 8.4
2 parents 7924a2d + 81e8c50 commit 7f625de

File tree

143 files changed

+319
-294
lines changed

Some content is hidden

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

143 files changed

+319
-294
lines changed

Inventory/Model/ResourceModel/Source/Collection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -52,8 +52,8 @@ public function __construct(
5252
FetchStrategyInterface $fetchStrategy,
5353
ManagerInterface $eventManager,
5454
SourceCarrierLinkManagementInterface $sourceCarrierLinkManagement,
55-
AdapterInterface $connection = null,
56-
AbstractDb $resource = null
55+
?AdapterInterface $connection = null,
56+
?AbstractDb $resource = null
5757
) {
5858
parent::__construct(
5959
$entityFactory,

Inventory/Model/Source/Command/GetList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -61,7 +61,7 @@ public function __construct(
6161
/**
6262
* @inheritdoc
6363
*/
64-
public function execute(SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface
64+
public function execute(?SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface
6565
{
6666
/** @var Collection $collection */
6767
$collection = $this->sourceCollectionFactory->create();

Inventory/Model/Source/Command/GetListInterface.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -24,10 +24,11 @@ interface GetListInterface
2424
{
2525
/**
2626
* Find Sources by given SearchCriteria
27+
*
2728
* SearchCriteria is not required because load all sources is useful case
2829
*
2930
* @param SearchCriteriaInterface|null $searchCriteria
3031
* @return SourceSearchResultsInterface
3132
*/
32-
public function execute(SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface;
33+
public function execute(?SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface;
3334
}

Inventory/Model/SourceRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -69,7 +69,7 @@ public function get(string $sourceCode): SourceInterface
6969
/**
7070
* @inheritdoc
7171
*/
72-
public function getList(SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface
72+
public function getList(?SearchCriteriaInterface $searchCriteria = null): SourceSearchResultsInterface
7373
{
7474
return $this->commandGetList->execute($searchCriteria);
7575
}

Inventory/Model/Stock/Command/GetList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -61,7 +61,7 @@ public function __construct(
6161
/**
6262
* @inheritdoc
6363
*/
64-
public function execute(SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface
64+
public function execute(?SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface
6565
{
6666
/** @var Collection $collection */
6767
$collection = $this->stockCollectionFactory->create();

Inventory/Model/Stock/Command/GetListInterface.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -24,10 +24,11 @@ interface GetListInterface
2424
{
2525
/**
2626
* Find Stocks by given SearchCriteria
27+
*
2728
* SearchCriteria is not required because load all stocks is useful case
2829
*
2930
* @param SearchCriteriaInterface|null $searchCriteria
3031
* @return StockSearchResultsInterface
3132
*/
32-
public function execute(SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface;
33+
public function execute(?SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface;
3334
}

Inventory/Model/StockRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -86,7 +86,7 @@ public function deleteById(int $stockId): void
8686
/**
8787
* @inheritdoc
8888
*/
89-
public function getList(SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface
89+
public function getList(?SearchCriteriaInterface $searchCriteria = null): StockSearchResultsInterface
9090
{
9191
return $this->commandGetList->execute($searchCriteria);
9292
}

Inventory/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-inventory",
33
"description": "N/A",
44
"require": {
5-
"php": "~8.2.0||~8.3.0",
5+
"php": "~8.2.0||~8.3.0||~8.4.0",
66
"magento/framework": "*",
77
"magento/module-inventory-api": "*"
88
},

InventoryAdminUi/Controller/Adminhtml/Stock/Save.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -29,7 +29,7 @@ class Save extends Action implements HttpPostActionInterface
2929
/**
3030
* @see _isAllowed()
3131
*/
32-
const ADMIN_RESOURCE = 'Magento_InventoryApi::stock_edit';
32+
public const ADMIN_RESOURCE = 'Magento_InventoryApi::stock_edit';
3333

3434
/**
3535
* @var StockSaveProcessor
@@ -139,7 +139,7 @@ private function processRedirectAfterSuccessSave(Redirect $resultRedirect, int $
139139
*
140140
* @return void
141141
*/
142-
private function processRedirectAfterFailureSave(Redirect $resultRedirect, int $stockId = null)
142+
private function processRedirectAfterFailureSave(Redirect $resultRedirect, ?int $stockId = null)
143143
{
144144
if (null === $stockId) {
145145
$resultRedirect->setPath('*/*/new');

InventoryAdminUi/Test/Mftf/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": "~8.2.0||~8.3.0",
8+
"php": "~8.2.0||~8.3.0||~8.4.0",
99
"magento/magento2-functional-testing-framework": "2.2.0",
1010
"magento/functional-test-module-inventory-api": "100.0.0-dev",
1111
"magento/functional-test-module-backend": "100.0.0-dev",

0 commit comments

Comments
 (0)