How to fix jsonSerialize and getIterator compatibility issues in magento 2.4 ?

jamesjohny1989

New member
XNullUser
Joined
Aug 2, 2022
Messages
2
Reaction score
0
Points
1
NullCash
9
in the case of jsonSerialize, search for this function and update its return param as follows

/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()

in the case of getIterator, search for this function and update its return param as follows

/**
* @return \Traversable
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->items);
}
 
Top