Skip to content

Commit 70571a9

Browse files
committed
AC-7790:PHP8.2 - Integration Failures/Unit Failures
1 parent 0c6a66f commit 70571a9

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

app/code/Magento/Payment/Block/Transparent/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getPostParams(): array
6767
$params = [];
6868
foreach ($this->_request->getPostValue() as $name => $value) {
6969
if (!empty($value) && mb_detect_encoding($value, 'UTF-8', true) === false) {
70-
$value = utf8_encode($value);
70+
$value = mb_convert_encoding($value, 'UTF-8', 'ISO-8859-1');
7171
}
7272
$params[$name] = $value;
7373
}

app/code/Magento/Rule/Test/Unit/Model/Condition/Product/AbstractProductTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ public function testValidateEmptyEntityAttributeValuesWithResource()
174174
->method('getAttribute')
175175
->with('someAttribute')
176176
->willReturn($attribute);
177-
$newResource->_config = $this->createMock(Config::class);
178177
$product->expects($this->atLeastOnce())
179178
->method('getResource')
180179
->willReturn($newResource);
@@ -190,7 +189,6 @@ public function testValidateEmptyEntityAttributeValuesWithResource()
190189
->method('getAttribute')
191190
->with('someAttribute')
192191
->willReturn($attribute);
193-
$newResource->_config = $this->createMock(Config::class);
194192

195193
$product->setResource($newResource);
196194
$this->assertFalse($this->_condition->validate($product));
@@ -228,7 +226,6 @@ public function testValidateSetEntityAttributeValuesWithResource()
228226
->method('getAttribute')
229227
->with('someAttribute')
230228
->willReturn($attribute);
231-
$newResource->_config = $this->createMock(Config::class);
232229

233230
$product->expects($this->atLeastOnce())
234231
->method('getResource')
@@ -277,7 +274,6 @@ public function testValidateSetEntityAttributeValuesWithoutResource()
277274
->method('getAttribute')
278275
->with('someAttribute')
279276
->willReturn($attribute);
280-
$newResource->_config = $this->createMock(Config::class);
281277

282278
$product->expects($this->atLeastOnce())
283279
->method('getResource')
@@ -303,7 +299,6 @@ public function testValidateSetEntityAttributeValuesWithoutResource()
303299
->method('getAttribute')
304300
->with('someAttribute')
305301
->willReturn($attribute);
306-
$newResource->_config = $this->createMock(Config::class);
307302

308303
$product->setResource($newResource);
309304
$product->setId(1);

composer.lock

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

dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Test for \Magento\Framework\Filesystem\Driver\File
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
@@ -13,6 +11,7 @@
1311
use PHPUnit\Framework\TestCase;
1412

1513
/**
14+
* Test for \Magento\Framework\Filesystem\Driver\File
1615
* Verify File class
1716
*/
1817
class FileTest extends TestCase
@@ -104,7 +103,7 @@ public function testReadDirectoryRecursively(): void
104103
'foo/bar/file_two.txt',
105104
'foo/file_three.txt',
106105
];
107-
$expected = array_map(['self', 'getTestPath'], $paths);
106+
$expected = array_map([self::class, 'getTestPath'], $paths);
108107
$actual = $this->driver->readDirectoryRecursively($this->getTestPath('foo'));
109108
sort($actual);
110109
$this->assertEquals($expected, $actual);

dev/tests/integration/testsuite/Magento/Setup/Fixtures/FixturesAsserts/SimpleProductsAssert.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Class performs assertion that generated simple products are valid
1414
* after running setup:performance:generate-fixtures command
1515
*/
16+
#[\AllowDynamicProperties]
1617
class SimpleProductsAssert
1718
{
1819
/**

lib/internal/Magento/Framework/App/Response/Http.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* @api
2222
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2323
*/
24+
#[\AllowDynamicProperties]
2425
class Http extends \Magento\Framework\HTTP\PhpEnvironment\Response
2526
{
2627
/** Cookie to store page vary string */

lib/internal/Magento/Framework/Simplexml/Config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @api
1212
* @since 100.0.2
1313
*/
14+
#[\AllowDynamicProperties]
1415
class Config
1516
{
1617
/**
@@ -31,6 +32,7 @@ class Config
3132
* Xpath describing nodes in configuration that need to be extended
3233
*
3334
* @example <allResources extends="/config/modules//resource"/>
35+
* @var string
3436
*/
3537
protected $_xpathExtends = "//*[@extends]";
3638

pub/errors/processor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2121
* phpcs:ignoreFile
2222
*/
23+
#[\AllowDynamicProperties]
2324
class Processor
2425
{
2526
const MAGE_ERRORS_LOCAL_XML = 'local.xml';

0 commit comments

Comments
 (0)