CodeSampleX

Ejemplo

league/csv 9.28.0: Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON serialization across league/csv minor boundaries

Muestra verificada para composer league/csv 9.28.0: Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON…

sha256:bdab4f6de01db5d03752a79716bf0d4b5686a0d07af52246e3f13b5a2a82a87c

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado php linux x64 php php composer

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

Caso

HOW
Objetivo
Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON serialization across league/csv minor boundaries
Paquetes
Símbolos
  • League\Csv\Statement
  • League\Csv\JsonConverter
  • League\Csv\JsonFormat
  • League\Csv\Reader
  • League\Csv\TabularData
Entorno
php
Creado
2026-08-16T09:19:32Z

Contrato

  1. Statement where() predicates execute before offset() and limit(), slicing the filtered subset rather than document lines
  2. Statement ResultSet maintains document line offsets as sparse array keys, leaving key 0 absent
  3. Statement selectAllExcept() and select() on raw headerless CSV retain sparse integer column keys without reindexing
  4. JsonConverter with JsonFormat::NdJsonHeader requires explicit header argument or throws InvalidArgument
  5. 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
  6. TabularData first() and last() return empty arrays on empty CSVs, while firstAsObject() and lastAsObject() return null
  7. Reader::from() treats string inputs as file paths throwing UnavailableStream on raw CSV content, while createFromString() triggers E_USER_DEPRECATED since 9.27.0

Archivos

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • test/contract.php

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed