Skip to content

Releases: thephpleague/csv

version 9.20.1

18 Dec 10:14
Compare
Choose a tag to compare

Added

  • None

Deprecated

  • None

Fixed

  • #554 Fix stream filte removal by crocodele
  • Fix Statement callback and closure signature

Removed

  • None

version 9.20.0

13 Dec 15:51
Compare
Choose a tag to compare

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

version 9.19.0

08 Dec 08:10
Compare
Choose a tag to compare

Added

  • JsonConverter::withPrettyPrint now accepts an optional $identSize parameter as its unique parameter.
  • Statement::when to enable conditionable query building.
  • Using PHP8.4 Deprecated attribute to signal deprecated public API methods and constants.

Deprecated

  • JsonConverter::indentSize

Fixed

  • Adding forgotten support for callable in the Query\Constraint namespace.
  • Fix HttpHeaders::forFileDownload to be inline with RFC2183 and HTTP field name and value best practices.

Remove

  • None

version 9.18.0

18 Oct 09:01
Compare
Choose a tag to compare

Added

  • League\Csv\JsonConverter::chunkSize
  • League\Csv\AbstractCsv::download

Deprecated

  • League\Csv\AbstractCsv::output use League\Csv\AbstractCsv::download instead
  • League\Csv\FragmentFinder and derived methods are marked as experimental as their results will be changed in the next major version.

Fixed

  • League\Csv\JsonConverter::download the filename is now nullable
  • League\Csv\XMLConverter::download the filename is now nullable
  • League\Csv\JsonConverter::save throws a TypeError exception if the $destination type is not supported.

Remove

  • None

version 9.17.0

10 Oct 10:32
Compare
Choose a tag to compare

Added

  • League\Csv\SwapDelimiter::apppendTo
  • League\Csv\SwapDelimiter::prependTo
  • League\Csv\CharsetConverter::apppendTo
  • League\Csv\CharsetConverter::prependTo
  • League\Csv\XMLConverter::download
  • League\Csv\JsonConverter
  • League\Csv\Constraint\Criteria::andNot
  • League\Csv\Constraint\Criteria::orNot
  • League\Csv\Constraint\Criteria::xorNot
  • League\Csv\Serializer\MapRecord attribute
  • adding the convertEmptyStringToNull options to MapCell and to MapRecord to improve string and null conversion
  • adding the trimFieldValueBeforeCasting options to MapCell and to MapRecord to improve string conversion
  • adding the trimElementValueBeforeCasting option to CasToArray to improve conversion during denormalization
  • adding the headerOffset option to CasToArray to improve conversion during denormalization. The optoon is only used with the CSV shape.

Deprecated

  • None

Fixed

  • Cast* methods accept more input type to improve Denormalization usage when Reader::addFormatter is used or when the collection contains data other than string and null.
  • Stream::getSize is added to the internal Stream class
  • Stream::getContents is added to the internal Stream class
  • MapIterator::toIterator is added to the internal class MapIterator class to convert any iterable into an Iterator.
  • Casting a CSV to an array it now will be a collection of array instead of a simple array.
  • Added the internal class HttpHeaders to improve file download throughout the codebase.

Removed

  • leage\csv-doctrine is no longer a sub-split of the main league/csv package.

version 9.16.0

24 May 11:08
Compare
Choose a tag to compare

Added

  • Bom enum
  • Stream::ftell
  • Statement::orderByAsc
  • Statement::orderByDesc
  • Statement::andWhere
  • Statement::whereNot
  • Statement::orWhere
  • Statement::xorWhere
  • Statement::andWhereColumn
  • Statement::whereNotColumn
  • Statement::orWhereColumn
  • Statement::xorWhereColumn
  • Statement::andWhereOffset
  • Statement::whereNotOffset
  • Statement::orWhereOffset
  • Statement::xorWhereOffset
  • Query feature to allow easier filtering, ordering and querying tabular data

