Releases: thephpleague/csv
Releases Β· thephpleague/csv
version 9.16.0
Added
Bom
enumStream::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 theBom
enum insteadInfo::fetchBOMSequence
useBom::tryFromSequence
insteadLeague\Csv\Doctrine
use the newLeague\Csv\Constraint
feature insteadLeague\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
andResultSet
docblocks- internal code uses
Bom
enum instead ofInfo::fetchBOMSequence
- the
AbstractCsv
BOM related properties are moved to beingBom
instances instead of nullable string. setOutpuBOM
will only accept valid BOM sequences all other values except the empty string will throw aValueError
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 thembstring
related stream filters. - Issue #524 fix issue with
ResultSet::chunkBy
not working as documented.
Removed
- None
version 9.15.0
Added
Statement::select
TabularDataReader::getRecordsAsObject
TabularDataReader::chunkBy
TabularDataReader::mapHeader
Deprecated
TabularDataReader::getObjects
useTabularDataReader::getRecordsAsObject
instead
Fixed
Reader::select
andResultSet::select
now internally useStatement::select
Statement
should not throw whenLimitIterator
is used in combinaison withArrayIterator
.Statement
internal codebase improvement.- Using the
$header
argument onStatement::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
Added
League\Csv\TabularDataReader::nthAsObject
equivalent tonth
but returns an object ornull
League\Csv\TabularDataReader::firstAsObject
equivalent tofirst
but returns an object or nullLeague\Csv\Serializer\Denormalizer::types
list all the registered types
Deprecated
- None
Fixed
- None
Removed
- None
version 9.13.0
Added
League\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 propertyignore
to allow ignoring a property or a method during denormalization.
Deprecated
- None
Fixed
- None
Removed
- None
version 9.12.0
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 #508League\Csv\FragmentFinder
to implement RFC7111
Deprecated
- Using the
$header
argument onStatement::process
is deprecated and will be removed in
the next version. UseTabularDataReader::getRecords
on the returned value instead.
It's usage will trigger aE_USER_DEPRECATED
call.
Fixed
- The optional
$header
argument forTabularDataReader;;getRecords
becomes a full mapper between the records column offset and the column names #498 ResultSet
constructor now allows the records to be anarray
.- The internal
Stream
object will throw aRuntimeException
if the rewind action fails - if calls to
fseek
fails (returns-1
) aRuntimeException
will be thrown. Stream
can iterate and return the full line respectingSplFielObject
flags. Previously it only returned the CSV records.MapIterator::fromIterable
to instantiate aMapIterator
object from any iterable structure.
Removed
- None
version 9.11.0
Added
EscapeFormula::unescapeRecord
does the opposite ofEscapeFormula::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.
Deprecated
EscapeFormula::__invoke
useEscapeFormula::__escapeRecord
instead
Fixed
- None
Removed
- None
version 9.10.0
Added
Writer::forceEnclosure
andWriter::relaxEnclosure
to control the presence of enclosure in the generated CSVWriter::getEndOfLine
andWriter::setEndOfLine
Deprecated
EncloseField
stream filter in favor of the newWriter::forceEnclosure
method.Writer::getNewline
andWriter::setNewline
in favor ofWriter::getEndOfLine
andWriter::setEndOfLine
Fixed
Stream::fwrite
to allow writing to a file in a normalized way. Internal use.- Documentation Fixed removing unreleased documented feature by @nclavaud
Removed
- None
version 9.9.0
Added
TabularDataWriter
interface to represent how to write to a tabular data document.TabularDataReader::first
to replaceTabularDataReader::fetchOne
TabularDataReader::nth
to replaceTabularDataReader::fetchOne
CharsetConverter::addBOMSkippingTo
to improve BOM skipping see bug #483
Deprecated
TabularDataReader::fetchOne
Fixed
-
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
Removed
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.- Drop support for PHP7 and PHP8.0
- Polyfill to enable using fputcsv
$eol
argument
version 9.8.0
Added
- Added PHP7.4 typed properties where applicable
TabularDataReader::fetchColumnByName
to replaceTabularDataReader::fetchColumn
TabularDataReader::fetchColumnByOffset
to replaceTabularDataReader::fetchColumn
Deprecated
TabularDataReader::fetchColumn
useTabularDataReader::fetchColumnByOffset
orTabularDataReader::fetchColumnByName
instead
Fixed
AbstractCsv
constructor is marked final via docblock.
The method should never be extended or changed in child classes to avoid unexpected behaviour
Removed
- PHP7.3 support
- Remove internal
EmptyEscapeParser
Polyfill used inReader
class - Remove PHP7.4 polyfill features in
Writer
class
version 9.7.4
Added
- None
Deprecated
- None
Fixed
- Bug fix
EscapeFormula
to follow OWASP latest recommendation PR #452
thanks to @robertfausk and @Lehmub
Removed
- None