CSV v9.0.0 Release Notes
Release Date: 2017-08-18 // over 6 years ago-
โ Added
- ๐ Improved CSV Records selection
League\Csv\Reader::getRecords
to access all CSV recordsLeague\Csv\Statement
provides a constraint builder to select CSV records.League\Csv\ResultSet
represents the result set of the selected CSV records.League\Csv\delimiter_detect
function to detect CSV delimiter character
- ๐ Improved CSV document header selection.
League\Csv\Reader::getHeader
League\Csv\Reader::getHeaderOffset
League\Csv\Reader::setHeaderOffset
- ๐ Improved CSV Records conversion
League\Csv\CharsetConverter
converts CSV records charset.League\Csv\XMLConverter
converts CSV records into DOMDocumentLeague\Csv\HTMLConverter
converts CSV records into HTML table.
- ๐ Improved Exception handling
League\Csv\Exception
the default exceptionLeague\Csv\CannotInsertRecord
- ๐ Improved CSV document output
League\Csv\AbstractCsv::chunk
method to output the CSV document in chunkLeague\Csv\bom_match
function to detect BOM sequence in a given stringLeague\Csv\ByteSequence
interface to decoupled BOM sequence from CSV documents
- ๐ Improved CSV records column count consistency on insertion
League\Csv\ColumnConsistency
- ๐ Improved CSV document flush mechanism on insertion
League\Csv\Writer::setFlushThreshold
League\Csv\Writer::getFlushThreshold
- ๐ Improve RFC4180 compliance
League\Csv\RFC4180Field
to format field according to RFC4180 rules
๐ Deprecated
- Nothing
๐ Fixed
๐ Improved CSV record insertion
League\Csv\Writer::insertOne
only accepts an array and returns a integerLeague\Csv\Writer::insertAll
only accepts an iterable of array and returns an integer
Normalized CSV offset returned value
League\Csv\Reader::fetchColumn
always returns the CSV document original offset.
โ Removed
examples
directory- ๐
PHP5
support - ๐ The following method is removed because The BOM API is simplified:
League\Csv\AbstractCsv::stripBOM
- ๐ All conversion methods are removed in favor of the conversion classes:
League\Csv\Writer::jsonSerialize
League\Csv\AbstractCsv::toHTML
League\Csv\AbstractCsv::toXML
League\Csv\AbstractCsv::setInputEncoding
League\Csv\AbstractCsv::getInputEncoding
- ๐ The following methods are removed because the PHP stream filter API is simplified:
League\Csv\AbstractCsv::isActiveStreamFilter
League\Csv\AbstractCsv::setStreamFilterMode
League\Csv\AbstractCsv::appendStreamFilter
League\Csv\AbstractCsv::prependStreamFilter
League\Csv\AbstractCsv::removeStreamFilter
League\Csv\AbstractCsv::clearStreamFilters
- ๐ The following methods are removed because switching between connections is no longer possible:
League\Csv\AbstractCsv::newReader
League\Csv\AbstractCsv::newWriter
League\Csv\Reader::getNewline
League\Csv\Reader::setNewline
- ๐ The Exception mechanism is improved thus the following class is removed:
League\Csv\Exception\InvalidRowException
;
- ๐ The CSV records filtering methods are removed in favor of the
League\Csv\Statement
class:League\Csv\AbstractCsv::addFilter
,League\Csv\AbstractCsv::addSortBy
,League\Csv\AbstractCsv::setOffset
,League\Csv\AbstractCsv::setLimit
;
- CSV records selecting API methods is simplified:
League\Csv\Reader::each
League\Csv\Reader::fetch
League\Csv\Reader::fetchAll
League\Csv\Reader::fetchAssoc
League\Csv\Reader::fetchPairsWithoutDuplicates
- ๐ Formatting and validating CSV records on insertion is simplified, the following methods are removed:
League\Csv\Writer::hasFormatter
League\Csv\Writer::removeFormatter
League\Csv\Writer::clearFormatters
League\Csv\Writer::hasValidator
League\Csv\Writer::removeValidator
League\Csv\Writer::clearValidators
League\Csv\Writer::getIterator
- ๐ฆ The following Formatters and Validators classes are removed from the package:
League\Csv\Plugin\SkipNullValuesFormatter
League\Csv\Plugin\ForbiddenNullValuesValidator
League\Csv\Plugin\ColumnConsistencyValidator
replace byLeague\Csv\ColumnConsistency
League\Csv\Writer
no longers implements theIteratorAggregate
interfaceLeague\Csv\AbstractCsv::fetchDelimitersOccurrence
is removed replace byLeague\Csv\delimiter_detect
function
- ๐ Improved CSV Records selection