Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thephpleague/csv
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9.19.0
Choose a base ref
...
head repository: thephpleague/csv
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 10, 2024

  1. Copy the full SHA
    42a8b36 View commit details

Commits on Dec 13, 2024

  1. Copy the full SHA
    03354a6 View commit details
  2. Prepare next release

    nyamsprod committed Dec 13, 2024
    Copy the full SHA
    553579d View commit details
  3. Prepare next release

    nyamsprod committed Dec 13, 2024
    Copy the full SHA
    7d1517d View commit details

Commits on Dec 18, 2024

  1. Copy the full SHA
    0e132a1 View commit details
  2. Copy the full SHA
    c41bed7 View commit details
  3. Copy the full SHA
    a035f41 View commit details
  4. Fix typehinting

    nyamsprod committed Dec 18, 2024
    Copy the full SHA
    2fbac46 View commit details
  5. prepare patch release

    nyamsprod committed Dec 18, 2024
    Copy the full SHA
    491d1e7 View commit details
  6. Copy the full SHA
    386b6bc View commit details
  7. Prepare next release

    nyamsprod committed Dec 18, 2024
    Copy the full SHA
    bf9ad65 View commit details
  8. Copy the full SHA
    b6a735b View commit details

Commits on Jan 3, 2025

  1. Copy the full SHA
    7d68a5b View commit details
  2. Improve documentation

    nyamsprod committed Jan 3, 2025
    Copy the full SHA
    f242a29 View commit details

Commits on Jan 8, 2025

  1. Copy the full SHA
    8e76c0f View commit details
  2. Copy the full SHA
    26f9297 View commit details
  3. prepare minor release

    nyamsprod committed Jan 8, 2025
    Copy the full SHA
    72196d1 View commit details
  4. prepare next release

    nyamsprod committed Jan 8, 2025
    Copy the full SHA
    a0774c9 View commit details

Commits on Jan 9, 2025

  1. Copy the full SHA
    83b2aa9 View commit details
  2. Copy the full SHA
    e9e4bc3 View commit details
  3. Copy the full SHA
    888a37e View commit details
  4. Copy the full SHA
    bd41721 View commit details

