Skip to content

v7.0.2

Choose a tag to compare

@CarlosGude CarlosGude released this 21 Sep 18:02
· 60 commits to main since this release

Patch release. Two bugs in CsvParser, both found by giving the class its first tests.

Fixed

CsvParser dropped any row whose whole line was 0. A duplicated empty-line guard used empty($line), and empty('0') is true in PHP, so a single-column row carrying the value 0 was silently skipped. The guard above it already handled genuinely empty lines, so the duplicate is gone.

If you parse a single-column CSV of prices, quantities or counters, you were losing rows. This is the reason to upgrade.

str_getcsv()'s $escape is now passed explicitly as ''. PHP's default is "\\", which emits a deprecation from 8.4 and flips to '' in PHP 9. Pinning it keeps one behaviour across versions and matches RFC 4180, which has no escape character and escapes an enclosure by doubling it.

⚠️ Output changes for one input shape: a backslash-escaped quote inside a quoted field ("x\"y") now parses as x\y" instead of x"y. Doubled quotes ("x""y") and plain backslashes (C:\tmp\file) are unaffected. If your suppliers send RFC 4180 CSV, nothing changes for you.

Internal

CsvParser and CsvParseOptions had no tests; they now have 23. That gap is why the aggregate MSI read 100% — Infection generates no mutants at all for a class no test executes, so an untested file contributes nothing either way. Once covered, the file started at 72% MSI.

  • Suite: 623 → 646 tests
  • Mutation: 795 mutants, 0 escaped, MSI 100%
  • PHPStan level: max, 0 errors

Three genuinely equivalent mutants are documented in infection.json5 and docs/advanced/QUALITY.md.

Full changelog: https://github.com/CarlosGude/integrationEngine/blob/main/CHANGELOG.md