1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +02:00

Add “#[\ReturnTypeWillChange]” comments to all InteratorAggregate, Countable and PDOStatement interface classes to stop PHP 8.1 notices per https://php.watch/versions/8.1/internal-method-return-types and processwire/processwire-issues#1467 ... someday when all PHP 5.x support can be dropped these will be converted to PHP 7.1+ return types

This commit is contained in:
Ryan Cramer
2021-12-31 09:19:09 -05:00
parent bca50abb48
commit ee64e114f2
23 changed files with 82 additions and 13 deletions

View File

@@ -81,6 +81,7 @@ class FilenameArray implements \IteratorAggregate, \Countable {
* @return \ArrayObject
*
*/
#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayObject($this->data);
}
@@ -138,6 +139,7 @@ class FilenameArray implements \IteratorAggregate, \Countable {
* @return int
*
*/
#[\ReturnTypeWillChange]
public function count() {
return count($this->data);
}