EnumFormatter to format Enum for CSV serializationAbstractCsv::from and AbstractCsv::fromString to simplify instantiating Reader and Writer instance.Stream::from and Stream::fromString to simplify internal instantiation of Stream instances.AbstractCsv::createFromString use AbstractCsv::fromString insteadAbstractCsv::createFromStream use AbstractCsv::from insteadAbstractCsv::createFromFileObject use AbstractCsv::from insteadStream::createFromResource use Stream::from insteadStream::createFromString use Stream::fromString insteadJsonFormat::NdJsonHeader and JsonFormat::NdJsonHeaderLessJsonConverter conversion methods accept an optional $header parameter to handle the new JSON formats.Writer::insertAll and converter classes convert methods now accept TabularData and TabularDataProvider implementing classesWarning class to fix warnings triggering in the codebase.chunkSize usage when NDJson is generated by the JsonConverter class.application/x-ndjson.JsonFormat Enum to allow exporting to JsonLines with the JsonConverter object.TabularDataProvider interface to allow connecting to the package features without implementing all the methods.PHP8.5 in GitHub actionsDOMDocument::createTextNode() [] receives a string #567 by serpentbladeTabularData::last and TabularData::lastAsObjectAbstractCsv::download methodWriter::necessaryEnclosureTabularDataReader::selectAllExceptStatement::selectAllExceptResultSet::from and ResultSet::tryFromRdbmsResult class to ease importing RDBMS result into the package classesTabularData interfaceBuffer classXMLConverter::supportsHeaderXMLConverter::whenHTMLConverter::whenJsonConverter::whenCharsetConverter::appendOnReadTo, CharsetConverter::appendOnWriteTo, CharsetConverter::prependOnReadTo, CharsetConverter::prependOnWriteToWriter::relaxEnclosure use Writer::necessaryEnclosureResultSet::createFromTabularDataReader use ResultSet::fromResultSet::createFromRecords use ResultSet::fromResultSet::__construct is marked as being internal and deprecated before being made private use ResultSet::fromXMLConverter::convert use XMLConverter::import insteadXMLConverter::create use XMLConverter::__construct insteadHTMLConverter::create use HTMLConverter::__construct insteadStatement::create use Statement::__construct insteadFragmentFinder::create use FragmentFinder::__construct insteadCharsetConverter::appendTo, CharsetConverter::prependTo use the more strict methods added on the instanceComparison::CONTAINS must check the value is a string before calling str_compare #548 by cage-isBom::tryFromSequence and Bom::fromSequence supports the Reader and Writer classes.XMLConverter::$formatter should not be public.XMLConverter internal rewritten to take advantage of PHP8.4 new dom classesHTMLConverter internal rewritten to take advantage of PHP8.4 new dom classesXMLConverter::fieldElement now has a nullable field element to allow using headers names as cell names.TabularDataReader::map method.StreamFilter classCallbackStreamFilter classAbstractCsv::appendStreamFilterOnReadAbstractCsv::appendStreamFilterOnWriteAbstractCsv::prependStreamFilterOnReadAbstractCsv::prependStreamFilterOnWriteStream::getMode returns the underlying stream mode; internal codebase.AbstractCsv::addStreamFilter use AbstractCsv::appendStreamFilterOnRead or AbstractCsv::appendStreamFilterOnWrite instead.CharsetConverter and SwapDelimiter internal code.supportStreamFilterOnReadand supportStreamFilterOnWrite to expose the document real stream filter capabilities.XMLConverter::formatterHTMLConverter::formatterWriter::encloseNoneWriter::encloseNecessaryWriter::noEnclosureJsonConverter::formatter now accepts callable before only Closure where accepted.Writer::$enclose_all is no longer a boolean but an integerJsonConverter::withPrettyPrint now accepts an optional $identSize parameter as its unique parameter.Statement::when to enable conditionable query building.Deprecated attribute to signal deprecated public API methods and constants.JsonConverter::indentSizecallable in the Query\Constraint namespace.HttpHeaders::forFileDownload to be inline with RFC2183 and HTTP field name and value best practices.League\Csv\JsonConverter::chunkSizeLeague\Csv\AbstractCsv::downloadLeague\Csv\AbstractCsv::output use League\Csv\AbstractCsv::download insteadLeague\Csv\FragmentFinder and derived methods are marked as experimental as their results will be changed in the next major version.League\Csv\JsonConverter::download the filename is now nullableLeague\Csv\XMLConverter::download the filename is now nullableLeague\Csv\JsonConverter::save throws a TypeError exception if the $destination type is not supported.League\Csv\SwapDelimiter::apppendToLeague\Csv\SwapDelimiter::prependToLeague\Csv\CharsetConverter::apppendToLeague\Csv\CharsetConverter::prependToLeague\Csv\XMLConverter::downloadLeague\Csv\JsonConverterLeague\Csv\Constraint\Criteria::andNotLeague\Csv\Constraint\Criteria::orNotLeague\Csv\Constraint\Criteria::xorNotLeague\Csv\Serializer\MapRecord attributeconvertEmptyStringToNull options to MapCell and to MapRecord to improve string and null conversiontrimFieldValueBeforeCasting options to MapCell and to MapRecord to improve string conversiontrimElementValueBeforeCasting option to CasToArray to improve conversion during denormalizationheaderOffset option to CasToArray to improve conversion during denormalization. The optoon is only used with the CSV shape.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 classStream::getContents is added to the internal Stream classMapIterator::toIterator is added to the internal class MapIterator class to convert any iterable into an Iterator.array it now will be a collection of array instead of a simple array.HttpHeaders to improve file download throughout the codebase.leage\csv-doctrine is no longer a sub-split of the main league/csv package.Bom enumStream::ftellStatement::orderByAscStatement::orderByDescStatement::andWhereStatement::whereNotStatement::orWhereStatement::xorWhereStatement::andWhereColumnStatement::whereNotColumnStatement::orWhereColumnStatement::xorWhereColumnStatement::andWhereOffsetStatement::whereNotOffsetStatement::orWhereOffsetStatement::xorWhereOffsetQuery feature to allow easier filtering, ordering and querying tabular dataByteSequence Interface use the Bom enum insteadInfo::fetchBOMSequence use Bom::tryFromSequence insteadLeague\Csv\Doctrine use the new League\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.Reader and ResultSet docblocksBom enum instead of Info::fetchBOMSequenceAbstractCsv 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;ext-mbstring extension to work. But you should have it install in your system in order to use the mbstring related stream filters.ResultSet::chunkBy not working as documented.Statement::selectTabularDataReader::getRecordsAsObjectTabularDataReader::chunkByTabularDataReader::mapHeaderTabularDataReader::getObjects use TabularDataReader::getRecordsAsObject insteadReader::select and ResultSet::select now internally use Statement::selectStatement 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 nullLeague\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::valueTabulatDataReader::selectTabulatDataReader::getObjectsTabulatDataReader::matchingTabulatDataReader::matchingFirstTabulatDataReader::matchingFirstOrFailResultSet::fromRecordsStream::setMaxLineLenStream::getMaxLineLenLeague\Csv\Serializer\Denormalizer to allow denormalizing records into objects #508League\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 #498ResultSet 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::escapeRecordTabularReader::each (implemented on the Reader and the ResultSet object)TabularReader::exists (implemented on the Reader and the ResultSet object)TabularReader::reduce (implemented on the Reader and the ResultSet object)TabularReader::filter (implemented on the Reader and the ResultSet object)TabularReader::slice (implemented on the Reader and the ResultSet object)TabularReader::sorted (implemented on the Reader and the ResultSet object)Reader::addFormatter (implemented on the Reader and the ResultSet object)EscapeFormula::__invoke use EscapeFormula::escapeRecord insteadWriter::forceEnclosure and Writer::relaxEnclosure to control the presence of enclosure in the generated CSVWriter::getEndOfLine and Writer::setEndOfLineEncloseField stream filter in favor of the new Writer::forceEnclosure method.Writer::getNewline and Writer::setNewline in favor of Writer::getEndOfLine and Writer::setEndOfLineStream::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::fetchOneTabularDataReader::nth to replace TabularDataReader::fetchOneCharsetConverter::addBOMSkippingTo to improve BOM skipping see bug #483TabularDataReader::fetchOneStream::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](https://github.com/astepin)
Marked class constants explicitly as public by [@astepin](https://github.com/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::fetchColumnTabularDataReader::fetchColumnByOffset to replace TabularDataReader::fetchColumnTabularDataReader::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-anneFILTER_SANITIZE_STRING by FILTER_UNSAFE_RAW$eol argumentLeague\Csv\SyntaxError::duplicateColumnNames to expose column name duplicates during header usageLeague\Csv\UnableToProcessCsv as the new Exception Marker InterfaceLeague\Csv\UnavailableStream as the new ExceptionLeague\Csv\Info::getDelimiterStats to replace the namespace function delimiter_detectLeague\Csv\Info::fetchBOMSequence to replace the namespace function bom_matchLeague\Csv\AbstractCsv::toString to replace League\Csv\AbstractCsv::getContent and League\Csv\AbstractCsv::__toStringLeague\Csv\XMLConverter::create to replace League\Csv\XMLConverter::__constructLeague\Csv\HTMLConverter::create to replace League\Csv\HTMLConverter::__constructLeague\Csv\AbstractCsv::supportsStreamFilterOnRead and League\Csv\AbstractCsv::supportsStreamFilterOnWrite to replace League\Csv\AbstractCsv::supportsStreamFilter and League\Csv\AbstractCsv::getStreamFilterModeLeague\Csv\delimiter_detect use League\Csv\Info::getDelimiterStatsLeague\Csv\bom_match use League\Csv\Info::fetchBOMSequenceLeague\Csv\AbstractCsv::getContent use League\Csv\AbstractCsv::toStringLeague\Csv\AbstractCsv::getStreamFilterMode use League\Csv\AbstractCsv::supportsStreamFilterOnRead or League\Csv\AbstractCsv::supportsStreamFilterOnWriteLeague\Csv\AbstractCsv::supportsStreamFilter use League\Csv\AbstractCsv::supportsStreamFilterOnRead or League\Csv\AbstractCsv::supportsStreamFilterOnWriteLeague\Csv\XMLConverter::__construct use League\Csv\XMLConverter::createLeague\Csv\HTMLConverter::__construct use League\Csv\HTMLConverter::createsrc directory[@internal](https://github.com/internal) are now finalLeague\Csv\AbstractCsv::STREAM_FILTER_MODE constant replaces League\Csv\AbstractCsv::$stream_filter_modeLeague\Csv\AbstractCsv::$stream_filter_modeLeague\Csv\Statement::create named constructor to ease constraint builder instantiationLeague\Csv\Statement can now also process League\Csv\ResultSet instances.League\Csv\TabularDataReader interface to represent how to read tabular dataLeague\Csv\ResultSet::getRecords has an optional $header second argument to make the method works like League\Csv\Reader::getRecordsLeague\Csv\ResultSet::createFromTabularDataReader create a new instance from League\Csv\TabularDataReader implementing class.League\Csv\Reader no longer uses __call to implement fetchOne, fetchPairs and fetchColumn methods.is_iterableis_nullable_intLeague\Csv\Exception exception marker class #360, #361
feature proposed and developed by Darren Miller
League\Csv\UnavailableFeatureLeague\Csv\InvalidArgumentLeague\Csv\SyntaxErrorbom_match function see issue #363 resolved based on PR from Jerry Martinezdelemiter_detect function see issue #366Adding support for controlling empty record presence in Reader::getRecords return value.
Reader::includeEmptyRecordsReader::skipEmptyRecordsReader::isEmptyRecordsIncludedAdding support for controlling Input BOM usage in the library:
AbstractCsv::skipInputBOMAbstractCsv::includeInputBOMAbstractCsv::isInputBOMIncludedEmptyEscapeParser::parse no longer auto skip empty recordsXMLConverter::import see #348 thanks [@kusabi](https://github.com/kusabi)thead, tfoot and tbody in HTMLConverter::convert via the addition of
protected methods HTMLConverter::addHTMLAttributes and HTMLConverter::appendHeaderSection #348 thanks [@kusabi](https://github.com/kusabi)Reader dockblock thanks [@ghobaty](https://github.com/ghobaty).preg_match.Stream.AbstractCSV::chunk see #325 remove CSV flags from the Stream class to avoid infinite loop.HTMLConverter.AbstractCSV::getPathname see #321 thanks [@tomkyle](https://github.com/tomkyle)League\Csv\RFC4180Field use AbstractCSV::setEscape method with an empty string instead.AbstractCSV::__construct correctly initializes properties
AbstractCSV::createFromString named constructor default argument is now an empty string
AbstractCSV::setEscape now accepts an empty string like fputcsv and fgetcsv
Writer::insertOne fixes throwing exception when record can not be inserted
XMLConverter convert to string the record value to avoid PHP warning on null value
Internal Stream::createFromString named constructor default argument is now an empty string
Internal Stream::fwrite improved
Internal Stream::__destruct no longer emit warning on invalid stream filter removal.
Internal Stream::seek returns 0 if the seeked position 0 is valid see #321 thanks [@HaozhouChen](https://github.com/HaozhouChen)
Reader:getHeader when the record is an empty line.
Writer::insertOne allow empty array to be added to the CSV (allow inserting empty row)Reader::fetchAssoc no longer throws exception because of a bug in PHP7.2+ issue #279is_iterable polyfill for PHP7.0Reader::getHeader no longer throws exception because of a bug in PHP7.2+ issue #279issue with error_get_last usage when using a modified PHP error handler see #254 - fixed by [@csiszarattila](https://github.com/csiszarattila)
Removed seekable word from Stream exception messages.
League\Csv\EncloseField to force enclosure insertion on every field. #269League\Csv\EscapeFormula a League CSV formatter to prevent CSV Formula Injection in Spreadsheet programs.League\Csv\RFC4180Field::addTo accept an option $replace_whitespace argument to improve RFC4180 compliance.League\Csv\Abstract::getContent to replace League\Csv\Abstract::__toString. The __toString method may trigger a Fatal Error with non-seekable stream, instead you are recommended to used the new getContent method which will trigger an exception instead.League\Csv\Abstract::__toString use League\Csv\Abstract::getContent instead. the __toString triggers a Fatal Error when used on a non-seekable CSV document. use the getContent method instead which will trigger an exception instead.Reader::createFromPath default open mode is r see #258 and #266League\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 characterLeague\Csv\Reader::getHeaderLeague\Csv\Reader::getHeaderOffsetLeague\Csv\Reader::setHeaderOffsetLeague\Csv\CharsetConverter converts CSV records charset.League\Csv\XMLConverter converts CSV records into DOMDocumentLeague\Csv\HTMLConverter converts CSV records into HTML table.League\Csv\Exception the default exceptionLeague\Csv\CannotInsertRecordLeague\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 documentsLeague\Csv\ColumnConsistencyLeague\Csv\Writer::setFlushThresholdLeague\Csv\Writer::getFlushThresholdLeague\Csv\RFC4180Field to format field according to RFC4180 rulesImproved 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 integerNormalized CSV offset returned value
League\Csv\Reader::fetchColumn always returns the CSV document original offset.examples directoryPHP5 supportLeague\Csv\AbstractCsv::stripBOMLeague\Csv\Writer::jsonSerializeLeague\Csv\AbstractCsv::toHTMLLeague\Csv\AbstractCsv::toXMLLeague\Csv\AbstractCsv::setInputEncodingLeague\Csv\AbstractCsv::getInputEncodingLeague\Csv\AbstractCsv::isActiveStreamFilterLeague\Csv\AbstractCsv::setStreamFilterModeLeague\Csv\AbstractCsv::appendStreamFilterLeague\Csv\AbstractCsv::prependStreamFilterLeague\Csv\AbstractCsv::removeStreamFilterLeague\Csv\AbstractCsv::clearStreamFiltersLeague\Csv\AbstractCsv::newReaderLeague\Csv\AbstractCsv::newWriterLeague\Csv\Reader::getNewlineLeague\Csv\Reader::setNewlineLeague\Csv\Exception\InvalidRowException;League\Csv\Statement class:
League\Csv\AbstractCsv::addFilter,League\Csv\AbstractCsv::addSortBy,League\Csv\AbstractCsv::setOffset,League\Csv\AbstractCsv::setLimit;League\Csv\Reader::eachLeague\Csv\Reader::fetchLeague\Csv\Reader::fetchAllLeague\Csv\Reader::fetchAssocLeague\Csv\Reader::fetchPairsWithoutDuplicatesLeague\Csv\Writer::hasFormatterLeague\Csv\Writer::removeFormatterLeague\Csv\Writer::clearFormattersLeague\Csv\Writer::hasValidatorLeague\Csv\Writer::removeValidatorLeague\Csv\Writer::clearValidatorsLeague\Csv\Writer::getIteratorLeague\Csv\Plugin\SkipNullValuesFormatterLeague\Csv\Plugin\ForbiddenNullValuesValidatorLeague\Csv\Plugin\ColumnConsistencyValidator replace by League\Csv\ColumnConsistencyLeague\Csv\Writer no longers implements the IteratorAggregate interfaceLeague\Csv\AbstractCsv::fetchDelimitersOccurrence is removed replace by League\Csv\delimiter_detect functionWriter::insertOne was silently failing when inserting record in a CSV document in non-writing mode.Reader::getRow when using a StreamIterator issue #213[@deprecated](https://github.com/deprecated) from selected methods issue #208AbstractCsv::createFromStream to enable working with resource stream issue #202League\Csv\AbstractCsv::stripBomLeague\Csv\Reader::getOffsetLeague\Csv\Reader::getLimitLeague\Csv\Reader::getSortByLeague\Csv\Reader::getFilterLeague\Csv\Reader::setOffsetLeague\Csv\Reader::setLimitLeague\Csv\Reader::addSortByLeague\Csv\Reader::addFilterLeague\Csv\Reader::fetchLeague\Csv\Reader::eachLeague\Csv\Reader::fetchPairsWithoutDuplicatesLeague\Csv\Reader::fetchAssocLeague\Csv\Writer::removeFormatterLeague\Csv\Writer::hasFormatterLeague\Csv\Writer::clearFormattersLeague\Csv\Writer::removeValidatorLeague\Csv\Writer::hasValidatorLeague\Csv\Writer::clearValidatorsLeague\Csv\Writer::jsonSerializeLeague\Csv\Writer::toHTMLLeague\Csv\Writer::toXMLAbstractCsv::BOM_UTF32_LE value fixedgetInputBOM method name is now consistent everywhere in the API PR #171output method header content-type value to text/csv PR #175Ouput::getInputEncodingOuput::setInputEncodingOuput::getEncodingFrom replaced by Ouput::getInputEncodingOuput::setEncodingFrom replaced by Ouput::setInputEncodingReader::fetchPairsReader::fetchPairsWithoutDuplicatesReader::fetchColumn and Reader::fetchAssoc now return IteratorReader::fetchAssoc callable argument expects an indexed row using the submitted keys as its first argumentReader::fetchColumn callable argument expects the selected column value as its first argumentsetOutputBOM is removedAbstractCsv::getOutputBOM always return a stringAbstractCsv::getInputBOM always return a stringControls::setFlagsControls::getFlagsControls::detectDelimiterListQueryFilter::removeFilterQueryFilter::removeSortByQueryFilter::hasFilterQueryFilter::hasSortByQueryFilter::clearFilterQueryFilter::clearSortByReader::query$newline argument from AbstractCsv::createFromStringReader::fetch replaces League\Csv\Reader::query for naming consistencyControls::fetchDelimitersOccurrence to replace Controls::detectDelimiterList the latter gives erronous resultsControls::detectDelimiterListReader::query$newline argument from AbstractCsv::createFromStringSplFileObject flags usage PR #130AbstractCsv::createFromString no longer trim the submitted string issue #132SplFileObject flags were not always applied using query filter issue #99stripBOM query filtering method to ease removing the BOM sequence when querying the CSV document.Writer class for conversion methods.setFlags on conversion methods SplFileObject default flags are SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTYinsertOne now takes into account the escape character when modified after the first insert.setFlags: SplFileObject::DROP_NEW_LINE can be remove using setFlags method.Writer::addFormatter to add a formatter to the Writer objectWriter::removeFormatter to remove an already registered formatterWriter::hasFormatter to detect the presence of a formatterWriter::clearFormatters to clear all registered formatterWriter::addValidator to add a validator to the Writer objectWriter::removeValidator to remove an already registered validatorWriter::hasValidator to detect the presence of a validatorWriter::clearValidators to clear all registered validatorLeague\Csv\Exception\InvalidRowException exception thrown when row validation failedWriter class
League\Csv\Plugin\ColumnConsistencyValidator to validate column consistency on insertionLeague\Csv\Plugin\ForbiddenNullValuesValidator to validate null value on insertionLeague\Csv\Plugin\SkipNullValuesFormatter to format null value on insertionjsonSerialize, toXML and toHTML output can be modified using Reader query options methods.AbstractCSV::detectDelimiterList index keys now represents the occurrence of the found delimiter.getNewline and setNewline are accessible on the Reader class too.createFromString now accepts the $newline sequence as a second argument to specify the last added new line character to better work with interoperability.setDelimiter, setEnclosure and setEscape are removedSplFileObject flags value is now SplFileObject::READ_CSV|SplFileObject::DROP_NEW_LINEnewReader and newWriter methodsAbstractCSV::output method now returns the number of bytes send to the output bufferReader::fetchColumn will automatically filter out non existing values from the return arrayini_set("auto_detect_line_endings", true); is no longer set in the class constructor. Mac OS X users must explicitly set this ini options in their script.Writer and Reader default constructor are removed from public API in favor of the named constructors.Writer methods and constant related to CSV data validation and formatting before insertion
Writer::getNullHandlingModeWriter::setNullHandlingModeWriter::setColumnsCountWriter::getColumnsCountWriter::autodetectColumnsCountWriter::NULL_AS_EXCEPTIONWriter::NULL_AS_EMPTYWriter::NULL_AS_SKIP_CELLAbstractCSV::setOutputBOMAbstractCSV::getOutputBOMAbstractCSV::getInputBOMto manage BOM character with CSV.
Writer::setNewline , Writer::getNewline to control the newline sequence character added at the end of each CSV row.Reader::fetchAssoc now also accepts an integer as first argument representing a row index.detectDelimiterListLeague\Csv\AbstractCsvcreateFromPath and createFromFileObject in League\Csv\AbstractCsv to ease CSV object instantiationdetectDelimiterList in League\Csv\AbstractCsv to replace and remove the use of RuntimeException in detectDelimitersetEncodingFrom and setDecodingFrom in League\Csv\AbstractCsv to replace setEncoding and getEncoding for naming consistencynewWriter and newReader methods in League\Csv\AbstractCsv to replace Writer::getReader and Reader::getWriterLeague\Csv\Reader::each more strict $callable MUST returns trueLeague\Csv\AbstractCsv::detectDelimiterLeague\Csv\AbstractCsv::setEncoding and League\Csv\AbstractCsv::getEncodingLeague\Csv\Reader::setSortByLeague\Csv\Reader::setFilterLeague\Csv\Reader::getWriterLeague\Csv\Writer::getReaderLeague\Csv\Reader::fetchColLeague\Csv\Writer::setColumnsCount, League\Csv\Writer::getColumnsCount, League\Csv\Writer::autodetectColumnsCount to enable column consistency in writer modeLeague\Csv\Reader::fetchColumn replaces League\Csv\Reader::fetchCol for naming consistencyLeague\Csv\Reader::fetchCol$open_mode defaults to r+ in League\Csv\AbstractCsv constructorsLeague\Csv\Writer::setNullHandlingMode and League\Csv\Writer::getNullHandlingMode to handle null valuesetting ini_set("auto_detect_line_endings", true); no longer needed for Mac OSLeague\Csv\Reader::addSortBy, League\Csv\Reader::removeSortBy, League\Csv\Reader::hasSortBy, League\Csv\Reader::clearSortBy to improve sortingLeague\Csv\Reader::clearFilter to align extract filter capabilities to sorting capabilitiesLeague\Csv\Reader::setSortBy replaced by a better implementationLeague\Csv\Reader::setOffset now defaults to 0;League\Csv\Reader::setLimit now defaults to -1;detectDelimiter bug fixesLeague\Csv\Reader::each to ease CSV import dataLeague\Csv\Reader::addFilter, League\Csv\Reader::removeFilter, League\Csv\Reader::hasFilter to improve extract filter capabilitiesdetectDelimiter method to League\Csv\AbstractCsv to sniff CSV delimiter character.League\Csv\Reader::setFilter replaced by a better implementationBakame\Csv to League\Csv$open_mode validation is done by PHP internals directlytoXML method to transcode the CSV into a XML in Bakame\Csv\AbstractCsvtoHTML method bug in Bakame\Csv\AbstractCsvoutput method accepts an optional $filename argumentBakame\Csv\Reader::fetchCol defaults to $columnIndex = 0Bakame\Csv\Reader::fetchOne defaults to $offset = 0PSR-0 to PSR-4 to autoload the libraryBakame\Csv\Reader methods fixedjsonSerialize bug fixedgetEncoding and setEncoding methods to Bakame\Csv\AbstractCsvBakame\Csv\Writer::insertOne takes into account CSV controlstoHTML method takes into account encodingBakame\Csv\WriterBakame\Csv\Writer and Bakame\Csv\Reader extend Bakame\Csv\AbstractCsvBakame\Csv\Reader::fetchOne is no longer deprecatedBakame\Csv\Reader::fetchCol no longer accepts a third parameter $strictBakame\Csv\Codec now the library is composer of 2 main classesBakame\Csv\Reader::getFileBakame\Csv\Reader::fetchValueBakame\Csv\Reader no longer implements the ArrayAccess interfaceBakame\Csv\Reader implements IteratorAggregate InterfaceBakame\Csv\Reader::createFromString to create a CSV object from a raw stringBakame\Csv\Reader::query accept an optional $callable parameterBakame\Csv\Reader::getFile in favor of Bakame\Csv\Reader::getIteratorBakame\Csv\ReaderInterface useless interfaceBakame\Csv\Reader::fetch* $callable parameter is normalized to accept an arrayBakame\Csv\Reader::fetchCol accepts a third parameter $strictBakame\Csv\Reader implements the following interfaces JsonSerializable and ArrayAccessBakame\Csv\Reader::toHTML to output the CSV as a HTML tableBakame\Csv\Reader::setFilter, Bakame\Csv\Reader::setSortBy, Bakame\Csv\Reader::setOffset, Bakame\Csv\Reader::setLimit, Bakame\Csv\Reader::query to perform SQL like queries on the CSV content.Bakame\Csv\Codec::setFlags, Bakame\Csv\Codec::getFlags, Bakame\Csv\Codec::__construct : add an optional $flags parameter to enable the use of SplFileObject constants flagsBakame\Csv\Reader::fetchOne replaced by Bakame\Csv\Reader::offsetGetBakame\Csv\Reader::fetchValue useless methodBakame\Csv\Reader::output output the CSV data directly in the output bufferBakame\Csv\Reader::__toString can be use to echo the raw CSVBakame\Csv\Reader::fetchAssoc when users keys and CSV row data don't have the same lengthBakame\Csv\ReaderInterfaceBakame\Csv\Reader classBakame\Csv\Codec::loadStringreturns a Bakame\Csv\Reader objectBakame\Csv\Codec::loadFile returns a Bakame\Csv\Reader objectBakame\Csv\Codec::save returns a Bakame\Csv\Reader objectBakame\Csv\CsvCodec class renamed Bakame\Csv\CodecBakame\Csv\Codec::create from public APIInitial Release of Bakame\Csv
How can I help you explore Laravel packages today?