示例
Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON serialization across league/csv minor boundaries
sha256:bdab4f6de01db5d03752a79716bf0d4b5686a0d07af52246e3f13b5a2a82a87c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON serialization across league/csv minor boundaries HOW
- 包
- league/csv 9.28.0
- 环境
- php
- 创建时间
- 2026-08-16T09:19:32Z
契约
- Statement where() predicates execute before offset() and limit(), slicing the filtered subset rather than document lines
- Statement ResultSet maintains document line offsets as sparse array keys, leaving key 0 absent
- Statement selectAllExcept() and select() on raw headerless CSV retain sparse integer column keys without reindexing
- JsonConverter with JsonFormat::NdJsonHeader requires explicit header argument or throws InvalidArgument
- JsonConverter NdJsonHeader serializes line 1 as a JSON array of column headers and subsequent lines as JSON arrays of values, rather than newline-delimited JSON objects
- TabularData first() and last() return empty arrays on empty CSVs, while firstAsObject() and lastAsObject() return null
- Reader::from() treats string inputs as file paths throwing UnavailableStream on raw CSV content, while createFromString() triggers E_USER_DEPRECATED since 9.27.0
文件
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9