Commits on Jan 10, 2025

  1. Copy the full SHA
    995213a View commit details
  2. Group network for test failing without it (#549)

    Co-authored-by: David Prévot <taffit@debian.org>
    tenzap and David Prévot authored Jan 10, 2025
    Copy the full SHA
    d0cbd75 View commit details
  3. Update changelog

    nyamsprod committed Jan 10, 2025
    Copy the full SHA
    aca3101 View commit details

Commits on Jan 11, 2025

  1. Copy the full SHA
    0ed5fa3 View commit details

Commits on Jan 15, 2025

  1. Copy the full SHA
    dd6ec34 View commit details
  2. Fix typo in landing page

    nyamsprod committed Jan 15, 2025
    Copy the full SHA
    6dbb173 View commit details

Commits on Jan 18, 2025

  1. Copy the full SHA
    bd59e16 View commit details
  2. Copy the full SHA
    45c4618 View commit details

Commits on Jan 19, 2025

  1. Copy the full SHA
    8b13132 View commit details
  2. Improve codebase

    nyamsprod committed Jan 19, 2025
    Copy the full SHA
    f477260 View commit details
  3. Improve documentation

    nyamsprod committed Jan 19, 2025
    Copy the full SHA
    ef69934 View commit details
  4. Improve codebase

    nyamsprod committed Jan 19, 2025
    Copy the full SHA
    e3e2a42 View commit details
  5. Copy the full SHA
    41d08de View commit details
  6. Improve README

    nyamsprod committed Jan 19, 2025
    Copy the full SHA
    56b3598 View commit details

Commits on Jan 20, 2025

  1. Copy the full SHA
    f95ca7b View commit details

Commits on Jan 27, 2025

  1. Change implementation for XML and HTML converter classes (#552)

    Rewrite XMLConverter and HTMLConverter for PHP8.4+
    nyamsprod authored Jan 27, 2025
    Copy the full SHA
    8b8a2bd View commit details
  2. fix dowload XMLConverter

    nyamsprod committed Jan 27, 2025
    Copy the full SHA
    6e8337d View commit details
  3. Copy the full SHA
    a64e171 View commit details
  4. fix node name filtering

    nyamsprod committed Jan 27, 2025
    Copy the full SHA
    abc3c85 View commit details
  5. change documentation menu

    nyamsprod committed Jan 27, 2025
    Copy the full SHA
    bd0c1dc View commit details

Commits on Jan 31, 2025

  1. Copy the full SHA
    e61da8e View commit details
  2. Copy the full SHA
    8bc3643 View commit details

Commits on Feb 1, 2025

  1. Copy the full SHA
    8a7d6c9 View commit details
  2. Copy the full SHA
    599c7f3 View commit details

Commits on Feb 3, 2025

  1. Copy the full SHA
    96c1c79 View commit details
  2. Update documentation

    nyamsprod committed Feb 3, 2025
    Copy the full SHA
    d51090d View commit details
  3. Copy the full SHA
    fb143d5 View commit details

Commits on Feb 7, 2025

  1. Copy the full SHA
    6522650 View commit details
Showing with 3,506 additions and 667 deletions.
  1. +111 −0 CHANGELOG.md
  2. +7 −5 README.md
  3. +11 −7 composer.json
  4. +231 −9 docs/9.0/connections/filters.md
  5. +19 −7 docs/9.0/converter/charset.md
  6. +57 −2 docs/9.0/converter/html.md
  7. +0 −1 docs/9.0/converter/index.md
  8. +68 −12 docs/9.0/converter/json.md
  9. +120 −53 docs/9.0/converter/xml.md
  10. +2 −2 docs/9.0/extensions/doctrine.md
  11. +2 −2 docs/9.0/index.md
  12. +1 −1 docs/9.0/interoperability/encoding.md
  13. +142 −0 docs/9.0/interoperability/tabular-data-importer.md
  14. +1 −0 docs/9.0/reader/index.md
  15. +37 −1 docs/9.0/reader/resultset.md
  16. +41 −19 docs/9.0/reader/statement.md
  17. +48 −10 docs/9.0/reader/tabular-data-reader.md
  18. +14 −4 docs/9.0/writer/index.md
  19. +7 −6 docs/_data/menu.yml
  20. +1 −1 docs/_data/project.yml
  21. +4 −4 docs/_layouts/homepage.html
  22. +17 −15 docs/index.md
  23. +7 −0 phpstan.neon
  24. +109 −6 src/AbstractCsv.php
  25. +42 −12 src/AbstractCsvTest.php
  26. +1 −0 src/Bom.php
  27. +5 −1 src/BomTest.php
  28. +161 −0 src/CallbackStreamFilter.php
  29. +152 −0 src/CallbackStreamFilterTest.php
  30. +184 −50 src/CharsetConverter.php
  31. +47 −3 src/CharsetConverterTest.php
  32. +2 −2 src/ColumnConsistencyTest.php
  33. +68 −0 src/DataTable.php
  34. +25 −6 src/EncloseField.php
  35. +1 −1 src/EscapeFormulaTest.php
  36. +22 −10 src/FragmentFinder.php
  37. +137 −54 src/HTMLConverter.php
  38. +35 −21 src/HTMLConverterTest.php
  39. +2 −2 src/InfoTest.php
  40. +58 −22 src/JsonConverter.php
  41. +4 −4 src/JsonConverterBench.php
  42. +14 −14 src/JsonConverterTest.php
  43. +1 −1 src/Query/Constraint/Column.php
  44. +1 −1 src/Query/Constraint/Comparison.php
  45. +7 −9 src/Query/Ordering/Column.php
  46. +1 −1 src/Query/QueryTestCase.php
  47. +23 −3 src/RFC4180Field.php
  48. +251 −0 src/RdbmsResult.php
  49. +115 −0 src/RdbmsResultTest.php
  50. +47 −40 src/Reader.php
  51. +25 −7 src/ReaderTest.php
  52. +147 −26 src/ResultSet.php
  53. +26 −21 src/ResultSetTest.php
  54. +64 −27 src/Statement.php
  55. +49 −10 src/StatementTest.php
  56. +36 −6 src/Stream.php
  57. +192 −0 src/StreamFilter.php
  58. +2 −2 src/StreamTest.php
  59. +18 −5 src/SwapDelimiter.php
  60. +49 −0 src/TabularData.php
  61. +3 −31 src/TabularDataReader.php
  62. +55 −2 src/TabularDataReaderTestCase.php
  63. +59 −24 src/Writer.php
  64. +46 −4 src/WriterTest.php
  65. +160 −57 src/XMLConverter.php
  66. +112 −21 src/XMLConverterTest.php
  67. 0 test_files/users.sqlite
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,117 @@

All Notable changes to `Csv` will be documented in this file

## [Next](https://github.com/thephpleague/csv/compare/9.21.0...master) - TBD

### Added

- `Writer::necessaryEnclosure`
- `TabularDataReader::selectAllExcept`
- `Statement::selectAllExcept`
- `ResultSet::from` and `ResultSet::tryFrom`
- `RdbmsResult` class to allow converting RDBMS result into `ResultSet`
- `TabularData` interface
- `XMLConverter::supportsHeader`
- `XMLConverter::when`
- `HTMLConverter::when`
- `JsonConverter::when`
- `CharsetConverter::appendOnReadTo`, `CharsetConverter::appendOnWriteTo`, `CharsetConverter::prependOnReadTo`, `CharsetConverter::prependOnWriteTo`

### Deprecated

- `Writer::relaxEnclosure` use `Writer::necessaryEnclosure`
- `ResultSet::createFromTabularDataReader` use `ResultSet::from`
- `ResultSet::createFromRecords` use `ResultSet::from`
- `ResultSet::__construct` is marked as being `internal` and deprecated before being made private use `ResultSet::from`
- `XMLConverter::convert` use `XMLConverter::import` instead
- `XMLConverter::create` use `XMLConverter::__construct` instead
- `HTMLConverter::create` use `HTMLConverter::__construct` instead
- `Statement::create` use `Statement::__construct` instead
- `FragmentFinder::create` use `FragmentFinder::__construct` instead
- `CharsetConverter::appendTo`, `CharsetConverter::prependTo` use the more strict methods added on the instance

### Fixed

- `Comparison::CONTAINS` must check the value is a string before calling `str_compare` [#548](https://github.com/thephpleague/csv/pull/548) by [cage-is](https://github.com/cage-is)
- Fix testing to improve Debian integration [#549](https://github.com/thephpleague/csv/pull/549) by [David Prévot and tenzap](https://github.com/tenzap)
- `Bom::tryFromSequence` and `Bom::fromSequence` supports the `Reader` and `Writer` classes.
- `XMLConverter::$formatter` should not be public.
- `XMLConverter` internal rewritten to take advantage of PHP8.4 new dom classes
- `HTMLConverter` internal rewritten to take advantage of PHP8.4 new dom classes
- `XMLConverter::fieldElement` now has a `nullable` field element to allow using headers names as cell names.

### Removed

- None

## [9.21.0](https://github.com/thephpleague/csv/compare/9.20.1...9.21.0) - 2025-01-08

### Added

- `TabularDataReader::map` method.
- `StreamFilter` class
- `CallbackStreamFilter` class
- `AbstractCsv::appendStreamFilterOnRead`
- `AbstractCsv::appendStreamFilterOnWrite`
- `AbstractCsv::prependStreamFilterOnRead`
- `AbstractCsv::prependStreamFilterOnWrite`
- `Stream::getMode` returns the underlying stream mode; internal codebase.

### Deprecated

- `AbstractCsv::addStreamFilter` use `AbstractCsv::appendStreamFilterOnRead` or `AbstractCsv::appendStreamFilterOnWrite` instead.

### Fixed

- Improve `CharsetConverter` and `SwapDelimiter` internal code.
- Fix `supportStreamFilterOnRead`and `supportStreamFilterOnWrite` to expose the document real stream filter capabilities.

### Removed

- None

## [9.20.1](https://github.com/thephpleague/csv/compare/9.20.0...9.20.1) - 2024-12-18

### Added

- None

### Deprecated

- None

### Fixed

- [#554](https://github.com/thephpleague/csv/pull/544) Fix stream filte removal by [crocodele](https://github.com/crocodele)
- Fix Statement callback and closure signature

### Removed

- None

## [9.20.0](https://github.com/thephpleague/csv/compare/9.19.0...9.20.0) - 2024-12-13

### Added

- `XMLConverter::formatter`
- `HTMLConverter::formatter`
- `Writer::encloseNone`
- `Writer::encloseNecessary`
- `Writer::noEnclosure`

### Deprecated

- None

### Fixed

- `JsonConverter::formatter` now accepts callable before only `Closure` where accepted.
- The protected property `Writer::$enclose_all` is no longer a boolean but an integer

### Removed

- None

## [9.19.0](https://github.com/thephpleague/csv/compare/9.18.0...9.19.0) - 2024-12-08

### Added
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,14 +7,15 @@

Csv is a library to ease parsing, writing and filtering CSV in PHP.
The library goal is to be powerful while remaining lightweight,
by utilizing PHP native classes whenever possible.
by utilizing PHP native features whenever possible.

## Highlights

- Easy to use API
- Read and Write to CSV documents in a memory efficient and scalable way
- Straightforward API
- Read from and Write to CSV documents in a memory efficient and scalable way
- Flexible and powerful query features and array to object mapping.
- Transform CSV documents into popular format (`JSON`, `XML` or `HTML`)
- Support PHP stream filtering capabilities
- Transform CSV documents into popular format (JSON, XML or HTML)
- Fully documented
- Fully unit tested
- Framework-agnostic
@@ -39,7 +40,8 @@ Please find below the PHP support for `Csv` version 9.
| 9.7.0 | PHP 7.3.0 | PHP 8.0.x |
| 9.7.3 | PHP 7.3.0 | PHP 8.1.x |
| 9.8.0 | PHP 7.4.0 | PHP 8.1.x |
| 9.9.0 | PHP 8.1.2 | PHP 8.x |
| 9.9.0 | PHP 8.1.2 | PHP 8.3.x |
| 9.16.0 | PHP 8.1.2 | PHP 8.x |

## Install

18 changes: 11 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@
"require-dev": {
"ext-dom": "*",
"ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^3.64.0",
"friendsofphp/php-cs-fixer": "^3.68.1",
"phpbench/phpbench": "^1.3.1",
"phpstan/phpstan": "^1.12.11",
"phpstan/phpstan": "^1.12.15",
"phpstan/phpstan-deprecation-rules": "^1.2.1",
"phpstan/phpstan-phpunit": "^1.4.1",
"phpstan/phpstan-phpunit": "^1.4.2",
"phpstan/phpstan-strict-rules": "^1.6.1",
"phpunit/phpunit": "^10.5.16 || ^11.4.3",
"symfony/var-dumper": "^6.4.8 || ^7.1.8"
"phpunit/phpunit": "^10.5.16 || ^11.5.3",
"symfony/var-dumper": "^6.4.8 || ^7.2.0"
},
"autoload": {
"psr-4": {
@@ -68,9 +68,13 @@
"test": "Runs full test suite"
},
"suggest": {
"ext-iconv" : "Needed to ease transcoding CSV using iconv stream filters",
"ext-dom" : "Required to use the XMLConverter and the HTMLConverter classes",
"ext-mbstring": "Needed to ease transcoding CSV using mb stream filters"
"ext-iconv" : "Needed to ease transcoding CSV using iconv stream filters",
"ext-mbstring": "Needed to ease transcoding CSV using mb stream filters",
"ext-pdo": "Required to use the package with the PDO extension",
"ext-sqlite3": "Required to use the package with the SQLite3 extension",
"ext-mysqli": "Requiered to use the package with the MySQLi extension",
"ext-pgsql": "Requiered to use the package with the PgSQL extension"
},
"extra": {
"branch-alias": {
Loading