Skip to content

Commit fed4045

Browse files
committed
AC-1685: Fix Integration Tests to be compatible with PHP 8.1
- static tests fix - update composer dependencies - bugfix
1 parent 5ae38a5 commit fed4045

File tree

3 files changed

+65
-29
lines changed

3 files changed

+65
-29
lines changed

composer.lock

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

lib/internal/Magento/Framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,26 @@ class ClassWithAllArgumentTypes
4747
*/
4848
protected $_constValue;
4949

50+
/**
51+
* Test property without specified type
52+
*/
53+
private $noType;
54+
55+
/**
56+
* @var null
57+
*/
58+
private $optNullValue;
59+
60+
/**
61+
* @var int|null
62+
*/
63+
private ?int $optNullIntValue;
64+
65+
/**
66+
* @var null
67+
*/
68+
private $optNoTypeValue;
69+
5070
/**
5171
* @param stdClass $stdClassObject
5272
* @param ClassWithoutConstruct $withoutConstructorClassObject
@@ -59,6 +79,7 @@ class ClassWithAllArgumentTypes
5979
* @param null $optNullValue
6080
* @param null|int $optNullIntValue first type from defined will be used
6181
* @param $optNoTypeValue
82+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6283
*/
6384
public function __construct(
6485
\stdClass $stdClassObject,
@@ -80,6 +101,10 @@ public function __construct(
80101
$this->_optionalStringValue = $optionalStringValue;
81102
$this->_optionalArrayValue = $optionalArrayValue;
82103
$this->_constValue = $const;
104+
$this->noType = $noType;
105+
$this->optNullValue = $optNullValue;
106+
$this->optNullIntValue = $optNullIntValue;
107+
$this->optNoTypeValue = $optNoTypeValue;
83108
}
84109
}
85110
class ClassWithoutOwnConstruct extends ClassWithAllArgumentTypes

lib/internal/Magento/Framework/View/Page/Config.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,12 @@ public function getDefaultFavicon()
652652
*/
653653
public function getIncludes()
654654
{
655-
$this->includes = ($this->isIncludesAvailable && $this->includes === null) ?
656-
$this->scopeConfig->getValue('design/head/includes', ScopeInterface::SCOPE_STORE) : '';
657-
return $this->includes;
655+
if ($this->includes === null && $this->isIncludesAvailable) {
656+
$this->includes = $this->scopeConfig->getValue(
657+
'design/head/includes',
658+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
659+
);
660+
}
661+
return $this->includes ??= '';
658662
}
659663
}

0 commit comments

Comments
 (0)