Skip to content

Commit ac72127

Browse files
committed
Merge remote-tracking branch 'karyna/fix-magento-to-launch-with-php8.1-part3' into platform-health
2 parents ea8421f + 34b1eee commit ac72127

File tree

20 files changed

+178
-56
lines changed

20 files changed

+178
-56
lines changed

lib/internal/Magento/Framework/DB/Query/BatchIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function __construct(
9292
*
9393
* @return Select
9494
*/
95+
#[\ReturnTypeWillChange]
9596
public function current()
9697
{
9798
if (null == $this->currentSelect) {
@@ -107,6 +108,7 @@ public function current()
107108
*
108109
* @return Select
109110
*/
111+
#[\ReturnTypeWillChange]
110112
public function next()
111113
{
112114
if (null == $this->currentSelect) {
@@ -129,6 +131,7 @@ public function next()
129131
*
130132
* @return int
131133
*/
134+
#[\ReturnTypeWillChange]
132135
public function key()
133136
{
134137
return $this->iteration;
@@ -139,6 +142,7 @@ public function key()
139142
*
140143
* @return bool
141144
*/
145+
#[\ReturnTypeWillChange]
142146
public function valid()
143147
{
144148
return $this->isValid;
@@ -149,6 +153,7 @@ public function valid()
149153
*
150154
* @return void
151155
*/
156+
#[\ReturnTypeWillChange]
152157
public function rewind()
153158
{
154159
$this->minValue = 0;

lib/internal/Magento/Framework/DB/Query/BatchIteratorInterface.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Framework\DB\Query;
77

88
/**
9-
* Batch Iterator interface
9+
* The batch queries iterator interface
1010
*/
1111
interface BatchIteratorInterface extends \Iterator
1212
{
@@ -29,6 +29,7 @@ interface BatchIteratorInterface extends \Iterator
2929
*
3030
* @return \Magento\Framework\DB\Select
3131
*/
32+
#[\ReturnTypeWillChange]
3233
public function current();
3334

3435
/**
@@ -38,6 +39,7 @@ public function current();
3839
*
3940
* @return int
4041
*/
42+
#[\ReturnTypeWillChange]
4143
public function key();
4244

4345
/**
@@ -48,6 +50,7 @@ public function key();
4850
*
4951
* @return \Magento\Framework\DB\Select
5052
*/
53+
#[\ReturnTypeWillChange]
5154
public function next();
5255

5356
/**
@@ -57,12 +60,14 @@ public function next();
5760
*
5861
* @return void
5962
*/
63+
#[\ReturnTypeWillChange]
6064
public function rewind();
6165

6266
/**
6367
* Checks if current position is valid
6468
*
6569
* @return bool
6670
*/
71+
#[\ReturnTypeWillChange]
6772
public function valid();
6873
}

lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public function __construct(
110110
*
111111
* @return Select
112112
*/
113+
#[\ReturnTypeWillChange]
113114
public function current()
114115
{
115116
if (null === $this->currentSelect) {
@@ -126,6 +127,7 @@ public function current()
126127
*
127128
* @return int
128129
*/
130+
#[\ReturnTypeWillChange]
129131
public function key()
130132
{
131133
return $this->iteration;
@@ -139,6 +141,7 @@ public function key()
139141
*
140142
* @return Select
141143
*/
144+
#[\ReturnTypeWillChange]
142145
public function next()
143146
{
144147
if (null === $this->currentSelect) {
@@ -162,6 +165,7 @@ public function next()
162165
*
163166
* @return void
164167
*/
168+
#[\ReturnTypeWillChange]
165169
public function rewind()
166170
{
167171
$this->currentSelect = null;
@@ -175,6 +179,7 @@ public function rewind()
175179
*
176180
* @return bool
177181
*/
182+
#[\ReturnTypeWillChange]
178183
public function valid()
179184
{
180185
return $this->isValid;

lib/internal/Magento/Framework/DB/Sql/Expression.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Expression extends \Zend_Db_Expr implements ExpressionInterface, \JsonSeri
1313
/**
1414
* @inheritdoc
1515
*/
16+
#[\ReturnTypeWillChange]
1617
public function jsonSerialize()
1718
{
1819
return [

lib/internal/Magento/Framework/DB/Tree/NodeSet.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public function __construct()
4646
}
4747

4848
/**
49+
* Adds a node to node list.
50+
*
4951
* @param Node $node
5052
* @return int
5153
*
@@ -59,30 +61,39 @@ public function addNode(Node $node)
5961
}
6062

6163
/**
64+
* Retrieves count elements in node list.
65+
*
6266
* @return int
6367
*
6468
* @deprecated 102.0.0
6569
*/
70+
#[\ReturnTypeWillChange]
6671
public function count()
6772
{
6873
return $this->count;
6974
}
7075

7176
/**
77+
* Checks if current position is valid.
78+
*
7279
* @return bool
7380
*
7481
* @deprecated 102.0.0
7582
*/
83+
#[\ReturnTypeWillChange]
7684
public function valid()
7785
{
7886
return isset($this->_nodes[$this->_current]);
7987
}
8088

8189
/**
90+
* Move forward to next element.
91+
*
8292
* @return false|int
8393
*
8494
* @deprecated 102.0.0
8595
*/
96+
#[\ReturnTypeWillChange]
8697
public function next()
8798
{
8899
if ($this->_current > $this->_currentNode) {
@@ -93,30 +104,39 @@ public function next()
93104
}
94105

95106
/**
107+
* Retrieves the key of the current element.
108+
*
96109
* @return int
97110
*
98111
* @deprecated 102.0.0
99112
*/
113+
#[\ReturnTypeWillChange]
100114
public function key()
101115
{
102116
return $this->_current;
103117
}
104118

105119
/**
120+
* Retrieves the current node.
121+
*
106122
* @return Node
107123
*
108124
* @deprecated 102.0.0
109125
*/
126+
#[\ReturnTypeWillChange]
110127
public function current()
111128
{
112129
return $this->_nodes[$this->_current];
113130
}
114131

115132
/**
133+
* Rewinds the Iterator to the first element.
134+
*
116135
* @return void
117136
*
118137
* @deprecated 102.0.0
119138
*/
139+
#[\ReturnTypeWillChange]
120140
public function rewind()
121141
{
122142
$this->_current = 0;

lib/internal/Magento/Framework/Filesystem/Filter/ExcludeFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function __construct(\Iterator $iterator, array $filters)
3535
*
3636
* @return bool
3737
*/
38+
#[\ReturnTypeWillChange]
3839
public function accept()
3940
{
4041
$current = str_replace('\\', '/', $this->current()->__toString());

lib/internal/Magento/Framework/MessageQueue/Consumer/Config/ConsumerConfigItem/Handler/Iterator.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ public function setData(array $data)
5454
*
5555
* @return Handler
5656
*/
57+
#[\ReturnTypeWillChange]
5758
public function current()
5859
{
5960
return $this->object;
6061
}
6162

6263
/**
63-
* {@inheritdoc}
64+
* @inheritdoc
6465
*/
66+
#[\ReturnTypeWillChange]
6567
public function next()
6668
{
6769
next($this->data);
@@ -82,24 +84,27 @@ private function initObject(array $data)
8284
}
8385

8486
/**
85-
* {@inheritdoc}
87+
* @inheritdoc
8688
*/
89+
#[\ReturnTypeWillChange]
8790
public function key()
8891
{
8992
key($this->data);
9093
}
9194

9295
/**
93-
* {@inheritdoc}
96+
* @inheritdoc
9497
*/
98+
#[\ReturnTypeWillChange]
9599
public function valid()
96100
{
97101
return (bool)current($this->data);
98102
}
99103

100104
/**
101-
* {@inheritdoc}
105+
* @inheritdoc
102106
*/
107+
#[\ReturnTypeWillChange]
103108
public function rewind()
104109
{
105110
reset($this->data);
@@ -109,16 +114,18 @@ public function rewind()
109114
}
110115

111116
/**
112-
* {@inheritdoc}
117+
* @inheritdoc
113118
*/
119+
#[\ReturnTypeWillChange]
114120
public function offsetExists($offset)
115121
{
116122
return array_key_exists($offset, $this->data);
117123
}
118124

119125
/**
120-
* {@inheritdoc}
126+
* @inheritdoc
121127
*/
128+
#[\ReturnTypeWillChange]
122129
public function offsetGet($offset)
123130
{
124131
if (!$this->offsetExists($offset)) {
@@ -130,16 +137,18 @@ public function offsetGet($offset)
130137
}
131138

132139
/**
133-
* {@inheritdoc}
140+
* @inheritdoc
134141
*/
142+
#[\ReturnTypeWillChange]
135143
public function offsetSet($offset, $value)
136144
{
137145
$this->data[$offset] = $value;
138146
}
139147

140148
/**
141-
* {@inheritdoc}
149+
* @inheritdoc
142150
*/
151+
#[\ReturnTypeWillChange]
143152
public function offsetUnset($offset)
144153
{
145154
unset($this->data[$offset]);

0 commit comments

Comments
 (0)