CodeSampleX

サンプル

league/csv 9.28.0: Configure League\Csv\AbstractCsv::setEscape('') to prevent PHP default backslash escape from corrupting quoted fields that end with a backslash

検証済みサンプル — composer league/csv 9.28.0: Configure League\Csv\AbstractCsv::setEscape('') to prevent PHP default backslash escape from corrupting quoted fields…

sha256:439beef1cd858aa5b71dd521d3bafb14de229f2405e796e8e0a9c6263436f033

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 php linux x64 php php composer

検証実行環境

環境 コントラクト ステージ 実行日
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-17
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

ケース

HOW
ゴール
Configure League\Csv\AbstractCsv::setEscape('') to prevent PHP default backslash escape from corrupting quoted fields that end with a backslash
パッケージ
シンボル
  • League\Csv\Reader
  • League\Csv\Writer
  • League\Csv\AbstractCsv::setEscape
環境
php
作成日
2026-08-17T02:35:17Z

コントラクト

  1. Reader::fromString with default escape '\\' treats trailing backslashes before quotes as escape sequences, merging multiple CSV columns into a single mangled field
  2. Reader::setEscape('') disables the non-standard PHP escape character to enforce RFC 4180 compliance and split columns accurately
  3. Reader::setHeaderOffset(0) with setEscape('') correctly populates associative column headers instead of assigning null to subsequent columns
  4. Writer::setEscape('') emits valid RFC 4180 fields and guarantees clean roundtrip parsing with Reader::setEscape('')

ファイル

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

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed