Repository navigation
Releases
Releases · thephpleague/csv
version 9.29.0
Added
- Support for
Closurein constant expressions during Record Mapping. AbstractCsv::fromStreamto instantiate aReaderor aWriterinstance from a stream or aSplFileObjectobjectAbstractCsv::fromPathto instantiate aReaderor aWriterinstance from a path as a string or aSplFileInfoobject- Support for
SortDirectionenum from PHP 8.6+ - #580 by okorneliuk - Record inference feature
- Added missing
Buffer::valuemethod
Deprecated
- None
Fixed
- Reduce the runtime and peak memory usage of
JsonConverterpretty printing. SwapDelimiter::prependTonow prepends the stream filter instead of appending it.Writer::forceEnclosurenow doubles embedded enclosures when the escape character is the empty string.EscapeFormularound-trip now preserves fields starting with the escape character- BOM handling is re-written to fix #586
- CSV Header during CSV download.
- Remove
ArrayIterator::uasortusage because the method is deprecated in PHP8.6. - Use
STREAM_FILTER_WRITEinprependStreamFilterOnWritemethod - #577 by zigzagdev - Initialize
$callbackproperty to null to prevent uninitialized property - #576 by zigzagdev - Fix EscapeFormula round-trip - #583 by binggao1230
- Leave an empty field untouched in EscapeFormula::escapeField - #593 by lenamonj
- Fix
TimeFieldseparator - #592 by lenamonj - Fix
Buffer::nthandBuffer::nthASObject#594 by dualfroz - Fix
FragmentFinder::findFirstcrashing see issue #596 - Fix
FragmentFinderignoring row and column ranges whose start and end are the same, likerow=4-4- #599 by ybai08 - Fix
FragmentFinderignoring positions written with leading zeros, likerow=05-07, which RFC 7111 allows - #600 by ybai08 - Fix
CharsetConverterdecodingUTF-16andUTF-32input with the wrong byte order after the first chunk when the stream starts with a little-endian BOM - #602 by wleeaf - Fix
Readerreturning an extra empty record at the end of anSplFileObjectdocument when empty records are included - #603 by wleeaf - Fix the
NOT BETWEENandNOT_BETWEENcomparison operators being resolved toBETWEEN- #604 by wleeaf - Fix query constraints and orderings throwing an
ArgumentCountErrorwhen the column value is resolved through an object__callmethod - #605 by youdie006 TabularData::valuenow supports negative column offset. Beforenullwas always returned; nownullis only returned if the column offset does not exist.
Remove
- Support for PHP8.1
version 9.28.0
Added
EnumFormatterto format Enum for CSV serialization
Deprecated
- None
Fixed
- None
Remove
- None
This is the last version supporting PHP8.1
version 9.27.1
version 9.27.0
Added
AbstractCsv::fromandAbstractCsv::fromStringto simplify instantiatingReaderandWriterinstance.Stream::fromandStream::fromStringto simplify internal instantiation ofStreaminstances.
Deprecated
AbstractCsv::createFromStringuseAbstractCsv::fromStringinsteadAbstractCsv::createFromStreamuseAbstractCsv::frominsteadAbstractCsv::createFromFileObjectuseAbstractCsv::frominsteadStream::createFromResourceuseStream::frominsteadStream::createFromStringuseStream::fromStringinstead
Fixed
- `None
Remove
- None
version 9.26.0
Added
JsonFormat::NdJsonHeaderandJsonFormat::NdJsonHeaderLessJsonConverterconversion methods accept an optional$headerparameter to handle the new JSON formats.Writer::insertAlland converter classesconvertmethods now acceptTabularDataandTabularDataProviderimplementing classes
Deprecated
- None
Fixed
- Adding an internal
Warningclass to fix warnings triggering in the codebase. - Fix
chunkSizeusage when NDJson is generated by theJsonConverterclass. - NdJson/Jsonlines content-type is fixed to
application/x-ndjson.
Remove
- None
version 9.25.0
Added
JsonFormatEnum to allow exporting to JsonLines with theJsonConverterobject.TabularDataProviderinterface to allow connecting to the package features without implementing all the methods.
Deprecated
- None
Fixed
- Fix test around equality, PHPUnit and closures #568
- Added support for
PHP8.5in github actions - Ensure
DOMDocument::createTextNode()receives a string #567 by serpentblade
Remove
- None
version 9.24.1
version 9.24.0
Added
TabularData::lastandTabularData::lastAsObject
Deprecated
- None
Fixed
- Improved implementation for
AbstractCsv::downloadmethod
Remove
- None
version 9.23.0
version 9.22.0
Added
Writer::necessaryEnclosureTabularDataReader::selectAllExceptStatement::selectAllExceptResultSet::fromandResultSet::tryFromRdbmsResultclass to ease importing RDBMS result into the package classesTabularDatainterfaceBufferclassXMLConverter::supportsHeaderXMLConverter::whenHTMLConverter::whenJsonConverter::whenCharsetConverter::appendOnReadTo,CharsetConverter::appendOnWriteTo,CharsetConverter::prependOnReadTo,CharsetConverter::prependOnWriteTo
Deprecated
Writer::relaxEnclosureuseWriter::necessaryEnclosureResultSet::createFromTabularDataReaderuseResultSet::fromResultSet::createFromRecordsuseResultSet::fromResultSet::__constructis marked as beinginternaland deprecated before being made private useResultSet::fromXMLConverter::convertuseXMLConverter::importinsteadXMLConverter::createuseXMLConverter::__constructinsteadHTMLConverter::createuseHTMLConverter::__constructinsteadStatement::createuseStatement::__constructinsteadFragmentFinder::createuseFragmentFinder::__constructinsteadCharsetConverter::appendTo,CharsetConverter::prependTouse the more strict methods added on the instance
Fixed
Comparison::CONTAINSmust check the value is a string before callingstr_compare#548 by cage-is- Fix testing to improve Debian integration #549 by David Prévot and tenzap
Bom::tryFromSequenceandBom::fromSequencesupports theReaderandWriterclasses.XMLConverter::$formattershould not be public.XMLConverterinternal rewritten to take advantage of PHP8.4 new dom classesHTMLConverterinternal rewritten to take advantage of PHP8.4 new dom classesXMLConverter::fieldElementnow has anullablefield element to allow using headers names as cell names.
Removed
- None