v3.2.0
Bug fixes
Four defects in the sheet reading path, all in methods that had no test coverage.
Sheet::readFirstRowCellsFrom()always threw aTypeError. It forwarded$columnKeysintoreadFirstRowCells(?bool $styleIdxInclude), so even a default call failed. Because the result is keyed by cell address, column keys cannot apply at all — renaming a column would corrupt the address — so the parameter was dropped, mirroringreadCellsFrom(). The new signature isreadFirstRowCellsFrom(string $areaRange, ?bool $styleIdxInclude = null). No working call can break, since every call to the old signature threw.- Restricting columns while requesting numeric column keys returned only
nulls. With a read area in place the row template was keyed by column letter while values were stored under numeric keys, and the values were then filtered out. AffectedsetReadArea()andsetReadAreaColumns()combined withKEYS_COL_ZERO_BASED/KEYS_COL_ONE_BASED(and thereforeKEYS_ZERO_BASED/KEYS_ONE_BASED). An explicit column name still takes precedence over the numeric key. Sheet::rewind()discarded its$columnKeysargument, although it is documented as an alias ofreset().Sheet::firstCol()ignored the column bounds of the read area, reporting the first cell of the row as stored in the file.firstRow()was unaffected.
Tests
The suite grows from 84 to 262 tests (357 to 757 assertions), added ahead of the fixes as a regression net:
- 105 characterization snapshots covering every
read*method, the fullKEYS_*matrix, result-mode flags, read areas, styles, dates, metadata and degenerate inputs, compared as whole arrays withassertSame. - Dedicated tests for generator semantics, read areas, result modes, merged cells, workbook delegation and streaming memory behaviour.
RESULT_MODE_ROW,TRIM_STRINGS,TREAT_EMPTY_STRING_AS_EMPTY_CELLandKEYS_RELATIVEhad no coverage at all before and are now tested.
Method coverage: Sheet 33.9% → 58.9%, Excel 55.6% → 69.4%.
Notes
- Reading XLSX files that use namespace-prefixed tags (
<x:row>,<x:c>) still returns an empty result. This is a pre-existing limitation, now documented by a test rather than silently unnoticed. - API reference under
docs/regenerated.
Full changelog: v3.1.0...v3.2.0