PackageTrack
Sign in Get early access

parsecsv/php-parsecsv

CSV data parser for PHP

1.3.2 6.2M downloads/mo #2278 most downloaded on Packagist parsecsv/parsecsv-for-php

What this package is like to depend on

Last release 5 years ago

no release in 18 months

Release timing varies

gaps range from 2 months to 3.8 years

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

9 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

9 releases · Jun 2014 to Nov 2021
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 9
  1. 1.3.2 07 Nov 2021
    Release notes

    Breaking changes: none
    New features: none

    Bugfix

    Allow _guess_delimiter() to work with a single row of data.

    As a consequence,

    • $csv->auto() now works for files with just one row of data.
    • $csv->autoDetectionForDataString() now works for data strings with just one row of data.

    See issue #206.

    Open source →
  2. 1.3.1 20 Jun 2021
    Release notes

    Breaking changes: none
    New features: none

    Bugfix

    Calling the function parseFile() will now set the $csv->data field.
    Until now, the parsed data was only returned.
    This adds consistency with $csv->parse() for the following operations on the object.

    Open source →
  3. 1.3.0 14 Apr 2021
    Release notes

    If you have questions or feedback about the information below, feel free to open an issue.

    Breaking change:

    • Passing file paths as a parameter to parse() or the constructor new Csv() is now deprecated and will be removed in v2.0.0. Use Csv::parseFile() instead.

      WARNING: It will call trigger_error() for now.
      This may still break your application, depending on your PHP config file. You can remove E_USER_DEPRECATED from the error_reporting mask to avoid breaking your application:

      Example:

      error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED

      This change is to avoid security issues: see issue #198.

    Non-breaking deprecations:

    • The function load_data() is deprecated. Call loadFile() or loadDataString() instead.

    • Supplying CSV data strings (file content) to auto() is deprecated. Please use autoDetectionForDataString().

      The motivation is to make subtle gotchas less likely: when the file cannot be found or read by PHP (permissions), its file path would be treated like CSV data.

    • Currently, there is code to parse .php: <?...?> tags are removed before the remaining file content is treated like a .csv file. This rarely-used functionality will be removed in v2.0.0. You are only affected if you use ParseCsv to parse .php files.

    New features: none
    Bug fixes: none

    Open source →
  4. 1.2.1 25 Apr 2020
    Release notes

    Breaking changes: none
    New features: none
    Bug fixes: none

    Code quality / developer experience:

    • We switched from PHPUnit 4 to 6 to get rid of our TestCase
      wrapper. This will reduce friction for PhpStorm users,
      because it gets rid of the "Multiple definitions" error
      See issue #188. Thanks to @SharkMachine for the hint.
      Because of this change, we had to drop Travis coverage for PHP <7.0. For you as a library user, PHP 5.6 and 5.6 remain supported.
    Open source →
  5. 1.2.0 07 Jan 2020
    Release notes

    Breaking changes: none

    New features:

    • Compatible with PHP 7.4. Thanks to @andreybolonin @morrislaptop @martijnengler and @fjf2002.
    • unparse() now also understands $use_mb_convert_encoding.
    • Verbal condition operators are now allowed to contain upper case letters, for example:
      $csv->conditions = 'rating IS GREATER THAN 4';

    Bug fixes:

    • All filter condition operators containing "is" or "equals"
      were broken.

    Code quality:

    • Improved test coverage.
    Open source →
  6. 1.1.1 02 Feb 2019
    Release notes

    Features added: none

    Bugfixes since 1.1.0:

    • #149 fixes ::unparse() bug if array ids don't begin with zero
    • #150 fixes ::unparse() bug if no data remains for unparsing
    • #151: Function load_data: check length of input, prevents E_NOTICE if too long

    Maintenance:

    • Documentation: improved README.md and added an example.
    • Improved PHPUnit code coverage.
    Open source →
  7. 1.1.0 09 Aug 2018
    Release notes

    Features:

    • Added getCollection method that returns a Illuminate\Support\Collection object - useful for using the mapping functions.
    • New function getTotalDataRowCount for getting total data row count without parsing all data.

    Bugfixes:

    • Replaced fread with file_get_contents to avoid the 8192-byte limit. This is important when reading from a stream. Before this fix, the CSV data would be truncated without a warning.
    • ParseCSV now ignores empty lines at the end of files.

    Maintenance:

    • Dropping PHP 5.4 support. In composer.json we now explicitly specify the minimum PHP version as 5.5. Folks, please use 7.x for performance and security, but ParseCSV does support PHP 5.5 and higher.
    • Improved documentation, e.g., in README.md and ChangeLog.txt.
    • Improved PHPUnit code coverage.
    Open source →
  8. 1.0.0 03 Mar 2018
    Release notes
    • Renamed class from parseCSV to Csv and added namespace ParseCsv
      for PSR-4 compliance.

    • Fully PHP 7.2-compatible: This library supports PHP 5.4 to PHP 7.2 - which is
      checked by comprehensive PHPUnit tests.

    • Added support for Microsoft Excel's "sep=" to detect the delimiter (Issue #60).

    • Added data type detection - function getDatatypes() guesses the type of each column.

    • Improved MIME type in output() sends correct MIME type to browser
      if the separator is a tab (Issue #79).

    • Added support for using mb_convert_encoding() instead of
      iconv() - see issue #109.

    • Improved documentation.

    • Fixed a number of minor bugs - see GitHub issues.

    Open source →
  9. 0.4.5 03 Jun 2014
    Release notes

    0.4.5 Brings a new life into parseCSV. Work has begin on updating the code base to PHP 5 standards.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive