Skip to content

Releases: thephpleague/csv

version 6.0.0

28 Aug 10:30
Compare
Choose a tag to compare

New API

  • Stream Filter API added to enable the use of PHP stream filters on CSV objects.

New Methods

  • To simplify CSV objects instantiation new named constructors are added League\Csv\AbstractCsv::createFromPath and League\Csv\AbstractCsv::createFromFileObject
  • New methods allow creating CSV objects from already created CSV objects: League\Csv\AbstractCsv::newWriter and League\Csv\AbstractCsv::newReader methods can be call on both classes

Bug Fixes

  • League\Csv\Reader::each is now more strict $callable MUST returns true

Removed Methods

  • League\Csv\AbstractCsv::detectDelimiter replaced by League\Csv\AbstractCsv::detectDelimiterList
  • League\Csv\AbstractCsv::set/getEncoding replaced by League\Csv\AbstractCsv::set/getEncodingFrom
  • League\Csv\Reader::getWriter replaced by League\Csv\AbstractCsv::newWriter
  • League\Csv\Writer::getReader replaced by League\Csv\AbstractCsv::newReader
  • League\Csv\Reader::setSortBy deprecated since version 5.2
  • League\Csv\Reader::setFilter deprecated since version 5.1

Miscellaneous

  • Since HHVM 3.2+ supports PHP FilterCallbackIterator, the library now works on HHVM.
  • Code quality improved
  • Adding a changelog to the library

Please refers to the documentation or the library CHANGELOG for more details

version 5.4.0

17 Apr 09:35
Compare
Choose a tag to compare

New Methods

the \League\Csv\Writer class gets 3 new methods to deal with issue #34

  • Writer::setColumnsCount
  • Writer::getColumnsCount
  • Writer::autodetectColumnsCount

To deal with column consistency check when inserting rows.

Deprecated Method

the \League\Csv\Reader::fetchCol method is renamed the \League\Csv\fetchColumn. The old method remains as a alias of the new method but will be remove on the next major version release. The change is made to add consistency with the new Writer methods.

Please refers to the documentation to see how the new methods work.

version 5.3.1

10 Apr 11:12
Compare
Choose a tag to compare
  • bug fixes in League\Csv\AbstractCSV
  • internal code refactoring
  • now League\Csv\Reader and League\Csv\Writer class both use the r+ $open_mode by default

version 5.3.0

24 Mar 08:33
Compare
Choose a tag to compare

New methods

Writer::setNullHandlingMode and Writer::getNullHandlingMode to better handle null insertion and/or conversion into a CSV field data #28

Bug fix

You don't need to set the ini_set("auto_detect_line_endings", true); anymore has the library will automatically do it for you. It is needed to be correctly work with a CSV built on a OSX machines.

This version features also internal code improvements.

Please refers to the official documentation for a full explication on the new features.

version 5.2.0

13 Mar 10:04
Compare
Choose a tag to compare

New methods

  • Reader::addSortBy, Reader::removeSortBy, Reader::hasSortBy, Reader::clearSortByto enhance sorting capabilities #12
  • Reader::clearFilterto enhance filtering capabilities #11

Improved Methods

  • Reader::setOffset now default to 0;
  • Reader::setLimit now default to -1;

Bug fix

  • AbstractCsv::detectDelimiter #16

Deprecated methods

  • Reader::setSortBy is deprecated and will be remove in the next major release. The method is now an alias of Reader::addSortBy. #12

Please review the documentation for more details on how to use these new features

version 5.1.0

11 Mar 12:37
Compare
Choose a tag to compare

New methods

  • Reader::each to apply a callable to each CSV row
  • Reader::addFilter, Reader::removeFilter, Reader::hasFilter to enhance filtering capabilities
  • Reader::detectDelimiter and Writer::detectDelimiter to ease working with unknown CSV data

Deprecated methods

  • Reader::setFilter is deprecated and will be remove in the next major release. The method is now an alias of Reader::addFilter.

Please review the documentation for more details on how to use these new features

version 5.0.0

28 Feb 14:59
Compare
Choose a tag to compare
version 5.0.0 Pre-release
Pre-release
  • Updated to reflect new GitHub username (changed from nyamsprod to thephpleague).
  • Updated to reflect new namespace (changed from Bakame to League).

version 4.2.1

22 Feb 20:01
Compare
Choose a tag to compare

Bug Fix

Remove $open_mode validation. Now the validation is done by PHP Internals

New Traits

\Bakame\Csv\Iterator\IteratorFilter to enable Iterator filtering
\Bakame\Csv\Iterator\IteratorSortBy to enable Iterator sorting
\Bakame\Csv\Iterator\IteratorInterval to enable setting Iterator intervals

Update Trait

\Bakame\Csv\Iterator\IteratorQuery uses all the new Traits to enable CSV filtering

version 4.2.0

17 Feb 14:06
Compare
Choose a tag to compare

New Trait

\Bakame\Csv\ConverterTrait to better deal with Csv conversion

New Method

  • \Bakame\Csv\AbstractCsv::toXML which convert the Csv into a DomDocument object

Method improved

  • \Bakame\Csv\AbstractCsv::toHTML
  • \Bakame\Csv\AbstractCsv::jsonSerialize
  • \Bakame\Csv\AbstractCsv::output now can take a optional $filename argument. When present the function will output all needed HTTP headers.
  • \Bakame\Csv\AbstractCsv::getIterator method improved
  • \Bakame\Csv\Reader::fetchCol method now default to $columnIndex = 0
  • \Bakame\Csv\Reader::fetchOne method now default to $offset = 0

version 4.1.2

16 Feb 09:03
Compare
Choose a tag to compare
  • Adding PHP 5.6 test in travis.yml
  • Dropping PSR-0 in favor of PSR-4