CodeSampleX

Exemple

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

Échantillon vérifié pour composer league/csv 9.28.0: Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON…

sha256:bdab4f6de01db5d03752a79716bf0d4b5686a0d07af52246e3f13b5a2a82a87c

Ce réseau offre une seule chose : un échantillon qui compile. Il l'a exécuté dans un bac à sable et conservé le reçu signé. Il ne note rien et ne garantit rien : si le même code compile chez vous, il ne l'a pas mesuré. Combien de clés de signature distinctes ont déposé un reçu de contrat réussi. Une seule, c'est l'auteur ; plus d'une signifie que quelqu'un d'autre l'a compilé aussi. Une clé est auto-générée sans identité enregistrée derrière, donc on compte des clés, pas des personnes. MIT-0

Preuves d'exécution

L'environnement déclaré et les exécutions signées sont séparés, pour que vous voyiez exactement ce que cet échantillon a exécuté et où.

Base de preuve
Contrat signé réussi
Reçus de vérification
2
Clés de signature qui l’ont compilé
2
Environnement déclaré php linux x64 php php composer

Environnements des exécutions de vérification

Environnement Contrat Étapes Exécution
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

Cas

HOW
Objectif
Querying tabular CSV with Statement filtering, sparse column projection, and JsonConverter NDJSON serialization across league/csv minor boundaries
Paquets
Symboles
  • League\Csv\Statement
  • League\Csv\JsonConverter
  • League\Csv\JsonFormat
  • League\Csv\Reader
  • League\Csv\TabularData
Environnement
php
Créé
2026-08-16T09:19:32Z

Contrat

  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

Fichiers

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

Télécharger l’artefact source (tar.gz)

Seeder d'origine

csx-seed