From 14096dcfa7649ab41fdfab0fae866d01c9dc875e Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 19 Nov 2025 10:59:09 +0800 Subject: [PATCH] * [misc] Reinstall the Spout and PhpSpreadsheet libraries using Composer to apply the patch. --- lib/vendor/autoload.php | 2 +- .../spout/src/Spout/Reader/CSV/RowIterator.php | 15 ++++++++++----- .../spout/src/Spout/Reader/CSV/SheetIterator.php | 15 ++++++++++----- .../spout/src/Spout/Reader/ODS/RowIterator.php | 15 ++++++++++----- .../spout/src/Spout/Reader/ODS/SheetIterator.php | 15 ++++++++++----- .../spout/src/Spout/Reader/Wrapper/XMLReader.php | 6 ++++-- .../spout/src/Spout/Reader/XLSX/RowIterator.php | 15 ++++++++++----- .../spout/src/Spout/Reader/XLSX/SheetIterator.php | 15 ++++++++++----- lib/vendor/composer/autoload_real.php | 14 +++++++------- lib/vendor/composer/autoload_static.php | 10 +++++----- lib/vendor/composer/installed.php | 4 ++-- .../Worksheet/ColumnCellIterator.php | 15 ++++++++++----- .../PhpSpreadsheet/Worksheet/ColumnIterator.php | 15 ++++++++++----- .../src/PhpSpreadsheet/Worksheet/Iterator.php | 15 ++++++++++----- .../PhpSpreadsheet/Worksheet/RowCellIterator.php | 15 ++++++++++----- .../src/PhpSpreadsheet/Worksheet/RowIterator.php | 15 ++++++++++----- 16 files changed, 129 insertions(+), 72 deletions(-) diff --git a/lib/vendor/autoload.php b/lib/vendor/autoload.php index da4cf53291..49e223b8d5 100644 --- a/lib/vendor/autoload.php +++ b/lib/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0::getLoader(); +return ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::getLoader(); diff --git a/lib/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php b/lib/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php index 0c35e8572a..c3f5592858 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php @@ -84,7 +84,8 @@ class RowIterator implements IteratorInterface * * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->rewindAndSkipBom(); @@ -114,7 +115,8 @@ class RowIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return ($this->filePointer && !$this->hasReachedEndOfFile); } @@ -126,7 +128,8 @@ class RowIterator implements IteratorInterface * @throws \Box\Spout\Common\Exception\EncodingConversionException If unable to convert data to UTF-8 * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { $this->hasReachedEndOfFile = $this->globalFunctionsHelper->feof($this->filePointer); @@ -224,7 +227,8 @@ class RowIterator implements IteratorInterface * * @return Row|null */ - public function current(): Row|null + #[\ReturnTypeWillChange] + public function current() { return $this->rowBuffer; } @@ -235,7 +239,8 @@ class RowIterator implements IteratorInterface * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->numReadRows; } diff --git a/lib/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php b/lib/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php index da675221a0..27669c77c2 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php @@ -30,7 +30,8 @@ class SheetIterator implements IteratorInterface * * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->hasReadUniqueSheet = false; } @@ -41,7 +42,8 @@ class SheetIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return (!$this->hasReadUniqueSheet); } @@ -52,7 +54,8 @@ class SheetIterator implements IteratorInterface * * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { $this->hasReadUniqueSheet = true; } @@ -63,7 +66,8 @@ class SheetIterator implements IteratorInterface * * @return \Box\Spout\Reader\CSV\Sheet */ - public function current(): \Box\Spout\Reader\CSV\Sheet + #[\ReturnTypeWillChange] + public function current() { return $this->sheet; } @@ -74,7 +78,8 @@ class SheetIterator implements IteratorInterface * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return 1; } diff --git a/lib/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php b/lib/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php index 0cd87759e3..e42473a94f 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php @@ -118,7 +118,8 @@ class RowIterator implements IteratorInterface * @throws \Box\Spout\Reader\Exception\IteratorNotRewindableException If the iterator is rewound more than once * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { // Because sheet and row data is located in the file, we can't rewind both the // sheet iterator and the row iterator, as XML file cannot be read backwards. @@ -142,7 +143,8 @@ class RowIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return (!$this->hasReachedEndOfFile); } @@ -155,7 +157,8 @@ class RowIterator implements IteratorInterface * @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { if ($this->doesNeedDataForNextRowToBeProcessed()) { $this->readDataForNextRow(); @@ -356,7 +359,8 @@ class RowIterator implements IteratorInterface * * @return Row */ - public function current(): Row + #[\ReturnTypeWillChange] + public function current() { return $this->rowBuffer; } @@ -367,7 +371,8 @@ class RowIterator implements IteratorInterface * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->lastRowIndexProcessed; } diff --git a/lib/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php b/lib/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php index 6d5a0fcb2e..ba8d1d6748 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php @@ -79,7 +79,8 @@ class SheetIterator implements IteratorInterface * @throws \Box\Spout\Common\Exception\IOException If unable to open the XML file containing sheets' data * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->xmlReader->close(); @@ -131,7 +132,8 @@ class SheetIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->hasFoundSheet; } @@ -142,7 +144,8 @@ class SheetIterator implements IteratorInterface * * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { $this->hasFoundSheet = $this->xmlReader->readUntilNodeFound(self::XML_NODE_TABLE); @@ -157,7 +160,8 @@ class SheetIterator implements IteratorInterface * * @return \Box\Spout\Reader\ODS\Sheet */ - public function current(): \Box\Spout\Reader\ODS\Sheet + #[\ReturnTypeWillChange] + public function current() { $escapedSheetName = $this->xmlReader->getAttribute(self::XML_ATTRIBUTE_TABLE_NAME); $sheetName = $this->escaper->unescape($escapedSheetName); @@ -214,7 +218,8 @@ class SheetIterator implements IteratorInterface * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->currentSheetIndex + 1; } diff --git a/lib/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php b/lib/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php index 8551d756c1..a05b72d85e 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php +++ b/lib/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php @@ -83,7 +83,8 @@ class XMLReader extends \XMLReader * @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred * @return bool TRUE on success or FALSE on failure */ - public function read(): bool + #[\ReturnTypeWillChange] + public function read() { $this->useXMLInternalErrors(); @@ -119,7 +120,8 @@ class XMLReader extends \XMLReader * @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred * @return bool TRUE on success or FALSE on failure */ - public function next($localName = null): bool + #[\ReturnTypeWillChange] + public function next($localName = null) { $this->useXMLInternalErrors(); diff --git a/lib/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php b/lib/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php index cafe72e234..281fa395e5 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php @@ -139,7 +139,8 @@ class RowIterator implements IteratorInterface * @throws \Box\Spout\Common\Exception\IOException If the sheet data XML cannot be read * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->xmlReader->close(); @@ -163,7 +164,8 @@ class RowIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return (!$this->hasReachedEndOfFile); } @@ -176,7 +178,8 @@ class RowIterator implements IteratorInterface * @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { $this->nextRowIndexToBeProcessed++; @@ -374,7 +377,8 @@ class RowIterator implements IteratorInterface * * @return Row|null */ - public function current(): Row|null + #[\ReturnTypeWillChange] + public function current() { $rowToBeProcessed = $this->rowBuffer; @@ -399,7 +403,8 @@ class RowIterator implements IteratorInterface * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { // TODO: This should return $this->nextRowIndexToBeProcessed // but to avoid a breaking change, the return value for diff --git a/lib/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php b/lib/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php index e79a2cda95..4114d7e1f3 100644 --- a/lib/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php +++ b/lib/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php @@ -38,7 +38,8 @@ class SheetIterator implements IteratorInterface * * @return void */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->currentSheetIndex = 0; } @@ -49,7 +50,8 @@ class SheetIterator implements IteratorInterface * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return ($this->currentSheetIndex < \count($this->sheets)); } @@ -60,7 +62,8 @@ class SheetIterator implements IteratorInterface * * @return void */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { // Using isset here because it is way faster than array_key_exists... if (isset($this->sheets[$this->currentSheetIndex])) { @@ -77,7 +80,8 @@ class SheetIterator implements IteratorInterface * * @return \Box\Spout\Reader\XLSX\Sheet */ - public function current(): \Box\Spout\Reader\XLSX\Sheet + #[\ReturnTypeWillChange] + public function current() { return $this->sheets[$this->currentSheetIndex]; } @@ -88,7 +92,8 @@ class SheetIterator implements IteratorInterface * * @return int */ - public function key(): mixed + #[\ReturnTypeWillChange] + public function key() { return $this->currentSheetIndex + 1; } diff --git a/lib/vendor/composer/autoload_real.php b/lib/vendor/composer/autoload_real.php index bfd4977da1..2a4597b82d 100644 --- a/lib/vendor/composer/autoload_real.php +++ b/lib/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0 +class ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -51,12 +51,12 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire010dc2e2741263c8a65c6eb49fb81ea0($fileIdentifier, $file); + composerRequired8f5ceb6dd2b1c87f9f3c117b97ef46e($fileIdentifier, $file); } return $loader; @@ -68,7 +68,7 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0 * @param string $file * @return void */ -function composerRequire010dc2e2741263c8a65c6eb49fb81ea0($fileIdentifier, $file) +function composerRequired8f5ceb6dd2b1c87f9f3c117b97ef46e($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/lib/vendor/composer/autoload_static.php b/lib/vendor/composer/autoload_static.php index b2d6fd7910..863c66919b 100644 --- a/lib/vendor/composer/autoload_static.php +++ b/lib/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0 +class ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e { public static $files = array ( '7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php', @@ -262,10 +262,10 @@ class ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixesPsr0; - $loader->classMap = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixesPsr0; + $loader->classMap = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$classMap; }, null, ClassLoader::class); } diff --git a/lib/vendor/composer/installed.php b/lib/vendor/composer/installed.php index 1a3066fcb0..2ed71427c9 100644 --- a/lib/vendor/composer/installed.php +++ b/lib/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'c2a913f13cd2a11f9cb3c743ebcee2a1394e3034', + 'reference' => 'e4941afac6ca443486032ed8e0c3fd983f07f9f0', 'name' => '__root__', 'dev' => true, ), @@ -16,7 +16,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'c2a913f13cd2a11f9cb3c743ebcee2a1394e3034', + 'reference' => 'e4941afac6ca443486032ed8e0c3fd983f07f9f0', 'dev_requirement' => false, ), 'box/spout' => array( diff --git a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php index 00dc6ac8d0..389036948e 100644 --- a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php +++ b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -111,7 +111,8 @@ class ColumnCellIterator extends CellIterator /** * Rewind the iterator to the starting row. */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->currentRow = $this->startRow; } @@ -121,7 +122,8 @@ class ColumnCellIterator extends CellIterator * * @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell */ - public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell + #[\ReturnTypeWillChange] + public function current() { return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow); } @@ -131,7 +133,8 @@ class ColumnCellIterator extends CellIterator * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->currentRow; } @@ -139,7 +142,8 @@ class ColumnCellIterator extends CellIterator /** * Set the iterator to its next value. */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { do { ++$this->currentRow; @@ -165,7 +169,8 @@ class ColumnCellIterator extends CellIterator * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow; } diff --git a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php index 80b548d619..eb103d084e 100644 --- a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php +++ b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php @@ -122,7 +122,8 @@ class ColumnIterator implements \Iterator /** * Rewind the iterator to the starting column. */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->currentColumnIndex = $this->startColumnIndex; } @@ -132,7 +133,8 @@ class ColumnIterator implements \Iterator * * @return Column */ - public function current(): Column + #[\ReturnTypeWillChange] + public function current() { return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex)); } @@ -142,7 +144,8 @@ class ColumnIterator implements \Iterator * * @return string */ - public function key(): string + #[\ReturnTypeWillChange] + public function key() { return Coordinate::stringFromColumnIndex($this->currentColumnIndex); } @@ -150,7 +153,8 @@ class ColumnIterator implements \Iterator /** * Set the iterator to its next value. */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { ++$this->currentColumnIndex; } @@ -168,7 +172,8 @@ class ColumnIterator implements \Iterator * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; } diff --git a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php index 348ca96f40..68296a916e 100644 --- a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php +++ b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php @@ -42,7 +42,8 @@ class Iterator implements \Iterator /** * Rewind iterator. */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->position = 0; } @@ -52,7 +53,8 @@ class Iterator implements \Iterator * * @return Worksheet */ - public function current(): Worksheet + #[\ReturnTypeWillChange] + public function current() { return $this->subject->getSheet($this->position); } @@ -62,7 +64,8 @@ class Iterator implements \Iterator * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->position; } @@ -70,7 +73,8 @@ class Iterator implements \Iterator /** * Next value. */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { ++$this->position; } @@ -80,7 +84,8 @@ class Iterator implements \Iterator * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->position < $this->subject->getSheetCount() && $this->position >= 0; } diff --git a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php index 3dce799c28..4f0140b14e 100644 --- a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php +++ b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -113,7 +113,8 @@ class RowCellIterator extends CellIterator /** * Rewind the iterator to the starting column. */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->currentColumnIndex = $this->startColumnIndex; } @@ -123,7 +124,8 @@ class RowCellIterator extends CellIterator * * @return \PhpOffice\PhpSpreadsheet\Cell\Cell */ - public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell + #[\ReturnTypeWillChange] + public function current() { return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex); } @@ -133,7 +135,8 @@ class RowCellIterator extends CellIterator * * @return string */ - public function key(): string + #[\ReturnTypeWillChange] + public function key() { return Coordinate::stringFromColumnIndex($this->currentColumnIndex); } @@ -141,7 +144,8 @@ class RowCellIterator extends CellIterator /** * Set the iterator to its next value. */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { do { ++$this->currentColumnIndex; @@ -165,7 +169,8 @@ class RowCellIterator extends CellIterator * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; } diff --git a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php index 009ff5de43..287916efb2 100644 --- a/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php +++ b/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php @@ -117,7 +117,8 @@ class RowIterator implements \Iterator /** * Rewind the iterator to the starting row. */ - public function rewind(): void + #[\ReturnTypeWillChange] + public function rewind() { $this->position = $this->startRow; } @@ -127,7 +128,8 @@ class RowIterator implements \Iterator * * @return Row */ - public function current(): Row + #[\ReturnTypeWillChange] + public function current() { return new Row($this->subject, $this->position); } @@ -137,7 +139,8 @@ class RowIterator implements \Iterator * * @return int */ - public function key(): int + #[\ReturnTypeWillChange] + public function key() { return $this->position; } @@ -145,7 +148,8 @@ class RowIterator implements \Iterator /** * Set the iterator to its next value. */ - public function next(): void + #[\ReturnTypeWillChange] + public function next() { ++$this->position; } @@ -163,7 +167,8 @@ class RowIterator implements \Iterator * * @return bool */ - public function valid(): bool + #[\ReturnTypeWillChange] + public function valid() { return $this->position <= $this->endRow && $this->position >= $this->startRow; }