CSV data manipulation made easy in PHP
Statement::select
TabularDataReader::getRecordsAsObject
TabularDataReader::chunkBy
TabularDataReader::mapHeader
TabularDataReader::getObjects
use TabularDataReader::getRecordsAsObject
insteadReader::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.$header
argument on Statement::process
is no longer deprecated. E_USER_DEPRECATED
is no longer triggered.mbstring
extensionTabularDataReader::fetchColumn
is no longer deprecatedLeague\Csv\TabularDataReader::nthAsObject
equivalent to nth
but returns an object or null
League\Csv\TabularDataReader::firstAsObject
equivalent to first
but returns an object or nullLeague\Csv\Serializer\Denormalizer::types
list all the registered typesLeague\Csv\SwapDelimiter
stream filter to allow working with multibyte CSV delimiterLeague\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.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
$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.$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
.Stream
object will throw a RuntimeException
if the rewind action failsfseek
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.EscapeFormula::unescapeRecord
does the opposite of EscapeFormula::escapeRecord
TabularReader::each
TabularReader::exists
TabularReader::reduce
TabularReader::filter
TabularReader::slice
TabularReader::sorted
Reader::addFormatter
All the methods from the TabularReader
interface are implemented on the Reader
and the ResultSet
objects.
EscapeFormula::__invoke
use EscapeFormula::__escapeRecord
insteadWriter::forceEnclosure
and Writer::relaxEnclosure
to control the presence of enclosure in the generated CSVWriter::getEndOfLine
and Writer::setEndOfLine
EncloseField
stream filter in favor of the new Writer::forceEnclosure
method.Writer::getNewline
and Writer::setNewline
in favor of Writer::getEndOfLine
and Writer::setEndOfLine
Stream::fwrite
to allow writing to a file in a normalized way. Internal use.TabularDataWriter
interface to represent how to write to a tabular data document.TabularDataReader::first
to replace TabularDataReader::fetchOne
TabularDataReader::nth
to replace TabularDataReader::fetchOne
CharsetConverter::addBOMSkippingTo
to improve BOM skipping see bug #483
TabularDataReader::fetchOne
Stream::createFromResource
Stream::__construct
is made private. The class is already marked as internal so BC break does not apply on it.
Using PHP8 feature to rewrite internal codebase
Replaced simple comparisons with strict comparison operator where types are obvious in internal codebase by @astepin
Marked class constants explicitly as public by @astepin
Minimal support version PHP8.1.2
Fix Docblock and method signature using PHP8 feature (Union Type)
Fix Internal codebase around seek
usage and `#75917 requires PHP8.1.2
Remove internal usage of deprecated methods
Stream::fwrite
The class is already marked as internal so BC break does not apply on it.Stream::fgets
The class is already marked as internal so BC break does not apply on it.$eol
argumentTabularDataReader::fetchColumnByName
to replace TabularDataReader::fetchColumn
TabularDataReader::fetchColumnByOffset
to replace TabularDataReader::fetchColumn
TabularDataReader::fetchColumn
use TabularDataReader::fetchColumnByOffset
or TabularDataReader::fetchColumnByName
insteadAbstractCsv
constructor is marked final via docblock.EmptyEscapeParser
Polyfill used in Reader
classWriter
classEscapeFormula
to follow OWASP latest recommendation PR #452ReturnTypeWillChange
to avoid emitting a unnecessary deprecation notice. thanks to cedric-anne