Deprecated

  • ByteSequence Interface use the Bom enum instead
  • Info::fetchBOMSequence use Bom::tryFromSequence instead
  • League\Csv\Doctrine use the new League\Csv\Constraint feature instead
  • League\Csv\Statement::create arguments; The method should be used without any argument at all. All arguments will be removed in the next major version.

Fixed

  • Reader and ResultSet docblocks
  • internal code uses Bom enum instead of Info::fetchBOMSequence
  • the AbstractCsv BOM related properties are moved to being Bom instances instead of nullable string.
  • setOutpuBOM will only accept valid BOM sequences all other values except the empty string will throw a ValueError exception;
  • The package no longer requires the ext-mbstring extension to work. But you should have it install in your system in order to use the mbstring related stream filters.
  • Issue #524 fix issue with ResultSet::chunkBy not working as documented.

Removed

  • None

version 9.15.0

20 Feb 20:02
Compare
Choose a tag to compare

Added

  • Statement::select
  • TabularDataReader::getRecordsAsObject
  • TabularDataReader::chunkBy
  • TabularDataReader::mapHeader

Deprecated

  • TabularDataReader::getObjects use TabularDataReader::getRecordsAsObject instead

Fixed

  • Reader::select and ResultSet::select now internally use Statement::select
  • Statement should not throw when LimitIterator is used in combinaison with ArrayIterator.
  • Statement internal codebase improvement.
  • Using the $header argument on Statement::process is no longer deprecated. E_USER_DEPRECATED is no longer triggered.
  • BOM stripping no longer depends on the mbstring extension
  • TabularDataReader::fetchColumn is no longer deprecated

Removed

  • None

version 9.14.0

29 Dec 07:39
Compare
Choose a tag to compare

Added

  • League\Csv\TabularDataReader::nthAsObject equivalent to nth but returns an object or null
  • League\Csv\TabularDataReader::firstAsObject equivalent to first but returns an object or null
  • League\Csv\Serializer\Denormalizer::types list all the registered types

Deprecated

  • None

Fixed

  • None

Removed

  • None

version 9.13.0

16 Dec 11:10
Compare
Choose a tag to compare

Added

  • League\Csv\SwapDelimiter stream filter to allow working with multibyte CSV delimiter
  • League\Csv\Serializer\AfterMapping to work around the limitation of not using the class constructor during denormalization.
  • League\Csv\Serializer\Denormalizer to allow registering type alias to improve callback usage.
  • League\Csv\Serializer\MapCell has a new property ignore to allow ignoring a property or a method during denormalization.

Deprecated

  • None

Fixed

  • None

Removed

  • None

version 9.12.0

01 Dec 17:55
Compare
Choose a tag to compare

Added

  • TabulatDataReader::value
  • TabulatDataReader::select
  • TabulatDataReader::getObjects
  • TabulatDataReader::matching
  • TabulatDataReader::matchingFirst
  • TabulatDataReader::matchingFirstOrFail
  • ResultSet::fromRecords
  • Stream::setMaxLineLen
  • Stream::getMaxLineLen
  • League\Csv\Serializer\Denormalizer to allow denormalizing records into objects #508
  • League\Csv\FragmentFinder to implement RFC7111

Deprecated

  • Using the $header argument on Statement::process is deprecated and will be removed in
    the next version. Use TabularDataReader::getRecords on the returned value instead.
    It's usage will trigger a E_USER_DEPRECATED call.

Fixed

  • The optional $header argument for TabularDataReader;;getRecords becomes a full mapper between the records column offset and the column names #498
  • ResultSet constructor now allows the records to be an array.
  • The internal Stream object will throw a RuntimeException if the rewind action fails
  • if calls to fseek fails (returns -1 ) a RuntimeException will be thrown.
  • Stream can iterate and return the full line respecting SplFielObject flags. Previously it only returned the CSV records.
  • MapIterator::fromIterable to instantiate a MapIterator object from any iterable structure.

Removed

  • None