Skip to content

Releases: thephpleague/csv

version 7.0.0

19 Feb 12:17
Compare
Choose a tag to compare

Added

  • A new flexible mechanism to format and validate a row before its insertion by adding

Fixed

  • jsonSerialize, toXML and toHTML output can be modified using Reader query options methods. #66
  • detectDelimiterList index keys now represents the occurrence of the found delimiter.
  • the named constructor createFromString now accepts the $newline sequence as a second argument.
  • Default SplFileObject flags value is now SplFileObject::READ_CSV|SplFileObject::DROP_NEW_LINE
  • All CSV properties are now copied when using newReader and newWriter methods

Removed

  • ini_set("auto_detect_line_endings", true); setting is no longer set in the class constructor. Mac OS X users must explicitly set this ini options in their script.
  • Writer and Reader default constructor are removed from public API in favor of the named constructors.
  • All Writer methods and constant related to CSV data validation and formatting before insertion.

Please refers to the documentation or the library CHANGELOG for more details and a complete list of changes

version 6.3.0

21 Jan 12:11
Compare
Choose a tag to compare

Added AbstractCSV::getInputBOM , AbstractCSV::getOutputBOM, AbstractCSV::setOutputBOM methods to control the BOM character added at the top of each CSV.

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

version 6.2.0

12 Dec 11:39
Compare
Choose a tag to compare

Added Writer::setNewline , Writer::getNewline to control the newline sequence characters added at the end of each inserted CSV row.

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

version 6.1.0

08 Dec 07:59
Compare
Choose a tag to compare

Added

  • Reader::fetchAssoc now also accepts an integer as first argument representing a row index.

version 6.0.1

12 Nov 20:06
Compare
Choose a tag to compare
  • bug fix AbstractCsv::detectDelimiterList

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