Skip to content

Releases: parsecsv/parsecsv-for-php

1.3.2 Release

07 Nov 14:23
Compare
Choose a tag to compare

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.

1.3.1 Release

20 Jun 21:28
Compare
Choose a tag to compare

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.

1.3.0 Release

14 Apr 18:22
b444afa
Compare
Choose a tag to compare

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

1.2.1 Release

25 Apr 17:24
Compare
Choose a tag to compare

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.

1.2.0 Release

07 Jan 08:36
Compare
Choose a tag to compare

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.

1.1.1 Release

15 Feb 13:12
65566ad
Compare
Choose a tag to compare

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.

1.1.0 Release

09 Aug 13:02
Compare
Choose a tag to compare

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.

1.0.0 Release

03 Mar 11:17
Compare
Choose a tag to compare
  • 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.

0.4.5 Release

03 Jun 00:59
Compare
Choose a tag to compare

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