Skip to content

Commit 1528347

Browse files
authored
Merge pull request #8107 from magento-gl/AC-7850
AC-7850: [2.4.6-develop] Build Failures with PHP 8.2
2 parents 0669dc7 + 02cf36c commit 1528347

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

composer.lock

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
*/
1717
class CookieManagerTest extends \Magento\TestFramework\TestCase\WebapiAbstract
1818
{
19+
/**
20+
* @var string
21+
*/
1922
private $cookieTesterUrl = 'testmoduleone/CookieTester';
2023

2124
/** @var CurlClientWithCookies */
@@ -144,7 +147,10 @@ public function testDeleteCookie()
144147
if (isset($cookie['max-age'])) {
145148
$this->assertEquals(0, $cookie['max-age']);
146149
}
147-
$this->assertEquals('Thu, 01-Jan-1970 00:00:01 GMT', $cookie['expires']);
150+
$this->assertEquals(
151+
date('D, j-M-o H:i:s T', strtotime('Thu, 01-Jan-1970 00:00:01 GMT')),
152+
date('D, j-M-o H:i:s T', strtotime($cookie['expires']))
153+
);
148154
}
149155

150156
/**

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,7 @@ public function testFilteringForProductsFromMultipleCategories()
17461746
*/
17471747
public function testFilterProductsBySingleCategoryId(string $fieldName, string $queryCategoryId)
17481748
{
1749+
CacheCleaner::clean(['config']);
17491750
if (is_numeric($queryCategoryId)) {
17501751
$queryCategoryId = (int) $queryCategoryId;
17511752
}

dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,19 @@ public function testRequestToShip(
280280
'store',
281281
null
282282
);
283+
$convmap = [0x80, 0x10FFFF, 0, 0x1FFFFF];
284+
$content = mb_encode_numericentity(
285+
file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml'),
286+
$convmap,
287+
'UTF-8'
288+
);
283289
//phpcs:disable Magento2.Functions.DiscouragedFunction
284290
$this->httpClient->nextResponses(
285291
[
286292
new Response(
287293
200,
288294
[],
289-
utf8_encode(file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml'))
295+
$content
290296
)
291297
]
292298
);

dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
7+
$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
88
\Magento\SalesRule\Model\ResourceModel\Rule\Collection::class
99
);
10-
$items = array_values($this->_collection->getItems());
10+
$items = array_values($collection->getItems());
1111

1212
// type SPECIFIC with code
1313
$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);

dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
Resolver::getInstance()->requireDataFixture('Magento/SalesRule/_files/rules_advanced.php');
99

10-
$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
10+
$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
1111
\Magento\SalesRule\Model\ResourceModel\Rule\Collection::class
1212
);
13-
$items = array_values($this->_collection->getItems());
13+
$items = array_values($collection->getItems());
1414

1515
// type SPECIFIC with code
1616
$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);

0 commit comments

Comments
 (0)